/**
 * Partners commissions map — ported from partners/components/Map.vue
 * (lines 498-1012) and partners/components/MapCountry.vue (lines 168-343).
 * Generic module class names are prefixed map-/mapcountry- per the plan's
 * rename tables; dead selectors from both sources are not ported.
 */

/* ------------------------------------------------------------------ *
 * Map.vue
 * ------------------------------------------------------------------ */

.map-base {
	width: 100%;
	display: flex;
	position: relative;
	gap: 16px;
}

@media (max-width: 767px) {
	.map-base {
		flex-direction: column;
	}

	.map-base:before {
		display: none;
	}
}

.map-sidebar {
	max-height: 874px;
	z-index: 2;
	width: 338px;
	flex-shrink: 0;
	background: #30375629;
	border-radius: 24px;
	padding: 20px 0;
}

@media (max-width: 767px) {
	.map-sidebar {
		display: none;
		width: 100%;
		gap: 8px;
		padding: 12px 0;
	}
}

.map-sidebar-content {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	overflow-y: auto;
	padding: 0 20px;
}

.map-tier-title {
	font-weight: 600;
	font-size: 24px;
	line-height: 140%;
	letter-spacing: 0;
	color: #f9f9f9;
	padding: 6px 0;
	margin-bottom: 16px;
}

.map-br-line {
	height: 1px;
	background: #202532;
	margin: 24px 0;
}

.map-countries {
	display: flex;
	flex-direction: column;
	z-index: 2;
	gap: 20px;
}

@media (max-width: 767px) {
	.map-countries {
		flex-direction: row;
		overflow: auto;
		gap: 8px;
		margin: 0 -16px;
		padding: 0 16px;
	}

	.map-countries::-webkit-scrollbar {
		height: 0;
		background: transparent;
	}
}

.map-sidebar-item {
	display: flex;
	gap: 8px;
	font-weight: 700;
	font-size: 20px;
	line-height: 140%;
	letter-spacing: 0;
	cursor: pointer;
	opacity: 0.4;
	transition: opacity 0.3s ease-out;
	white-space: nowrap;
}

.map-sidebar-item:hover,
.map-sidebar-item.selected {
	opacity: 1;
	transition-duration: 0.15s;
}

@media (max-width: 767px) {
	.map-sidebar-item {
		flex-direction: row;
		white-space: nowrap;
		font-size: 14px;
		gap: 8px;
		padding: 8px 8px;
		line-height: 1;
		align-items: center;
	}

	.map-sidebar-item:hover,
	.map-sidebar-item.selected {
		background: #191c27;
		border-radius: 6px;
	}
}

.map-sidebar-item-image {
	width: 32px;
	height: auto;
}

@media (max-width: 767px) {
	.map-sidebar-item-image {
		width: 17px;
	}
}

.map-panel {
	flex-grow: 1;
	gap: 16px;
	display: flex;
	flex-direction: column;
	position: relative;
	min-width: 0;
}

@media (max-width: 1024px) {
	.map-panel {
		margin-right: 0;
	}
}

.map-title {
	position: absolute;
	color: #f9f9f9;
	display: flex;
	align-items: center;
	gap: 15px;
	font-weight: 700;
	font-size: 28px;
	line-height: 140%;
	top: 24px;
	left: 24px;
	letter-spacing: 0;
	margin: 0 auto;
	justify-content: center;
	z-index: 2;
}

@media (max-width: 767px) {
	.map-title {
		display: none;
	}
}

.map-title-image {
	width: 37px;
	height: auto;
	display: block;
}

.map-footer {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	bottom: 0;
	width: 100%;
	padding: 50px 0 24px;
	background: linear-gradient(180deg, rgba(21, 25, 35, 0) 0%, #151923 63.31%);
	border-radius: 24px;
}

@media (max-width: 767px) {
	.map-footer {
		display: none;
	}
}

.map-footer-mob {
	display: none;
}

@media (max-width: 767px) {
	.map-footer-mob {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 8px;
		margin-bottom: 44px;
	}
}

.map-btn-mobile {
	width: 100%;
}

.map-arrow-left,
.map-arrow-right {
	display: none;
}

@media (max-width: 767px) {
	.map-arrow-left,
	.map-arrow-right {
		color: #8d98ae;
		background: rgba(255, 255, 255, 0.08);
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 100%;
		position: absolute;
		z-index: 2;
		transition: 0.2s ease-out;
		transition-property: filter, color;
		-webkit-user-select: none;
		-moz-user-select: none;
		user-select: none;
		width: 28px;
		height: 28px;
		top: 45%;
	}

	.map-arrow-left:hover,
	.map-arrow-right:hover {
		color: #f9f9f9;
		cursor: pointer;
		filter: brightness(1.1);
	}

	.map-arrow-left svg,
	.map-arrow-right svg {
		width: 20px;
		height: 20px;
	}
}

.map-arrow-left {
	left: 10%;
}

.map-arrow-right {
	right: 10%;
}

@media (max-width: 767px) {
	.map-arrow-left {
		left: 2%;
	}

	.map-arrow-right {
		right: 2%;
	}
}

.map-container {
	width: 100%;
	position: relative;
	overflow: hidden;
}

@media (max-width: 767px) {
	.map-container {
		order: 1;
	}
}

.map-image {
	width: 100%;
	height: auto;
	top: 0;
	left: 0;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

.map-image-img {
	width: 100%;
	height: auto;
	display: block;
}

.map-info {
	width: 100%;
	z-index: 2;
}

@media (max-width: 767px) {
	.map-info {
		order: 2;
	}
}

.map-mobile-tabs {
	display: none;
}

@media (max-width: 767px) {
	.map-mobile-tabs {
		display: flex;
		background: #30375629;
		padding: 4px;
		border-radius: 12px;
		gap: 6px;
	}
}

.map-tier-block-mob {
	display: none;
}

@media (max-width: 767px) {
	.map-tier-block-mob {
		display: block;
	}
}

.map-mobile-tab {
	flex: 1;
	padding: 8px 0;
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	line-height: 140%;
	letter-spacing: 0;
	cursor: pointer;
	border-radius: 12px;
	color: #b8bfcd;
	transition: 0.2s;
}

.map-mobile-tab.active {
	background: #30375680;
	color: #f9f9f9;
}

/* Cross-fade between the 17 always-present map images — replaces Vue's
 * <Transition mode="out-in"> (.map-fade-*), which only ever mounted one. */
.map-image-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: auto;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease-out;
}

.map-image-img.active {
	position: relative;
	opacity: 1;
	pointer-events: auto;
}

.map-container {
	aspect-ratio: 2172 / 1354;
}

/* ------------------------------------------------------------------ *
 * MapCountry.vue
 * ------------------------------------------------------------------ */

.mapcountry-base {
	width: 100%;
	display: flex;
	justify-content: center;
}

.mapcountry-cards {
	display: flex;
	gap: 20px;
	width: 100%;
	justify-content: space-between;
}

@media (max-width: 768px) {
	.mapcountry-cards {
		flex-direction: column;
		gap: 8px;
	}
}

.mapcountry-card {
	flex: 1;
	background: #30375629;
	border-radius: 12px;
	gap: 36px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	color: #fff;
}

@media (max-width: 768px) {
	.mapcountry-card {
		gap: 12px;
		padding: 12px;
	}
}

.mapcountry-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

@media (max-width: 768px) {
	.mapcountry-header {
		gap: 8px;
	}
}

.mapcountry-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: 1px solid #0a4f4f;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
}

@media (max-width: 768px) {
	.mapcountry-icon {
		width: 24px;
		height: 24px;
	}

	.mapcountry-icon img {
		width: 10px;
		height: 10px;
	}
}

.mapcountry-title {
	font-weight: 700;
	font-style: italic;
	font-size: 24px;
	line-height: 140%;
	letter-spacing: 0;
	text-transform: uppercase;
}

@media (max-width: 768px) {
	.mapcountry-title {
		font-weight: 700;
		font-size: 14px;
		line-height: 140%;
		letter-spacing: 0;
	}
}

.mapcountry-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

@media (max-width: 768px) {
	.mapcountry-body {
		gap: 4px;
	}
}

.mapcountry-body-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.mapcountry-body-grid-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mapcountry-label {
	font-weight: 600;
	font-size: 16px;
	line-height: 140%;
	letter-spacing: 0;
	color: #b8bfcd;
}

.mapcountry-bg-bar-wrap {
	background: #00333380;
	margin: 0 -20px;
}

@media (max-width: 768px) {
	.mapcountry-bg-bar-wrap {
		margin: 0 -12px;
	}
}

.mapcountry-bg-bar-wrap-first {
	background: #00333380;
	margin: 0 0 0 -20px;
}

@media (max-width: 768px) {
	.mapcountry-bg-bar-wrap-first {
		margin: 0 0 0 -12px;
	}
}

.mapcountry-bg-bar-wrap-second {
	background: #00333380;
	margin: 0 -20px 0 0;
}

@media (max-width: 768px) {
	.mapcountry-bg-bar-wrap-second {
		margin: 0 -12px 0 0;
	}
}

.mapcountry-bar-wrap {
	height: 32px;
	border-radius: 20px;
	padding: 0 20px;
	overflow: hidden;
}

@media (max-width: 768px) {
	.mapcountry-bar-wrap {
		height: 23px;
	}
}

.mapcountry-bar-wrap-first {
	height: 32px;
	border-radius: 20px;
	padding: 0 2px 0 20px;
	overflow: hidden;
}

@media (max-width: 768px) {
	.mapcountry-bar-wrap-first {
		height: 23px;
	}
}

.mapcountry-bar-wrap-second {
	height: 32px;
	border-radius: 20px;
	padding: 0 20px 0 2px;
	overflow: hidden;
}

@media (max-width: 768px) {
	.mapcountry-bar-wrap-second {
		height: 23px;
	}
}

.mapcountry-bar-fill {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #49eaff, #3cf4ff);
	border-radius: 20px;
	transition: width 0.6s ease-out;
}

.mapcountry-green {
	background: linear-gradient(90deg, #2fff80, #00ffbb);
}

.mapcountry-pattern {
	background: repeating-linear-gradient(
		125deg,
		#2aff94,
		#2aff94 12px,
		rgba(73, 234, 255, 0.2) 12px,
		rgba(73, 234, 255, 0.2) 24px
	);
}

.mapcountry-value {
	font-weight: 700;
	font-size: 20px;
	line-height: 140%;
	letter-spacing: 0;
	text-transform: uppercase;
	font-style: italic;
}

@media (max-width: 768px) {
	.mapcountry-value {
		font-weight: 700;
		font-size: 14px;
		line-height: 140%;
	}
}
