/**
 * FOX – Currency Switcher Professional (WOOCS) — Fragvault topbar styles
 * Matches .currency from theme design (code + chevron, dark dropdown).
 */

.fragvault-currency-switcher,
.fragvault-currency-switcher.currency {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  z-index: 40;
}

/* Chevron like static HTML .currency button */
.fragvault-currency-switcher::after {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.fragvault-currency-switcher:hover {
  color: var(--text-secondary);
}

.fragvault-currency-switcher:hover::after {
  opacity: 0.75;
}

/* Hide plugin version/debug nodes */
.fragvault-currency-switcher .woocs_display_none {
  display: none !important;
}

/* --- Default form + native select --- */
.fragvault-currency-switcher .woocommerce-currency-switcher-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.fragvault-currency-switcher select.woocommerce-currency-switcher,
.fragvault-currency-switcher .woocs_drop_down_view {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-block;
  min-width: 3.5ch;
  max-width: 120px;
  height: auto;
  margin: 0;
  padding: 8px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.fragvault-currency-switcher select.woocommerce-currency-switcher:hover,
.fragvault-currency-switcher select.woocommerce-currency-switcher:focus {
  color: var(--text-secondary);
  outline: none;
}

.fragvault-currency-switcher select.woocommerce-currency-switcher option {
  background: #12161d;
  color: var(--text-primary);
}

/* --- Chosen.js skin (if plugin uses it) --- */
.fragvault-currency-switcher .chosen-container {
  font-family: var(--font-family);
  font-size: 0.9375rem;
  min-width: 0 !important;
  width: auto !important;
}

.fragvault-currency-switcher .chosen-container-single .chosen-single {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 0;
  padding: 8px 4px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-primary) !important;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
}

.fragvault-currency-switcher .chosen-container-single .chosen-single span {
  margin-right: 0;
}

.fragvault-currency-switcher .chosen-container-single .chosen-single div {
  display: none;
}

.fragvault-currency-switcher .chosen-container .chosen-drop {
  margin-top: 8px;
  background: #12161d;
  border: 1px solid #2a2d3a;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  min-width: 140px;
}

.fragvault-currency-switcher .chosen-container .chosen-results {
  margin: 0;
  padding: 8px;
  max-height: 200px;
}

.fragvault-currency-switcher .chosen-container .chosen-results li {
  max-height: 40px;
  line-height: 40px;
  padding: 0 12px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.fragvault-currency-switcher .chosen-container .chosen-results li.highlighted,
.fragvault-currency-switcher .chosen-container .chosen-results li.result-selected {
  background: rgba(123, 97, 255, 0.2) !important;
  color: var(--text-primary) !important;
}

/* --- ddSlick dropdown --- */
.fragvault-currency-switcher .dd-container {
  width: auto !important;
}

.fragvault-currency-switcher .dd-select {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  min-width: 0 !important;
  width: auto !important;
}

.fragvault-currency-switcher .dd-selected {
  padding: 8px 4px !important;
  color: var(--text-primary) !important;
  font-family: var(--font-family);
  font-size: 0.9375rem !important;
  font-weight: 500;
  background: transparent !important;
}

.fragvault-currency-switcher .dd-pointer {
  display: none;
}

.fragvault-currency-switcher .dd-options {
  margin-top: 8px !important;
  background: #12161d !important;
  border: 1px solid #2a2d3a !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
  max-height: 200px;
  overflow-y: auto;
}

.fragvault-currency-switcher .dd-option {
  max-height: 40px;
  padding: 0 12px !important;
  line-height: 40px !important;
  color: var(--text-primary) !important;
  background: transparent !important;
  border: none !important;
}

.fragvault-currency-switcher .dd-option:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* --- Style #1 (common FOX skin) --- */
.fragvault-currency-switcher .woocs-style-1-dropdown {
  display: inline-flex;
  align-items: center;
  width: auto !important;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
}

.fragvault-currency-switcher .woocs-style-1-dropdown:hover,
.fragvault-currency-switcher .woocs-style-1-dropdown:active,
.fragvault-currency-switcher .woocs-style-1-dropdown.woocs-style-1-active,
.fragvault-currency-switcher .woocs-style-1-dropdown.woocs-style-1-active:hover {
  background: transparent;
  box-shadow: none;
}

.fragvault-currency-switcher .woocs-style-1-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  cursor: pointer;
}

.fragvault-currency-switcher .woocs-style-1-select > span {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.fragvault-currency-switcher .woocs-style-1-select > i {
  display: none;
}

.fragvault-currency-switcher .woocs-style-1-dropdown-menu {
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  width: max-content;
  min-width: 120px;
  max-width: 220px;
  margin-top: 0;
  padding: 8px;
  list-style: none;
  background: #12161d;
  border: 1px solid #2a2d3a;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.fragvault-currency-switcher .woocs-style-1-dropdown-menu li {
  max-height: 40px;
  line-height: 40px;
  padding: 0 12px;
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  background: transparent !important;
  background-image: none !important;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.fragvault-currency-switcher .woocs-style-1-dropdown-menu li:hover,
.fragvault-currency-switcher .woocs-style-1-dropdown-menu li.woocs-style-1-selected {
  background: rgba(123, 97, 255, 0.2) !important;
  color: var(--text-primary) !important;
}

/* --- Style #2 --- */
.fragvault-currency-switcher .woocs-style-2-drop-down {
  width: auto !important;
}

.fragvault-currency-switcher .woocs-style-2-from {
  background: transparent;
  border: none;
  box-shadow: none;
}

.fragvault-currency-switcher .woocs-style-2-name {
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 8px 4px;
}

.fragvault-currency-switcher .woocs-style-2-to {
  background: #12161d;
  border: 1px solid #2a2d3a;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* --- Style #3 starter button --- */
.fragvault-currency-switcher .woocs-style-3-du-dialog-starter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  min-width: 0;
  height: auto;
  padding: 8px 4px;
  background: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-family: var(--font-family) !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.fragvault-currency-switcher .woocs-style-3-du-dialog-starter:hover {
  color: var(--text-secondary) !important;
}

/* --- Smart Designer / Selectron23 --- */
.fragvault-currency-switcher [data-woocs-sd] {
  width: auto !important;
  max-width: none;
}

.fragvault-currency-switcher .selectron23 {
  font-family: var(--font-family);
  z-index: 100;
}

.fragvault-currency-switcher .selectron23-container {
  top: calc(100% + 8px) !important;
  right: 0;
  left: auto !important;
  width: max-content !important;
  min-width: 120px;
  max-width: 220px;
  background: #12161d !important;
  border: 1px solid #2a2d3a !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}

.fragvault-currency-switcher .selectron23-container .selectron23-option {
  max-height: 40px;
  padding: 0 12px !important;
  line-height: 40px !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0 !important;
}

.fragvault-currency-switcher .selectron23-container .selectron23-option:hover,
.fragvault-currency-switcher .selectron23-container .selectron23-option[data-selected='1'] {
  background: rgba(123, 97, 255, 0.2) !important;
}

.fragvault-currency-switcher .selectron23-container > span {
  display: none !important;
}

.fragvault-currency-switcher .selectron23-option-title {
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 0.9375rem;
}

.fragvault-currency-switcher .selectron23-option-text {
  display: none;
}

.fragvault-currency-switcher .selectron23 * {
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.fragvault-currency-switcher .woocs-lds-ellipsis {
  display: none;
}

/* Flag view (compact: text only in topbar) */
.fragvault-currency-switcher.woocs_show_flags a.woocs_flag_view_item {
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 4px;
  opacity: 1;
  border-radius: var(--radius-sm);
}

.fragvault-currency-switcher.woocs_show_flags a.woocs_flag_view_item img {
  display: none;
}

.fragvault-currency-switcher.woocs_show_flags a.woocs_flag_view_item::after {
  content: attr(data-currency);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.fragvault-currency-switcher.woocs_show_flags a.woocs_flag_view_item_current {
  color: var(--purple);
  opacity: 1;
}

@media (max-width: 768px) {
  .fragvault-currency-switcher select.woocommerce-currency-switcher,
  .fragvault-currency-switcher .woocs-style-1-select > span {
    font-size: 0.875rem;
  }
}
