/* Скрытие iframe навигации Google Translate теперь определяется автоматически
   и сохраняется в поле "Свой CSS" в настройках — см. Настройки → Language Switcher */

/* Всплывающая подсказка перевода при наведении на текст (goog-gt-tt) — тоже лишняя */
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
	display: none !important;
	visibility: hidden !important;
}
.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

/* ====================== Кастомный дропдаун ====================== */
.sls-switcher {
	position: relative;
	display: inline-block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	user-select: none;
	z-index: 9999;
}

.sls-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	line-height: 1;
}
.sls-trigger:hover {
	border-color: #c9c9c9;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.sls-trigger .sls-flag {
	font-size: 16px;
	line-height: 1;
}
.sls-trigger .sls-current-label {
	font-weight: 500;
	color: #222;
	letter-spacing: 0.2px;
}
.sls-trigger .sls-chevron {
	width: 9px;
	height: 9px;
	border-right: 2px solid #888;
	border-bottom: 2px solid #888;
	transform: rotate(45deg);
	margin-top: -3px;
	transition: transform 0.2s ease;
}
.sls-switcher.sls-open .sls-trigger .sls-chevron {
	transform: rotate(-135deg);
	margin-top: 3px;
}

.sls-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 190px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
	border: 1px solid #ececec;
	padding: 6px;
	opacity: 0;
	transform: translateY(-6px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
	max-height: 320px;
	overflow-y: auto;
}
.sls-switcher.sls-open .sls-menu {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.sls-menu-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	color: #333;
	transition: background 0.12s ease;
}
.sls-menu-item:hover {
	background: #f3f5f8;
}
.sls-menu-item.sls-active {
	background: #eef4ff;
	color: #1a56db;
	font-weight: 600;
}
.sls-menu-item .sls-flag {
	font-size: 17px;
}

/* Скроллбар в меню, чтобы не выглядел грубо */
.sls-menu::-webkit-scrollbar {
	width: 6px;
}
.sls-menu::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 6px;
}

/* ====================== Модальное окно ====================== */
.sls-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 22, 30, 0.55);
	backdrop-filter: blur(2px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sls-modal-overlay.sls-visible {
	opacity: 1;
	pointer-events: auto;
}

.sls-modal-box {
	background: #fff;
	max-width: 400px;
	width: 90%;
	padding: 32px 28px 26px;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	text-align: center;
	position: relative;
	transform: scale(0.92) translateY(8px);
	transition: transform 0.25s ease;
}
.sls-modal-overlay.sls-visible .sls-modal-box {
	transform: scale(1) translateY(0);
}

.sls-modal-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: linear-gradient(135deg, #eef4ff, #e5f3ff);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
}

.sls-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 26px;
	height: 26px;
	border: none;
	background: transparent;
	color: #aaa;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease, color 0.15s ease;
}
.sls-modal-close:hover {
	background: #f2f2f2;
	color: #555;
}

.sls-modal-box h3 {
	margin: 0 0 8px;
	font-size: 17px;
	color: #16181d;
	font-weight: 700;
}
.sls-modal-box p {
	margin: 0 0 20px;
	font-size: 14px;
	color: #666;
	line-height: 1.5;
}

.sls-modal-box .sls-switcher {
	width: 100%;
	margin-bottom: 18px;
}
.sls-modal-box .sls-trigger {
	width: 100%;
	justify-content: space-between;
	border-radius: 10px;
	padding: 10px 14px;
}
.sls-modal-box .sls-menu {
	width: 100%;
	left: 0;
	right: 0;
}

.sls-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sls-btn {
	padding: 11px 16px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: opacity 0.15s ease, transform 0.1s ease;
}
.sls-btn:active {
	transform: scale(0.98);
}
.sls-btn-primary {
	background: #1a56db;
	color: #fff;
}
.sls-btn-primary:hover {
	opacity: 0.92;
}
.sls-btn-secondary {
	background: transparent;
	color: #888;
}
.sls-btn-secondary:hover {
	color: #555;
}
