/**
 * Sayuswa Multilingual Design System Stylesheet
 * 
 * High-tech executive B2B language combobox, flag icons, seamless Google Translate
 * element suppression, and smooth animation transitions.
 *
 * @package SayuswaTheme
 * @version 1.0.0
 */

/* ==========================================================================
   1. CRITICAL: COMPLETE SUPPRESSION OF DEFAULT GOOGLE TRANSLATE UGLY UI
   ========================================================================== */
body {
  top: 0px !important;
  position: static !important;
}

/* Suppress all Google top banner bars, tooltips & balloon frames */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove default Google Translate annoying yellow highlight on translated text */
.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Ensure Google Translate injected wrapper doesn't disrupt header layout */
.skiptranslate:not(.sayuswa-lang-combobox):not(.sayuswa-lang-combobox *) {
  display: none !important;
}

#google_translate_element {
  display: none !important;
}

/* ==========================================================================
   2. FLAG SVG STYLING
   ========================================================================== */
.sayuswa-flag-svg {
  display: inline-block;
  vertical-align: middle;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* ==========================================================================
   3. LANGUAGE SWITCHER COMBOBOX (MAIN COMPONENT)
   ========================================================================== */
.sayuswa-lang-combobox {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  z-index: 1000;
}

/* Combobox Button Trigger */
.sayuswa-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  outline: none;
}

.sayuswa-lang-btn:hover,
.sayuswa-lang-combobox.is-open .sayuswa-lang-btn {
  background: rgba(21, 232, 77, 0.16);
  border-color: #15E84D;
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(21, 232, 77, 0.3);
}

.sayuswa-lang-btn:focus-visible {
  outline: 2px solid #00E5CC;
  outline-offset: 2px;
}

.sayuswa-lang-btn-flag {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sayuswa-lang-btn-label {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  color: #FFFFFF;
}

.sayuswa-lang-chevron {
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.7);
}

.sayuswa-lang-combobox.is-open .sayuswa-lang-chevron {
  transform: rotate(180deg);
  color: #15E84D;
}

/* ==========================================================================
   4. DROPDOWN POPUP MENU
   ========================================================================== */
.sayuswa-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #053C53;
  background: linear-gradient(180deg, #072838 0%, #031520 100%);
  border: 1px solid rgba(0, 168, 150, 0.4);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.97);
  transform-origin: top right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sayuswa-lang-combobox.is-open .sayuswa-lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Dropdown Header */
.sayuswa-lang-dropdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 10px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94A3B8;
}

/* Options List */
.sayuswa-lang-options-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Individual Option Button */
.sayuswa-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.16s ease;
  outline: none;
}

.sayuswa-lang-option:hover {
  background: rgba(0, 168, 150, 0.22);
  border-color: rgba(21, 232, 77, 0.3);
  transform: translateX(3px);
}

.sayuswa-lang-option:hover .sayuswa-option-name {
  color: #FFFFFF;
}

.sayuswa-lang-option:hover .sayuswa-flag-svg {
  transform: scale(1.08);
}

.sayuswa-lang-option.is-active {
  background: rgba(21, 232, 77, 0.14);
  border-color: rgba(21, 232, 77, 0.45);
}

.sayuswa-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sayuswa-option-flag {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sayuswa-option-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.sayuswa-option-name {
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  transition: color 0.16s ease;
}

.sayuswa-lang-option.is-active .sayuswa-option-name {
  color: #15E84D;
}

.sayuswa-option-native {
  font-size: 11px;
  font-weight: 500;
  color: #94A3B8;
}

.sayuswa-option-check {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #15E84D;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.sayuswa-lang-option.is-active .sayuswa-option-check {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   5. CONTEXT VARIATIONS: MOBILE DRAWER & FLOATING
   ========================================================================== */

/* Mobile Drawer Variant */
.sayuswa-lang-context-mobile_drawer {
  width: 100%;
  margin: 12px 0 16px 0;
  display: block;
}

.sayuswa-lang-context-mobile_drawer .sayuswa-lang-btn {
  width: 100%;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.sayuswa-lang-context-mobile_drawer .sayuswa-lang-dropdown {
  position: static;
  width: 100%;
  margin-top: 8px;
  opacity: 1;
  visibility: visible;
  transform: none;
  display: none;
  box-shadow: none;
  background: rgba(7, 31, 41, 0.95);
}

.sayuswa-lang-context-mobile_drawer.is-open .sayuswa-lang-dropdown {
  display: block;
}

/* Floating Quick Switcher Pill (Desktop Bottom-Left) */
.sayuswa-floating-lang-wrap {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: block;
}

.sayuswa-floating-lang-wrap .sayuswa-lang-btn {
  background: #053C53;
  border: 1px solid rgba(21, 232, 77, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
}

.sayuswa-floating-lang-wrap .sayuswa-lang-btn:hover {
  background: #072838;
  border-color: #15E84D;
  transform: translateY(-2px);
}

.sayuswa-floating-lang-wrap .sayuswa-lang-dropdown {
  top: auto;
  bottom: calc(100% + 10px);
  left: 0;
  right: auto;
  transform-origin: bottom left;
}

.sayuswa-floating-lang-wrap.is-open .sayuswa-lang-dropdown {
  transform: translateY(0) scale(1);
}

/* Hide floating switcher on mobile to avoid clashing with PWA bottom bar */
@media (max-width: 768px) {
  .sayuswa-floating-lang-wrap {
    display: none !important;
  }
}

/* ==========================================================================
   6. FEEDBACK TOAST NOTIFICATION
   ========================================================================== */
.sayuswa-lang-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sayuswa-lang-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sayuswa-toast-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #071F29;
  border: 1px solid #15E84D;
  border-radius: 30px;
  padding: 10px 22px;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(21, 232, 77, 0.25);
}

.sayuswa-toast-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(21, 232, 77, 0.3);
  border-top-color: #15E84D;
  border-radius: 50%;
  animation: sayuswa-spin 0.7s linear infinite;
}

@keyframes sayuswa-spin {
  to {
    transform: rotate(360deg);
  }
}
