/**
 * HostStack premium currency selector — navbar-integrated billing control
 */

.hs-ccy {
  position: relative;
  z-index: 220;
}

.hs-ccy__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.375rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(4, 12, 28, 0.85);
  color: #c5daf0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hs-ccy__trigger:hover,
.hs-ccy__trigger:focus-visible {
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.08);
  outline: none;
}

.hs-ccy.is-open .hs-ccy__trigger {
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.hs-ccy__flag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.hs-ccy__flag .hs-flag-ico {
  display: block;
  border-radius: 2px;
  object-fit: cover;
}

.hs-ccy__code {
  letter-spacing: 0.04em;
}

.hs-ccy__chev {
  width: 0.65rem;
  height: 0.65rem;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.hs-ccy.is-open .hs-ccy__chev {
  transform: rotate(180deg);
}

.hs-ccy__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 13.25rem;
  max-width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: rgba(6, 18, 38, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 48px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hs-ccy__menu[hidden] {
  display: none !important;
}

.hs-ccy__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: #c8dff5;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hs-ccy__option:hover,
.hs-ccy__option:focus-visible {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.12);
  outline: none;
}

.hs-ccy__option.is-active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.22);
}

.hs-ccy__option-flag {
  flex-shrink: 0;
  line-height: 0;
}

.hs-ccy__option-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.hs-ccy__option-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e8f4ff;
  line-height: 1.25;
}

.hs-ccy__option-meta {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #8bacc8;
  line-height: 1.2;
}

.hs-ccy__check {
  flex-shrink: 0;
  width: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.hs-ccy__option.is-active .hs-ccy__check {
  opacity: 1;
}

.hs-ccy__hint {
  margin: 0.35rem 0 0;
  padding: 0 0.15rem;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: #6b8aad;
}

.hs-ccy--mobile {
  padding: 0.5rem 0 0.75rem;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
}

.hs-ccy--mobile .hs-ccy__menu {
  position: static;
  margin-top: 0.45rem;
  max-width: none;
  width: 100%;
  box-shadow: none;
  border-color: rgba(56, 189, 248, 0.12);
}

.hs-ccy--mobile .hs-ccy__trigger {
  width: 100%;
  justify-content: space-between;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
}

.hs-ccy.is-loading .hs-ccy__trigger::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-top-color: #38bdf8;
  animation: hs-ccy-spin 0.7s linear infinite;
}

@keyframes hs-ccy-spin {
  to { transform: rotate(360deg); }
}

[data-hs-ccy-note] {
  display: block;
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: #6b8aad;
}

[data-hs-ccy-note][hidden] {
  display: none !important;
}

/* Desktop: keep disclaimer out of the nav row (was overlapping page content) */
@media (min-width: 960px) {
  .hs-layout-nav-actions > .hs-ccy:not(.hs-ccy--mobile) .hs-ccy__hint {
    display: none !important;
  }

  .hs-layout-nav-actions > .hs-ccy:not(.hs-ccy--mobile) {
    align-self: center;
  }
}

/* Legacy chip/summary back-compat */
.hs-ccy-global-summary,
.hs-ccy-opt,
.hs-ccy-chip {
  font-family: inherit;
}

.hs-price {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 899px) {
  .hs-layout-nav-actions > .hs-ccy:not(.hs-ccy--mobile) {
    display: flex;
  }

  .hs-ccy:not(.hs-ccy--mobile) .hs-ccy__menu {
    right: 0;
    left: auto;
  }
}

@media (max-width: 399px) {
  .hs-ccy:not(.hs-ccy--mobile) .hs-ccy__code {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-ccy.is-loading .hs-ccy__trigger::after {
    animation: none;
  }
}
