/* Stellar Dental Clinic - Language Switcher Styles (Dropdown Version) */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Noto+Sans+Gujarati:wght@400;500;600;700&display=swap');

/* Language-specific font families */
.lang-hi {
  font-family: 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
}

.lang-gu {
  font-family: 'Noto Sans Gujarati', 'Noto Sans', sans-serif;
}

.lang-en {
  font-family: 'Noto Sans', sans-serif;
}

/* ===== Language Dropdown Container ===== */
.language-switcher-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1000;
  margin-left: 12px;
  flex-shrink: 0;
}

/* ===== Selected Language Button ===== */
.lang-selected {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(43, 179, 195, 0.12);
  border: 1px solid rgba(43, 179, 195, 0.5);
  border-radius: 6px;
  color: #2bb3c3;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-family: 'Noto Sans', sans-serif;
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1;
}

.lang-selected:hover {
  background: rgba(43, 179, 195, 0.2);
  border-color: #2bb3c3;
  color: #1ecad8;
  box-shadow: 0 2px 8px rgba(43, 179, 195, 0.25);
}

.lang-selected .fa-globe {
  font-size: 13px;
  color: #2bb3c3;
}

.lang-selected-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #2bb3c3;
}

.lang-arrow {
  font-size: 8px;
  transition: transform 0.25s ease;
  opacity: 0.85;
  color: #2bb3c3;
}

.language-switcher-dropdown.open .lang-arrow {
  transform: rotate(180deg);
}

/* ===== Dropdown Options Panel ===== */
.lang-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: #1a2332;
  border: 1px solid rgba(43, 179, 195, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.language-switcher-dropdown.open .lang-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Individual Language Option ===== */
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Noto Sans', sans-serif;
  text-align: left;
  transition: all 0.2s ease;
}

.lang-option:hover {
  background: rgba(43, 179, 195, 0.2);
  color: #fff;
}

.lang-option:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-option-short {
  display: inline-block;
  width: 26px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #2bb3c3;
}

.lang-option-label {
  font-weight: 500;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 992px) {
  .language-switcher-dropdown {
    margin-left: 8px;
  }

  .lang-selected {
    padding: 5px 10px;
    gap: 5px;
    font-size: 11px;
  }

  .lang-selected .fa-globe {
    font-size: 12px;
  }

  .lang-selected-text {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .language-switcher-dropdown {
    margin-left: 6px;
  }

  .lang-selected {
    padding: 5px 8px;
    gap: 4px;
  }

  .lang-selected-text {
    font-size: 10px;
  }

  .lang-selected .fa-globe {
    font-size: 11px;
  }

  .lang-arrow {
    font-size: 7px;
  }

  .lang-options {
    min-width: 135px;
    right: 0;
  }

  .lang-option {
    padding: 9px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .language-switcher-dropdown {
    margin-left: 4px;
  }

  .lang-selected {
    padding: 4px 7px;
    gap: 3px;
    border-radius: 5px;
  }

  .lang-selected-text {
    font-size: 10px;
  }

  .lang-selected .fa-globe {
    font-size: 10px;
  }

  .lang-arrow {
    display: none;
  }
}

/* ===== Accessibility ===== */
.lang-selected:focus-visible {
  outline: 2px solid #c5a47e;
  outline-offset: 2px;
}

.lang-option:focus-visible {
  outline: 2px solid #c5a47e;
  outline-offset: -2px;
  background: rgba(43, 179, 195, 0.2);
}

/* ===== Print ===== */
@media print {
  .language-switcher-dropdown {
    display: none;
  }
}

/* ===== Smooth text transitions ===== */
[data-i18n],
[data-i18n-placeholder],
[data-i18n-title] {
  transition: opacity 0.2s ease-out;
}

/* ===== Indian language text rendering ===== */
body.lang-hi,
body.lang-gu {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: break-word;
  word-wrap: break-word;
}

/* ===== Google Translate UI hiding ===== */
.goog-te-banner-frame,
.goog-te-gadget-simple,
.goog-te-gadget {
  display: none !important;
}

body.goog-te-banner-frame-top {
  top: 0 !important;
}

/* ===== RTL support (future-proofing) ===== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .language-switcher-dropdown {
  margin-left: 0;
  margin-right: 12px;
}

[dir="rtl"] .lang-options {
  right: auto;
  left: 0;
}
