/**
 * Srisailam Generic - first-visit language popup.
 *
 * The page stays visible, dimmed, behind the card. Sits above GTranslate's
 * floating switcher (z-index 999999).
 */

.sg-lang-popup {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 16px;
	background: rgba(20, 16, 10, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	overflow-y: auto;
	animation: sg-lang-popup-fade 0.2s ease-out;
}

.sg-lang-popup[hidden] {
	display: none;
}

/* Stop the page scrolling behind the popup. */
html.sg-lang-popup-open,
html.sg-lang-popup-open body {
	overflow: hidden;
}

.sg-lang-popup__dialog {
	box-sizing: border-box;
	width: 100%;
	max-width: 420px;
	margin: auto;
	padding: 28px 24px 24px;
	background: #fff;
	color: #2b2418;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	text-align: center;
	font-family: inherit;
	outline: none;
}

.sg-lang-popup__title {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 20px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	color: inherit;
}

.sg-lang-popup__title span + span {
	font-size: 16px;
	font-weight: 600;
	color: #6b5a3a;
}

.sg-lang-popup__options {
	display: grid;
	gap: 10px;
}

.sg-lang-popup__option {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 10px 18px;
	background: #fff8e6;
	color: #2b2418;
	border: 2px solid #f0e0b8;
	border-radius: 12px;
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
	-webkit-tap-highlight-color: transparent;
}

.sg-lang-popup__option:hover,
.sg-lang-popup__option:focus-visible {
	background: #ffefc2;
	border-color: #d9a520;
	color: #2b2418;
}

.sg-lang-popup__option:focus-visible {
	outline: 3px solid #b47d00;
	outline-offset: 2px;
}

.sg-lang-popup__flag {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	margin: 0;
	border-radius: 50%;
	object-fit: cover;
}

.sg-lang-popup__name {
	flex: 1 1 auto;
	min-width: 0;
}

@keyframes sg-lang-popup-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sg-lang-popup {
		animation: none;
	}
}
