/*!
 * Excelsior Currency Converter — switcher styles.
 *
 * All four formats (dropdown, buttons, radio, links) share a consistent
 * pill / segmented look that matches the flags style. Design tokens are set
 * on .excelsior_currency_converter-switcher so every format stays cohesive.
 */
.excelsior_currency_converter-switcher {
  --excelsior_currency_converter-accent: #2f6fed;
  --excelsior_currency_converter-accent-soft: #eef3fe;
  --excelsior_currency_converter-accent-text: #1f4fd8;
  --excelsior_currency_converter-border: #d8dee8;
  --excelsior_currency_converter-border-strong: #b9c2d2;
  --excelsior_currency_converter-text: #1f2430;
  --excelsior_currency_converter-muted: #5f6b7d;
  --excelsior_currency_converter-pill: 999px;
  --excelsior_currency_converter-radius: 14px;
  --excelsior_currency_converter-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: 0.95em;
  line-height: 1.3;
  color: var(--excelsior_currency_converter-text);
}

.excelsior_currency_converter-switcher__title {
  font-weight: 600;
  color: var(--excelsior_currency_converter-text);
}

.excelsior_currency_converter-switcher__code {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Flag sizing shared by the non-flags formats. */
.excelsior_currency_converter-switcher .excelsior_currency_converter-flag {
  width: 1.15em;
  height: 0.86em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.06);
}

/* ---------------- Dropdown (custom select) ---------------- */
/* A fully-styled dropdown (toggle + custom option list) that matches the
   flags/buttons/radio/links look, instead of the plain native <select>. */
.excelsior_currency_converter-select {
  position: relative;
  display: inline-block;
  font-size: 1em;
}
.excelsior_currency_converter-select__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  background: #fff;
  border: 1px solid var(--excelsior_currency_converter-border);
  border-radius: var(--excelsior_currency_converter-pill);
  padding: 0.42em 0.7em 0.42em 0.8em;
  font: inherit;
  color: var(--excelsior_currency_converter-text);
  line-height: 1.2;
  box-shadow: var(--excelsior_currency_converter-shadow);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.excelsior_currency_converter-select__toggle:hover,
.excelsior_currency_converter-select__toggle:focus,
.excelsior_currency_converter-select.is-open .excelsior_currency_converter-select__toggle {
  background: #fff;
  color: var(--excelsior_currency_converter-text);
  border-color: var(--excelsior_currency_converter-border);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}
.excelsior_currency_converter-select__symbol {
  color: var(--excelsior_currency_converter-muted);
}
.excelsior_currency_converter-select__code {
  font-weight: 700;
  color: var(--excelsior_currency_converter-text);
  letter-spacing: 0.02em;
}
.excelsior_currency_converter-select__caret {
  width: 0.5em;
  height: 0.5em;
  border: solid var(--excelsior_currency_converter-muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: -0.2em 0 0 0.1em;
  transition: transform 0.15s ease;
}
.excelsior_currency_converter-select.is-open .excelsior_currency_converter-select__caret {
  transform: rotate(-135deg);
  margin-top: 0.15em;
}
.excelsior_currency_converter-select__list {
  /* !important: see .excelsior_currency_converter-flags__list — the dropdown must overlay, never
     affect the navbar height. */
  position: absolute !important;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100000;
  min-width: 11em;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 0.35em;
  list-style: none;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: var(--excelsior_currency_converter-radius);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.16);
  display: none;
}
.excelsior_currency_converter-select.is-open .excelsior_currency_converter-select__list,
.excelsior_currency_converter-select:focus-within .excelsior_currency_converter-select__list {
  display: block;
}
/* Open upward when docked to a bottom corner. */
.excelsior_currency_converter-pos-bottom-left .excelsior_currency_converter-select__list,
.excelsior_currency_converter-pos-bottom-right .excelsior_currency_converter-select__list {
  top: auto;
  bottom: calc(100% + 6px);
}
.excelsior_currency_converter-pos-bottom-right .excelsior_currency_converter-select__list,
.excelsior_currency_converter-pos-top-right .excelsior_currency_converter-select__list {
  left: auto;
  right: 0;
}
.excelsior_currency_converter-select__list li {
  margin: 0;
}
.excelsior_currency_converter-select__option {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.6em;
  border-radius: 6px;
  color: var(--excelsior_currency_converter-text);
  text-decoration: none;
  white-space: nowrap;
}
.excelsior_currency_converter-select__option:hover,
.excelsior_currency_converter-select__option:focus {
  background: var(--excelsior_currency_converter-accent-soft);
}
.excelsior_currency_converter-select__option.is-active {
  background: var(--excelsior_currency_converter-accent-soft);
  color: var(--excelsior_currency_converter-accent-text);
  font-weight: 700;
}

/* ---------------- Buttons (segmented control) ---------------- */
.excelsior_currency_converter-switcher__buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25em;
  list-style: none;
  margin: 0;
  padding: 0.25em;
  background: #eef1f6;
  border: 1px solid var(--excelsior_currency_converter-border);
  border-radius: var(--excelsior_currency_converter-pill);
}
.excelsior_currency_converter-switcher__buttons li {
  margin: 0;
}
.excelsior_currency_converter-switcher__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.95em;
  border: 1px solid transparent;
  border-radius: var(--excelsior_currency_converter-pill);
  background: transparent;
  color: var(--excelsior_currency_converter-muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.excelsior_currency_converter-switcher__button:hover {
  color: var(--excelsior_currency_converter-text);
  background: rgba(255, 255, 255, 0.75);
}
.excelsior_currency_converter-switcher__button.is-active {
  background: #fff;
  color: var(--excelsior_currency_converter-accent-text);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.14);
}

/* ---------------- Radio (pill chips) ---------------- */
.excelsior_currency_converter-switcher__radios {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.excelsior_currency_converter-switcher__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.5em 0.95em;
  border: 1px solid var(--excelsior_currency_converter-border);
  border-radius: var(--excelsior_currency_converter-pill);
  background: #fff;
  color: var(--excelsior_currency_converter-text);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.excelsior_currency_converter-switcher__radio:hover {
  border-color: var(--excelsior_currency_converter-border-strong);
}
.excelsior_currency_converter-switcher__radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05em;
  height: 1.05em;
  margin: 0;
  border: 1px solid #c3cbd8;
  border-radius: 50%;
  background: #fff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.excelsior_currency_converter-switcher__radio input[type="radio"]::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--excelsior_currency_converter-accent);
  transform: scale(0);
  transition: transform 0.15s ease;
}
.excelsior_currency_converter-switcher__radio input[type="radio"]:checked {
  border-color: var(--excelsior_currency_converter-accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}
.excelsior_currency_converter-switcher__radio input[type="radio"]:checked::before {
  transform: scale(1);
}
.excelsior_currency_converter-switcher__radio.is-active {
  border-color: var(--excelsior_currency_converter-accent);
  background: var(--excelsior_currency_converter-accent-soft);
}

/* ---------------- Links (pill chips) ---------------- */
.excelsior_currency_converter-switcher__links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.excelsior_currency_converter-switcher__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.9em;
  border-radius: var(--excelsior_currency_converter-pill);
  color: var(--excelsior_currency_converter-muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.excelsior_currency_converter-switcher__link:hover {
  background: #f2f5fa;
  color: var(--excelsior_currency_converter-text);
}
.excelsior_currency_converter-switcher__link.is-active {
  background: var(--excelsior_currency_converter-accent-soft);
  color: var(--excelsior_currency_converter-accent-text);
  font-weight: 700;
}

/* [excelsior_currency_converter_price_table] output. */
.excelsior_currency_converter-price-table {
  border-collapse: collapse;
}
.excelsior_currency_converter-price-table th,
.excelsior_currency_converter-price-table td {
  padding: 0.3em 0.75em;
  border: 1px solid #e0e0e0;
  text-align: left;
}

/* ---------------- Flags style ---------------- */
.excelsior_currency_converter-flags {
  position: relative;
  display: inline-block;
  font-size: 1em;
}
.excelsior_currency_converter-flags__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  background: #fff;
  border: 1px solid var(--excelsior_currency_converter-border);
  border-radius: var(--excelsior_currency_converter-pill);
  padding: 0.42em 0.7em 0.42em 0.55em;
  font: inherit;
  color: var(--excelsior_currency_converter-text);
  line-height: 1.2;
  box-shadow: var(--excelsior_currency_converter-shadow);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.excelsior_currency_converter-flags__toggle:hover,
.excelsior_currency_converter-flags__toggle:focus,
.excelsior_currency_converter-flags.is-open .excelsior_currency_converter-flags__toggle {
  background: #fff;
  color: var(--excelsior_currency_converter-text);
  border-color: var(--excelsior_currency_converter-border);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}
.excelsior_currency_converter-flags__code {
  font-weight: 700;
  color: var(--excelsior_currency_converter-text);
}
.excelsior_currency_converter-flags__caret {
  width: 0.5em;
  height: 0.5em;
  border: solid var(--excelsior_currency_converter-muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: -0.2em 0 0 0.1em;
  transition: transform 0.15s ease;
}
.excelsior_currency_converter-flags.is-open .excelsior_currency_converter-flags__caret {
  transform: rotate(-135deg);
  margin-top: 0.15em;
}
.excelsior_currency_converter-flags__list {
  /* !important: many themes (e.g. Astra's `.main-navigation ul`) set
     `position: relative` on lists, which would pull the dropdown into the
     page flow and change the navbar height when it opens. The dropdown must
     always overlay, so its position wins over any theme rule. */
  position: absolute !important;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100000;
  min-width: 12em;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 0.35em;
  list-style: none;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: var(--excelsior_currency_converter-radius);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.16);
  display: none;
}
.excelsior_currency_converter-flags.is-open .excelsior_currency_converter-flags__list,
.excelsior_currency_converter-flags:focus-within .excelsior_currency_converter-flags__list {
  display: block;
}
/* Open upward when docked to a bottom corner. */
.excelsior_currency_converter-pos-bottom-left .excelsior_currency_converter-flags__list,
.excelsior_currency_converter-pos-bottom-right .excelsior_currency_converter-flags__list {
  top: auto;
  bottom: calc(100% + 6px);
}
.excelsior_currency_converter-pos-bottom-right .excelsior_currency_converter-flags__list,
.excelsior_currency_converter-pos-top-right .excelsior_currency_converter-flags__list {
  left: auto;
  right: 0;
}
.excelsior_currency_converter-flags__list li {
  margin: 0;
}
.excelsior_currency_converter-flags__option {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.6em;
  border-radius: 6px;
  color: var(--excelsior_currency_converter-text);
  text-decoration: none;
  white-space: nowrap;
}
.excelsior_currency_converter-flags__option:hover,
.excelsior_currency_converter-flags__option:focus {
  background: var(--excelsior_currency_converter-accent-soft);
}
.excelsior_currency_converter-flags__option.is-active {
  background: #eef6ee;
}
.excelsior_currency_converter-flags__symbol {
  color: var(--excelsior_currency_converter-muted);
  margin-left: auto;
  padding-left: 1em;
}
.excelsior_currency_converter-flag {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.25em;
  height: 0.9375em;
  object-fit: cover;
  vertical-align: middle;
}
/* The flags style is self-contained; hide the wrapper label. */
.excelsior_currency_converter-mode-flags .excelsior_currency_converter-switcher__title {
  font-weight: 600;
}

/* ---------------- "In the navigation menu" placement ---------------- */
/* The switcher is appended as a list item in the primary nav (after the last
   item). The nav is a flex list, so this keeps it inline with the menu. */
.excelsior_currency_converter-nav-switcher {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0 0.9em;
  padding: 0;
  list-style: none;
}
.excelsior_currency_converter-nav-switcher .excelsior_currency_converter-switcher {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* ---------------- Floating switcher ---------------- */
.excelsior_currency_converter-floating-switcher {
  position: fixed;
  z-index: 99999;
  background: #fff;
  padding: 0.35em 0.45em;
  border-radius: var(--excelsior_currency_converter-pill);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.15);
  font-size: 0.8em;
}
.excelsior_currency_converter-floating-switcher .excelsior_currency_converter-switcher__title {
  display: none;
}
.excelsior_currency_converter-floating-switcher .excelsior_currency_converter-switcher {
  gap: 0;
}
.excelsior_currency_converter-floating-switcher.excelsior_currency_converter-pos-bottom-right {
  right: 1em;
  bottom: 1em;
}
.excelsior_currency_converter-floating-switcher.excelsior_currency_converter-pos-bottom-left {
  left: 1em;
  bottom: 1em;
}
.excelsior_currency_converter-floating-switcher.excelsior_currency_converter-pos-top-right {
  right: 1em;
  top: 1em;
}
.excelsior_currency_converter-floating-switcher.excelsior_currency_converter-pos-top-left {
  left: 1em;
  top: 1em;
}
.excelsior_currency_converter-floating-switcher .excelsior_currency_converter-switcher__select {
  min-width: 5em;
  padding-top: 0.35em;
  padding-bottom: 0.35em;
}

/* ---------------- "Both" display mode ---------------- */
.excelsior_currency_converter-base-price {
  color: #666;
  font-size: 0.95em;
  white-space: nowrap;
}
.excelsior_currency_converter-approx {
  color: #999;
  margin: 0 0.25em;
}
.excelsior_currency_converter-base-price,
.woocommerce-Price-amount {
  white-space: nowrap;
}

/* ---------------- Notices / disclaimers ---------------- */
.excelsior_currency_converter-notice {
  margin: 0.25em 0;
  color: #a00;
  font-size: 0.85em;
}
.excelsior_currency_converter-disclaimer {
  margin-top: 0.5em;
  color: #555;
  font-size: 0.85em;
}
.excelsior_currency_converter-blocks-disclaimer {
  max-width: 1200px;
  margin: 1em auto;
  padding: 0 1em;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 480px) {
  .excelsior_currency_converter-switcher__select {
    min-width: 100%;
  }
  .excelsior_currency_converter-switcher__buttons {
    width: 100%;
  }
  .excelsior_currency_converter-switcher__button {
    flex: 1 1 auto;
    justify-content: center;
  }
  .excelsior_currency_converter-header-switcher {
    display: block;
    margin: 0.5em 1em;
  }
  .excelsior_currency_converter-floating-switcher {
    right: 0.5em;
    bottom: 0.5em;
    left: 0.5em;
    top: auto;
  }
}

@media (max-width: 544px) {
  .excelsior_currency_converter-nav-switcher {
    margin-left: 0;
    width: 100%;
    padding: 0.25em 0;
  }
}

/* ---------------- Theme-proofing ---------------- */
/* Some themes (e.g. Astra) restyle every <button> — square border-radius,
   border, background, focus outline — which renders as a "box" around the
   currency selector. These high-specificity !important rules force the
   selector to stay a clean pill regardless of the active theme. */

.excelsior_currency_converter-select__toggle,
.excelsior_currency_converter-flags__toggle {
  border-radius: 999px !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: none;
  -webkit-appearance: none;
}
.excelsior_currency_converter-select__toggle:hover,
.excelsior_currency_converter-select__toggle:focus,
.excelsior_currency_converter-select.is-open .excelsior_currency_converter-select__toggle,
.excelsior_currency_converter-flags__toggle:hover,
.excelsior_currency_converter-flags__toggle:focus,
.excelsior_currency_converter-flags.is-open .excelsior_currency_converter-flags__toggle {
  border-radius: 999px !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
}
