/* ==========================================================================
   HK Language Switcher
   ========================================================================== */

.hk-lang-switcher {
  --ls-color: var(--color-gray-800, #1d2939);
  --ls-hover-bg: var(--color-gray-100, #f2f4f7);
  --ls-active-color: var(--color-white, #ffffff);
  --ls-dropdown-radius: var(--radius-md, 10px);
  --ls-font-size: 1.4rem;
  --ls-t: var(--duration-normal, 250ms);
  --ls-ease: var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));

  position: relative;
  display: inline-block;
  z-index: 1;
}

/* ── Trigger ───────────────────────────────────────────────────────── */
.hk-lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  color: var(--ls-color);
  font-family: inherit;
  font-size: var(--ls-font-size);
  font-weight: var(--font-weight-medium, 500);
  cursor: pointer;
  transition: background var(--ls-t) var(--ls-ease);
  white-space: nowrap;
  line-height: 1.4;
}

.hk-lang-switcher__trigger:hover {
  background: var(--ls-hover-bg);
}

.hk-lang-switcher__globe {
  flex-shrink: 0;
}

.hk-lang-switcher__current {
  pointer-events: none;
}

.hk-lang-switcher__chevron {
  flex-shrink: 0;
  transition: transform var(--ls-t) var(--ls-ease);
}
.hk-lang-switcher__chevron.is-open {
  transform: rotate(180deg);
}

/* ── Dropdown ──────────────────────────────────────────────────────── */
.hk-lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: var(--color-white, #ffffff);
  box-shadow: var(--shadow-lg, 0 12px 16px -4px rgba(16, 24, 40, 0.06), 0 4px 6px -2px rgba(16, 24, 40, 0.03));
  border-radius: var(--radius-lg);
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity var(--ls-t) var(--ls-ease),
    transform var(--ls-t) var(--ls-ease),
    visibility var(--ls-t) var(--ls-ease);
  z-index: 9001;
  max-height: 320px;
  overflow-y: auto;
}

.hk-lang-switcher--right .hk-lang-switcher__dropdown {
  left: auto;
  right: 0;
}

.hk-lang-switcher__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Option ────────────────────────────────────────────────────────── */
.hk-lang-switcher__option {
  list-style: none;
}

.hk-lang-switcher__btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  color: var(--ls-color);
  font-family: inherit;
  font-size: var(--ls-font-size);
  font-weight: var(--font-weight-regular, 400);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--ls-t) var(--ls-ease),
    color var(--ls-t) var(--ls-ease);
}

.hk-lang-switcher__btn:hover {
  background: var(--ls-hover-bg);
}

.hk-lang-switcher__option.is-active .hk-lang-switcher__btn {
  background: rgba(0, 0, 0, 0.08);
  color: var(--primary-color);
  font-weight: var(--font-weight-semibold, 600);
}

/* ── Alpine x-cloak ────────────────────────────────────────────────── */
.hk-lang-switcher [x-cloak] {
  display: none !important;
}

/* ── Drawer variant ────────────────────────────────────────────────── */
.hk-drawer__lang {
  flex-shrink: 0;
  border-top: 1px solid  #aaa;
  padding: 0.75rem 1rem;
}

.hk-lang-switcher--drawer {
  display: block;
  position: static;
  z-index:  999;
  width: 100%;
  min-height:  100px;
}

.hk-lang-switcher--drawer .hk-lang-switcher__trigger {
  width: 100%;
  justify-content: flex-start;
  padding: 1rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--item-color, #1a1a2e);
}

.hk-lang-switcher--drawer .hk-lang-switcher__dropdown {
  position: static;
  box-shadow: none;
  border-radius: 0;
  min-width: 100%;
  padding: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  max-height: 0;
  height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s ease-out;
}

.hk-lang-switcher--drawer .hk-lang-switcher__dropdown.is-open {
  max-height: 200px;
  height:  200px;
  overflow-y: auto; 
}

.hk-lang-switcher--drawer .hk-lang-switcher__btn {
  padding: 1rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Hide Google Translate banner & toolbar ─────────────────────────── */
.hk-gt-bootstrap {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
div.skiptranslate,
#google_translate_element2,
.goog-te-banner-frame,
body > .goog-te-banner-frame,
#goog-gt-tt {
  display: none !important;
}
body {
  top: 0 !important;
}
font {
  background-color: transparent !important;
  box-shadow: none !important;
  position: initial !important;
}
