/* Wrist24 Currency — switcher + converted-price styling.
   Falls back gracefully when the asterion design tokens aren't present. */

/* FOUC guard: hide price amounts only until conversion completes. */
html.ac-pending .woocommerce-Price-amount.amount {
  visibility: hidden;
}

/* ---------------- Switcher ---------------- */
.ac-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.ac-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--ast-gold-border, rgba(201, 169, 110, 0.3));
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color var(--transition-fast, 0.15s ease), color var(--transition-fast, 0.15s ease);
}

.ac-switcher-toggle:hover,
.ac-switcher.ac-open .ac-switcher-toggle {
  border-color: var(--ast-gold, #C9A96E);
  color: var(--ast-gold, #C9A96E);
}

.ac-switcher-toggle .ac-current {
  white-space: nowrap;
}

.ac-chevron {
  transition: transform var(--transition-fast, 0.15s ease);
}

.ac-switcher.ac-open .ac-chevron {
  transform: rotate(180deg);
}

.ac-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ast-white, #fff);
  border: 1px solid var(--ast-gray-100, #eee);
  border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 8px 30px rgba(0, 0, 0, 0.12));
  max-height: 60vh;
  overflow-y: auto;
}

.ac-option {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ast-gray-900, #222);
  font-size: 13px;
  outline: none;
}

.ac-option:hover,
.ac-option:focus {
  background: var(--ast-gray-50, #f7f7f7);
}

.ac-option[aria-selected="true"] {
  color: var(--ast-gold-dark, #A88B52);
  font-weight: 600;
}

.ac-opt-code {
  font-weight: 700;
  min-width: 34px;
}

.ac-opt-label {
  color: var(--ast-gray-600, #666);
}

.ac-option[aria-selected="true"] .ac-opt-label {
  color: inherit;
}

/* ---------------- Converted price note ---------------- */
.ac-note {
  display: inline;
  margin-left: 6px;
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ast-gray-400, #999);
  white-space: nowrap;
}

/* Shortcode/widget mount sits inline. */
.ac-switcher-mount {
  display: inline-flex;
}

@media (max-width: 600px) {
  .ac-switcher-menu {
    min-width: 180px;
  }
  .ac-note {
    display: none; /* keep mobile price lines compact */
  }
}
