/* ==============================================================
   JUPITER BRASS - LANGUAGE TRANSLATOR STYLES
   ============================================================== */

/* 1. Complete Suppression of Google Translate Frame, Banner & Artifacts */
body > .skiptranslate,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
iframe.skiptranslate,
iframe[class*="goog-te-banner-frame"],
iframe[id*=":1.container"],
iframe[id*=":2.container"],
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb-OEVmcd-ti6hGc,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0px !important;
  width: 0px !important;
  max-height: 0px !important;
  border: none !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  z-index: -99999 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

html {
  margin-top: 0px !important;
  padding-top: 0px !important;
}

body {
  top: 0px !important;
  position: static !important;
  margin-top: 0px !important;
  padding-top: 0px !important;
}

#goog-gt-tt,
#goog-gt-vt,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
  visibility: hidden !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

#google_translate_element {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 2. Header Actions Container */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 109;
}

@media (min-width: 901px) {
  .nav {
    margin-left: auto;
    margin-right: 20px;
  }
}

/* 3. Language Switcher Button (Trigger) */
.lang-switcher-wrapper {
  position: relative;
  display: inline-block;
  user-select: none;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-family: var(--font-heading, 'Outfit', -apple-system, sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  line-height: 1;
}

.lang-switcher-btn:hover,
.lang-switcher-btn:focus-visible {
  border-color: #F31B1B;
  color: #F31B1B;
  box-shadow: 0 4px 14px rgba(243, 27, 27, 0.14);
  outline: none;
}

.lang-switcher-wrapper.is-open .lang-switcher-btn {
  border-color: #F31B1B;
  background: #FFF5F5;
  color: #F31B1B;
  box-shadow: 0 4px 14px rgba(243, 27, 27, 0.16);
}

.lang-btn-globe {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #F31B1B;
}

.lang-btn-flag {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.lang-btn-label {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lang-btn-arrow {
  width: 13px;
  height: 13px;
  color: #6b7280;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.lang-switcher-wrapper.is-open .lang-btn-arrow {
  transform: rotate(180deg);
  color: #F31B1B;
}

/* 4. Dropdown Panel */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.18), 0 6px 16px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  overflow: hidden;
}

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

/* 5. Dropdown Header & Search */
.lang-dropdown-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.lang-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-search-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.lang-search-input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  font-family: inherit;
  font-size: 0.8125rem;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lang-search-input:focus {
  border-color: #F31B1B;
  box-shadow: 0 0 0 3px rgba(243, 27, 27, 0.1);
}

.lang-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.8125rem;
}

/* Quick Category Filter Tabs */
.lang-tabs-nav {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.lang-tab-pill {
  flex: 1;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  color: #64748b;
  text-align: center;
  transition: all 0.18s ease;
  line-height: 1.2;
}

.lang-tab-pill:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.lang-tab-pill.is-active {
  background: #FEF2F2;
  border-color: #F31B1B;
  color: #F31B1B;
  box-shadow: 0 1px 3px rgba(243, 27, 27, 0.1);
}

/* 6. Language Options List */
.lang-options-list {
  max-height: 310px;
  overflow-y: auto;
  padding: 6px;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.lang-options-list::-webkit-scrollbar {
  width: 5px;
}

.lang-options-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.lang-options-list::-webkit-scrollbar-track {
  background: transparent;
}

.lang-option-item {
  margin: 0;
  padding: 0;
}

.lang-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-option-btn:hover,
.lang-option-btn:focus-visible {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.lang-option-btn.is-active {
  background: #FEF2F2;
  color: #F31B1B;
  font-weight: 600;
}

.lang-option-flag {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-option-names {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.lang-native-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.lang-option-btn.is-active .lang-native-name {
  font-weight: 600;
}

.lang-english-name {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 1px;
}

.lang-option-btn.is-active .lang-english-name {
  color: #ef4444;
}

.lang-option-code {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
}

.lang-option-btn.is-active .lang-option-code {
  background: #FEE2E2;
  color: #F31B1B;
}

.lang-active-check {
  width: 14px;
  height: 14px;
  color: #F31B1B;
  flex-shrink: 0;
  display: none;
}

.lang-option-btn.is-active .lang-active-check {
  display: block;
}

.lang-empty-search {
  padding: 16px 12px;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
  display: none;
}

/* 7. Dropdown Footer */
.lang-dropdown-footer {
  padding: 8px 14px;
  background: #fafafa;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: #94a3b8;
}

.lang-google-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-reset-btn {
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: 0.6875rem;
  color: #F31B1B;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.15s;
}

.lang-reset-btn:hover {
  background: #FEE2E2;
  text-decoration: underline;
}

/* 8. Mobile Navigation Drawer Integration */
.nav-mobile-lang-section {
  display: none;
}

@media (max-width: 900px) {
  .lang-switcher-btn {
    padding: 6px 10px;
    font-size: 0.8125rem;
    gap: 5px;
  }

  .lang-btn-name-full {
    display: none;
  }

  .lang-btn-code-short {
    display: inline;
  }

  .lang-dropdown {
    right: -50px;
    width: 314px;
  }

  /* Section inside mobile drawer */
  .nav-mobile-lang-section {
    display: block;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .nav-mobile-lang-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .nav-mobile-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nav-mobile-lang-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
  }

  .nav-mobile-lang-pill.is-active,
  .nav-mobile-lang-pill:hover {
    background: #FEF2F2;
    border-color: #F31B1B;
    color: #F31B1B;
    font-weight: 600;
  }
}

@media (min-width: 901px) {
  .lang-btn-name-full {
    display: inline;
  }
  .lang-btn-code-short {
    display: none;
  }
}
