/* ==========================================================================
   FindBrief Language Switcher — Styles
   Brand color: #0352fc | Font: Manrope
   ========================================================================== */

/* Google Translate ka top banner/branding poori tarah hide — sirf humara apna UI dikhega */
#fbls-google-translate,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-menu-frame,
#goog-gt-tt,
.goog-te-gadget-icon,
.goog-tooltip,
.goog-tooltip:hover {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	width: 0 !important;
	position: absolute !important;
	top: -9999px !important;
	left: -9999px !important;
}
.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}
/* Note: yahan jaan-bujhkar html/body par position ya margin-top force NAHI kiya gaya —
   Royal Elementor jaise page builders sticky header aur mobile menu ke liye body/html
   ki position khud control karte hain. Body ka 'top' offset (jo Google translate kabhi-kabhi
   inline set kar deta hai) sirf JS se safely clear hota hai — neeche script.js dekhein. */

/* ---------- Overlay + Popup ---------- */
.fbls-overlay {
	position: fixed;
	inset: 0;
	background: rgba(8, 15, 35, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	font-family: 'Manrope', sans-serif;
	padding: 16px;
	box-sizing: border-box;
}

.fbls-overlay.fbls-open {
	opacity: 1;
	visibility: visible;
}

.fbls-popup {
	background: #ffffff;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 18px;
	padding: 36px 30px 30px;
	text-align: center;
	position: relative;
	box-shadow: 0 24px 70px rgba(3, 82, 252, 0.28);
	transform: translateY(14px) scale(0.98);
	transition: transform 0.28s ease;
	box-sizing: border-box;
}

.fbls-overlay.fbls-open .fbls-popup {
	transform: translateY(0) scale(1);
}

.fbls-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #9aa6c3;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 8px;
	transition: color 0.15s ease, background 0.15s ease;
}

.fbls-close:hover {
	color: #0352fc;
	background: #eef2ff;
}

.fbls-logo {
	font-weight: 800;
	font-size: 21px;
	color: #0352fc;
	margin-bottom: 16px;
	letter-spacing: -0.02em;
}

.fbls-title {
	font-family: 'Manrope', sans-serif;
	font-weight: 700;
	font-size: 19px;
	color: #0f172a;
	margin: 0 0 6px;
	line-height: 1.3;
}

.fbls-subtitle {
	font-family: 'Manrope', sans-serif;
	font-size: 13.5px;
	color: #64748b;
	margin: 0 0 20px;
	font-weight: 500;
}

/* ---------- Custom Dropdown (with flags) ---------- */
.fbls-dropdown {
	position: relative;
	font-family: 'Manrope', sans-serif;
	text-align: left;
	margin-bottom: 14px;
	max-width: 100%;
	box-sizing: border-box;
}

.fbls-dropdown-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	min-height: 52px;
	border-radius: 12px;
	border: 1.5px solid #d8e1fd;
	background: #f7f9ff;
	cursor: pointer;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: #0f172a;
	box-sizing: border-box;
}

.fbls-dropdown-trigger:hover {
	border-color: #aebffb;
}

.fbls-dropdown.fbls-dropdown-open .fbls-dropdown-trigger {
	border-color: #0352fc;
}

.fbls-trigger-label {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: left;
}

.fbls-trigger-arrow {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	border-right: 2.5px solid #0352fc;
	border-bottom: 2.5px solid #0352fc;
	transform: rotate(45deg);
	margin-top: -4px;
	transition: transform 0.2s ease;
}

.fbls-dropdown.fbls-dropdown-open .fbls-trigger-arrow {
	transform: rotate(-135deg);
	margin-top: 2px;
}

.fbls-dropdown-panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1.5px solid #e1e8fd;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(3, 82, 252, 0.18);
	z-index: 1000000;
	display: none;
	overflow: hidden;
	max-width: calc(100vw - 24px);
	box-sizing: border-box;
}

.fbls-dropdown.fbls-dropdown-open .fbls-dropdown-panel {
	display: block;
}

.fbls-dropdown-search {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border: none;
	border-bottom: 1px solid #eef2ff;
	font-family: 'Manrope', sans-serif;
	font-size: 13.5px;
	font-weight: 500;
	color: #0f172a;
	background: #fbfcff;
}

.fbls-dropdown-search:focus {
	outline: none;
	background: #ffffff;
}

.fbls-dropdown-list {
	list-style: none;
	margin: 0;
	padding: 6px;
	max-height: 240px;
	overflow-y: auto;
}

.fbls-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 12px;
	border-radius: 9px;
	cursor: pointer;
	font-size: 14.5px;
	font-weight: 600;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fbls-option:hover,
.fbls-option.fbls-option-active {
	background: #eef2ff;
	color: #0352fc;
}

.fbls-option.fbls-option-hidden {
	display: none;
}

.fbls-option-name {
	overflow: hidden;
	text-overflow: ellipsis;
}

.fbls-flag {
	flex-shrink: 0;
	width: 26px;
	height: 19px;
	border-radius: 3px;
	background-size: cover;
	background-position: center;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.fbls-flag-globe {
	width: 26px;
	height: 19px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	box-shadow: none;
}

/* ---------- Popup action buttons ---------- */
.fbls-confirm-btn {
	width: 100%;
	background: #0352fc;
	color: #fff;
	border: none;
	padding: 15px 16px;
	min-height: 50px;
	border-radius: 11px;
	font-family: 'Manrope', sans-serif;
	font-weight: 700;
	font-size: 15.5px;
	cursor: pointer;
	margin-bottom: 12px;
	transition: background 0.2s ease, transform 0.1s ease;
}

.fbls-confirm-btn:hover {
	background: #023fc7;
}

.fbls-confirm-btn:active {
	transform: scale(0.98);
}

.fbls-skip-btn {
	width: 100%;
	background: none;
	border: none;
	color: #64748b;
	font-family: 'Manrope', sans-serif;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
	padding: 4px;
}

.fbls-skip-btn:hover {
	color: #0352fc;
}

/* ---------- Header / Shortcode Switcher ---------- */
.fbls-header-switcher .fbls-dropdown {
	margin-bottom: 0;
	min-width: 190px;
	display: inline-block;
}

.fbls-header-switcher .fbls-dropdown-trigger,
.fbls-dropdown[id="fbls-header-dropdown"] .fbls-dropdown-trigger {
	border: 1.5px solid #0352fc;
	background: #ffffff;
	color: #0352fc;
	padding: 12px 18px;
	min-height: 46px;
	font-size: 14.5px;
}

.fbls-dropdown[id="fbls-header-dropdown"] .fbls-trigger-arrow {
	border-color: #0352fc;
}

.fbls-dropdown[id="fbls-header-dropdown"] .fbls-dropdown-panel {
	min-width: 220px;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.fbls-popup {
		padding: 24px 18px 18px;
	}
	.fbls-title {
		font-size: 17px;
	}
	.fbls-subtitle {
		font-size: 13px;
		margin-bottom: 16px;
	}

	/* Header/shortcode switcher: agar mobile menu me daala gaya ho to poori width le
	   le aur kabhi viewport se bahar na nikle — fixed admin-set width yahan ignore. */
	.fbls-header-switcher {
		display: block;
		width: 100%;
	}
	.fbls-header-switcher .fbls-dropdown {
		display: block;
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	.fbls-dropdown-trigger {
		padding: 13px 14px;
		gap: 10px;
	}

	.fbls-dropdown[id="fbls-header-dropdown"] .fbls-dropdown-panel {
		min-width: 0;
		width: 100%;
	}

	.fbls-dropdown-search {
		padding: 10px 12px;
		font-size: 13px;
	}

	.fbls-dropdown-list {
		max-height: 200px;
	}

	.fbls-option {
		padding: 11px 10px;
		font-size: 14px;
		gap: 10px;
	}

	.fbls-flag,
	.fbls-flag-globe {
		width: 23px;
		height: 17px;
	}

	.fbls-confirm-btn {
		font-size: 14.5px;
		padding: 14px 16px;
	}
}

/* Extra-narrow phones (SE/older Android, ~320px viewports) */
@media (max-width: 360px) {
	.fbls-popup {
		padding: 20px 14px 16px;
		border-radius: 14px;
	}
	.fbls-logo {
		font-size: 18px;
		margin-bottom: 12px;
	}
	.fbls-title {
		font-size: 16px;
	}
	.fbls-dropdown-trigger {
		padding: 11px 12px;
	}
	.fbls-trigger-arrow {
		width: 10px;
		height: 10px;
	}
}

/* Short / landscape mobile viewports — keep the popup from clipping off-screen */
@media (max-height: 640px) {
	.fbls-popup {
		max-height: 94vh;
		padding-top: 20px;
		padding-bottom: 16px;
	}
	.fbls-dropdown-list {
		max-height: 160px;
	}
	.fbls-logo {
		margin-bottom: 10px;
	}
	.fbls-subtitle {
		margin-bottom: 12px;
	}
}
