.dc-branch-map,
.dc-branch-map * {
	box-sizing: border-box;
}

.dc-branch-map {
	--dc-panel-bg: #191919;
	--dc-focus-color: #fec52e;
	--dc-tab-text: #f2f2f2;
	--dc-tab-bg: transparent;
	--dc-tab-interaction-text: #121212;
	--dc-tab-interaction-bg: #fec52e;
	--dc-tab-border-color: #fec52e;
	--dc-tab-border-style: solid;
	--dc-tab-transition: 300ms;
	--dc-branch-bg: transparent;
	--dc-branch-title: #fff;
	--dc-branch-info: #f2f2f2;
	--dc-branch-interaction-bg: #242424;
	--dc-branch-interaction-title: #fec52e;
	--dc-branch-interaction-info: #f2f2f2;
	--dc-branch-divider: #666;
	--dc-branch-interaction-divider: #fec52e;
	--dc-branch-divider-style: solid;
	--dc-branch-transition: 300ms;
	--dc-detail-link: #fec52e;
	--dc-scrollbar-width: 6px;
	--dc-scrollbar-thumb: #6b6b6b;
	--dc-scrollbar-track: transparent;
	--dc-map-bg: #e7e7e7;
	--dc-panel-height: 625px;
	--dc-mobile-tab-min-width: 180px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dc-branch-map__grid {
	display: flex;
	align-items: stretch;
	flex-wrap: nowrap;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dc-branch-map__panel {
	display: flex;
	flex: 0 0 450px;
	flex-direction: column;
	width: 450px;
	max-width: 100%;
	min-width: 0;
	height: var(--dc-panel-height);
	overflow: hidden;
	background-color: var(--dc-panel-bg);
	color: #fff;
}

.dc-branch-map__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	flex: 0 0 auto;
	min-width: 0;
	border-width: 1px;
	border-style: var(--dc-tab-border-style);
	border-color: var(--dc-tab-border-color);
}

.dc-branch-map__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 12px 20px;
	background-color: var(--dc-tab-bg);
	color: var(--dc-tab-text);
	font: inherit;
	line-height: 1.25;
	text-align: center;
	overflow-wrap: anywhere;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	transition: background-color var(--dc-tab-transition) ease, color var(--dc-tab-transition) ease;
}

.dc-branch-map__tab:hover,
.dc-branch-map__tab.is-active {
	background-color: var(--dc-tab-interaction-bg);
	color: var(--dc-tab-interaction-text);
}

.dc-branch-map__tab:focus-visible,
.dc-branch-map__branch-trigger:focus-visible,
.dc-branch-map__detail-link:focus-visible {
	outline: 2px solid var(--dc-focus-color);
	outline-offset: -2px;
}

.dc-branch-map__list {
	min-width: 0;
	min-height: 0;
	flex: 1 1 auto;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior-x: auto;
	overscroll-behavior-y: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: var(--dc-scrollbar-thumb) var(--dc-scrollbar-track);
}

.dc-branch-map__list::-webkit-scrollbar {
	width: var(--dc-scrollbar-width);
}

.dc-branch-map__list::-webkit-scrollbar-track {
	background-color: var(--dc-scrollbar-track);
}

.dc-branch-map__list::-webkit-scrollbar-thumb {
	background-color: var(--dc-scrollbar-thumb);
	border-radius: 999px;
}

.dc-branch-map__branch {
	position: relative;
	min-width: 0;
	background-color: var(--dc-branch-bg);
	border-bottom-width: 1px;
	border-bottom-style: var(--dc-branch-divider-style);
	border-bottom-color: var(--dc-branch-divider);
	transition: background-color var(--dc-branch-transition) ease, border-color var(--dc-branch-transition) ease;
}

.dc-branch-map__branch[hidden] {
	display: none !important;
}

.dc-branch-map__branch:hover,
.dc-branch-map__branch.is-active {
	background-color: var(--dc-branch-interaction-bg);
	border-bottom-color: var(--dc-branch-interaction-divider);
}

.dc-branch-map__branch-trigger {
	display: block;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}

.dc-branch-map__branch-name {
	display: block;
	min-width: 0;
	margin: 0 0 12px;
	color: var(--dc-branch-title);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	overflow-wrap: anywhere;
	transition: color var(--dc-branch-transition) ease;
}

.dc-branch-map__branch-info {
	display: grid;
	min-width: 0;
	gap: 8px;
	color: var(--dc-branch-info);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	overflow-wrap: anywhere;
	transition: color var(--dc-branch-transition) ease;
}

.dc-branch-map__branch:hover .dc-branch-map__branch-name,
.dc-branch-map__branch.is-active .dc-branch-map__branch-name {
	color: var(--dc-branch-interaction-title);
}

.dc-branch-map__branch:hover .dc-branch-map__branch-info,
.dc-branch-map__branch.is-active .dc-branch-map__branch-info {
	color: var(--dc-branch-interaction-info);
}

.dc-branch-map__branch-info > span {
	display: block;
	min-width: 0;
}

.dc-branch-map__detail-link {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin-top: 12px;
	color: var(--dc-detail-link);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.dc-branch-map__detail-link:hover {
	text-decoration: underline;
}

.dc-branch-map__map {
	position: relative;
	min-width: 0;
	min-height: 260px;
	flex: 1 1 auto;
	width: auto;
	max-width: 100%;
	overflow: hidden;
	background-color: var(--dc-map-bg);
}

.dc-branch-map__iframe {
	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	border: 0;
	background: transparent;
}

.dc-branch-map__loader {
	position: absolute;
	inset: 50% auto auto 50%;
	z-index: 1;
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border: 3px solid rgba(0, 0, 0, 0.15);
	border-top-color: rgba(0, 0, 0, 0.65);
	border-radius: 50%;
	animation: dc-branch-map-spin 0.8s linear infinite;
}

@keyframes dc-branch-map-spin {
	to { transform: rotate(360deg); }
}

/* Tablet: cấu hình layout vẫn lấy từ responsive controls của Elementor. */
@media (max-width: 1024px) {
	.dc-branch-map__grid {
		width: 100%;
	}

	.dc-branch-map__panel,
	.dc-branch-map__map {
		max-width: 100%;
	}

	.dc-branch-map__panel {
		flex-grow: 0;
		flex-shrink: 0;
	}

	.dc-branch-map__map {
		flex-basis: auto;
		width: 100%;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.dc-branch-map {
		max-width: 100vw;
	}

	.dc-branch-map__grid {
		min-width: 0;
	}

	.dc-branch-map__panel,
	.dc-branch-map__map {
		width: 100%;
		max-width: 100%;
	}

	.dc-branch-map--mobile-tabs-scroll .dc-branch-map__tabs {
		display: flex;
		align-items: stretch;
		gap: 0;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: auto;
		overscroll-behavior-y: auto;
		-webkit-overflow-scrolling: touch;
		touch-action: pan-x pan-y;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.dc-branch-map--mobile-tabs-scroll .dc-branch-map__tabs::-webkit-scrollbar {
		display: none;
	}

	.dc-branch-map--mobile-tabs-scroll .dc-branch-map__tab {
		flex: 0 0 var(--dc-mobile-tab-min-width);
		min-width: var(--dc-mobile-tab-min-width);
		scroll-snap-align: start;
	}

	.dc-branch-map__branch-name {
		font-size: 16px;
	}

	.dc-branch-map__branch-info {
		font-size: 14px;
	}

	.dc-branch-map__map {
		min-height: 260px;
	}
}


/* =========================================================
   SCROLL RESPONSIVE
   Chỉ Desktop dùng scroll lồng theo mặc định.
   Tablet/Mobile để trang đảm nhiệm cuộn dọc, tránh giật/đơ.
========================================================= */

.dc-branch-map--scroll-desktop-page .dc-branch-map__panel {
	height: auto !important;
	overflow: visible !important;
}

.dc-branch-map--scroll-desktop-page .dc-branch-map__list {
	flex: 0 0 auto;
	max-height: none !important;
	overflow-x: visible !important;
	overflow-y: visible !important;
	-webkit-overflow-scrolling: auto;
	touch-action: pan-y;
	scrollbar-gutter: auto;
}

@media (min-width: 768px) and (max-width: 1024px) {
	.dc-branch-map--scroll-tablet-page .dc-branch-map__panel {
		height: auto !important;
		overflow: visible !important;
	}

	.dc-branch-map--scroll-tablet-page .dc-branch-map__list {
		flex: 0 0 auto;
		max-height: none !important;
		overflow-x: visible !important;
		overflow-y: visible !important;
		-webkit-overflow-scrolling: auto;
		touch-action: pan-y;
		scrollbar-gutter: auto;
	}

	.dc-branch-map--scroll-tablet-internal .dc-branch-map__list {
		overscroll-behavior-y: auto;
		touch-action: pan-y;
	}
}

@media (max-width: 767px) {
	.dc-branch-map--scroll-mobile-page .dc-branch-map__panel {
		height: auto !important;
		overflow: visible !important;
	}

	.dc-branch-map--scroll-mobile-page .dc-branch-map__list {
		flex: 0 0 auto;
		max-height: none !important;
		overflow-x: visible !important;
		overflow-y: visible !important;
		-webkit-overflow-scrolling: auto;
		touch-action: pan-y;
		scrollbar-gutter: auto;
	}

	.dc-branch-map--scroll-mobile-internal .dc-branch-map__list {
		overscroll-behavior-y: auto;
		touch-action: pan-y;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dc-branch-map__tab,
	.dc-branch-map__branch,
	.dc-branch-map__branch-name,
	.dc-branch-map__branch-info {
		transition: none;
	}

	.dc-branch-map__loader {
		animation: none;
	}
}
