/**
 * Plugin:   PMA Translation
 * File:     assets/css/pma-translation.css
 * Purpose:  Styles for the custom language switcher UI (flag dropdown,
 *           trigger button, dropdown menu, active state) and rules to hide
 *           all Google Translate chrome (banner, tooltip, gadget bar).
 * Loaded:   wp_enqueue_style( 'pma-translation' ) in pma_translation_enqueue()
 *           hooked to wp_enqueue_scripts. Depends on astra-theme-css.
 */

/* ── PMA Language Switcher ── */
.pma-lang-wrap {
	display: inline-flex;
	align-items: center;
	position: relative;
}
#ast-desktop-header .pma-lang-wrap {
	align-self: center;
	margin-left: 16px;
}
#ast-mobile-header .pma-lang-wrap {
	align-self: center;
	margin-right: 8px;
	order: -1;
}
#ast-mobile-header .site-header-primary-section-right {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 4px;
	overflow: visible !important;
}
.pma-lang-trigger {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #ffffff;
	background: none;
	border: 1.5px solid rgba(255,255,255,0.45);
	border-radius: 5px;
	padding: 5px 9px;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
	white-space: nowrap;
	line-height: 1;
	user-select: none;
}
.pma-lang-trigger:hover,
.pma-lang-wrap.pma-open .pma-lang-trigger {
	border-color: #9A724E;
	background: rgba(154,114,78,0.18);
	color: #ffffff;
}
.pma-lang-flag  { font-size: 14px; line-height: 1; }
.pma-lang-arrow {
	font-size: 9px;
	opacity: 0.7;
	margin-left: 2px;
	transition: transform 0.2s ease;
	display: inline-block;
}
.pma-lang-wrap.pma-open .pma-lang-arrow { transform: rotate(180deg); }
.pma-lang-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 2px);
	right: 0;
	background: #1a1a1a;
	border: 1.5px solid #9A724E;
	border-radius: 6px;
	overflow: hidden;
	min-width: 110px;
	z-index: 99999;
	box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.pma-lang-wrap.pma-open .pma-lang-dropdown { display: block; }
.pma-lang-dropdown button {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 9px 14px;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ffffff;
	background: none;
	border: none;
	cursor: pointer;
	transition: background 0.15s ease;
	white-space: nowrap;
	text-align: left;
}
.pma-lang-dropdown button:hover { background: #9A724E; color: #ffffff; }
.pma-lang-dropdown button.pma-lang-active { background: rgba(154,114,78,0.25); }
.pma-drop-flag { font-size: 15px; line-height: 1; }
#ast-desktop-header .site-header-primary-section-right,
#ast-desktop-header .ast-grid-right-section {
	overflow: visible !important;
}

/* ── Hide all Google Translate chrome ───────────────────────────────── */
/* Only the translation engine is used — GT's own UI is hidden entirely. */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight,
.goog-te-menu-value,
.goog-te-gadget,
#pma-gt-element,
.skiptranslate {
	display: none !important;
	visibility: hidden !important;
}

/* Prevent GT from pushing body down with its top bar */
body { top: 0 !important; }
