/* Hide native currency selector when currency symbol selector is active */
#_desktop_ps_currencyselector { display: none !important; }
#header #currencies-block-top { display: none; }

.mprcurrency-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mprcurrency-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255,255,255,.85);
  /* Header widget text: Small role, Label weight; the inverse colour is for
     the dark header bar and stays literal. Same tuple as mprflagselector. */
  font-family: var(--mpr-font-family, inherit);
  font-size: var(--mpr-small-font-size, 14px);
  font-weight: var(--mpr-label-font-weight, 600);
  cursor: pointer;
  transition: color var(--mprcurrency-transition, var(--mpr-transition, 0.15s ease)), background var(--mprcurrency-transition, var(--mpr-transition, 0.15s ease));
  line-height: 1;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mprcurrency-dropdown__toggle:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}

.mprcurrency-dropdown.open .mprcurrency-dropdown__toggle {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.mprcurrency-dropdown__sign {
  font-weight: var(--mpr-label-font-weight, 600);
  font-size: var(--mpr-small-font-size, 14px);
}

.mprcurrency-dropdown__iso {
  letter-spacing: 0;
  opacity: 0.85;
  font-size: var(--mpr-caption-font-size, 13px);
}

.mprcurrency-dropdown__arrow {
  font-size: 18px;
  transition: transform var(--mprcurrency-transition, var(--mpr-transition, 0.2s ease));
  line-height: 1;
}

.mprcurrency-dropdown.open .mprcurrency-dropdown__arrow {
  transform: rotate(180deg);
}

/* Dropdown menu */
.mprcurrency-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1050;
  min-width: 160px;
  margin-top: 6px;
  padding: 6px 0;
  list-style: none;
  background: var(--mprcurrency-bg, var(--mpr-bg, #fff));
  border: var(--mpr-border-width, 1px) solid var(--mprcurrency-border, var(--mpr-border, #dee2e6));
  border-radius: var(--mprcurrency-radius, var(--mpr-radius, 8px));
  box-shadow: var(--mprcurrency-shadow, var(--mpr-shadow, 0 4px 20px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.08)));
}

.mprcurrency-dropdown.open .mprcurrency-dropdown__menu {
  display: block;
}

/* Keep the header prefix to beat custom.css specificity on modern themes. */
.mprcurrency-dropdown__menu a.mprcurrency-dropdown__option,
.header-top .mprcurrency-dropdown__menu a.mprcurrency-dropdown__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: var(--mprcurrency-text, var(--mpr-text, #374151));
  font-family: var(--mpr-font-family, inherit);
  font-size: var(--mpr-small-font-size, 14px);
  font-weight: var(--mpr-small-font-weight, 500);
  line-height: var(--mpr-small-line-height, 1.428571);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--mprcurrency-transition, var(--mpr-transition, 0.12s ease)), color var(--mprcurrency-transition, var(--mpr-transition, 0.12s ease));
}

.mprcurrency-dropdown__menu a.mprcurrency-dropdown__option:hover,
.header-top .mprcurrency-dropdown__menu a.mprcurrency-dropdown__option:hover {
  background: var(--mprcurrency-bg-secondary, var(--mpr-bg-secondary, #f3f4f6));
  color: var(--mprcurrency-primary, var(--mpr-primary, #111));
  text-decoration: none;
}

.mprcurrency-dropdown__menu a.mprcurrency-dropdown__option:visited,
.header-top .mprcurrency-dropdown__menu a.mprcurrency-dropdown__option:visited {
  color: var(--mprcurrency-text, var(--mpr-text, #374151));
}

.mprcurrency-dropdown__menu a.mprcurrency-dropdown__option--active,
.header-top .mprcurrency-dropdown__menu a.mprcurrency-dropdown__option--active {
  color: var(--mprcurrency-primary, var(--mpr-primary, #111));
  font-weight: var(--mpr-label-font-weight, 600);
  background: var(--mprcurrency-bg-secondary, var(--mpr-bg-secondary, #f9fafb));
}

.mprcurrency-dropdown__option .mprcurrency-dropdown__sign {
  min-width: 18px;
  text-align: center;
  color: var(--mprcurrency-text-muted, var(--mpr-text-muted, #6b7280));
  font-size: var(--mpr-small-font-size, 14px);
}

.mprcurrency-dropdown__option--active .mprcurrency-dropdown__sign {
  color: var(--mprcurrency-primary, var(--mpr-primary, #111));
}
