/* ============================================================================
   REEID Translate: Language Switcher Styles
============================================================================ */

/* --- Base Dropdown --- */
.reeid-dropdown {
  position: relative;
  display: inline-block;
  font-family: sans-serif;
  z-index: 9999;
}

.reeid-dropdown__btn {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.75em;
  font-size: 0.875rem;
  background: #fff;
  color: #222;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reeid-dropdown__btn:hover {
  background: #f5f5f5;
}

.reeid-dropdown__btn .reeid-flag-img {
  width: 1.25em;
  height: auto;
  flex-shrink: 0;
}

.reeid-dropdown__btn-label {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reeid-dropdown__btn-arrow {
  font-size: 0.75em;
}

.reeid-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.3em;
  padding: 0.3em 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.reeid-dropdown__link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  color: #222;
  text-decoration: none;
  transition: background 0.2s ease;
}

.reeid-dropdown__link:hover {
  background: #f2f2f2;
  color: #000;
}

.reeid-dropdown__link .reeid-flag-img {
  width: 1.25em;
}

.reeid-dropdown__label {
  white-space: nowrap;
}

/* ============================================================================
   STYLES
============================================================================ */

/* --- Default --- */
.reeid-style-default .reeid-dropdown__btn {
  background: #fff;
  border: 1px solid #ccc;
}

/* --- Compact --- */
.reeid-style-compact .reeid-dropdown__btn {
  padding: 0.3em 0.6em;
  font-size: 0.82rem;
  gap: 0.4em;
}

.reeid-style-compact .reeid-dropdown__menu {
  min-width: 140px;
}

/* --- Minimal --- */
.reeid-style-minimal .reeid-dropdown__btn {
  background: transparent;
  border: none;
  padding: 0.3em 0.5em;
  color: #333;
}

.reeid-style-minimal .reeid-dropdown__menu {
  border: 1px solid #ddd;
}

/* --- Outline --- */
.reeid-style-outline .reeid-dropdown__btn {
  border: 2px solid #111;
  font-weight: 600;
}

/* --- Pill --- */
.reeid-style-pill .reeid-dropdown__btn {
  border-radius: 999px;
  background: #eee;
  padding: 0.4em 1em;
}

/* --- Flat --- */
.reeid-style-flat .reeid-dropdown__btn {
  background: #f9f9f9;
  border: 1px solid #ddd;
  box-shadow: none;
}

.reeid-style-flat .reeid-dropdown__menu {
  box-shadow: none;
  border: 1px solid #ddd;
}

/* --- Glass / Blur --- */
.reeid-style-glass .reeid-dropdown__btn,
.reeid-style-glass .reeid-dropdown__menu {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 200, 200, 0.4);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}



/* Ensure flag remains visible and clean */
.reeid-style-icon .reeid-flag-img {
  width: 28px !important;
  height: 20px !important;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 0 1px rgba(0,0,0,0.1);
}


/* ============================================================================
   THEMES
============================================================================ */

/* --- Light --- */
.reeid-theme-light .reeid-dropdown__btn,
.reeid-theme-light .reeid-dropdown__menu {
  background: #fff;
  color: #222;
  border-color: #ccc;
}

/* --- Dark --- */
.reeid-theme-dark .reeid-dropdown__btn,
.reeid-theme-dark .reeid-dropdown__menu {
  background: #222;
  color: #eee;
  border-color: #444;
}

.reeid-theme-dark .reeid-dropdown__link {
  color: #eee;
}

.reeid-theme-dark .reeid-dropdown__link:hover {
  background: #333;
  color: #fff;
}

/* --- Auto (match system) --- */
@media (prefers-color-scheme: dark) {
  .reeid-theme-auto .reeid-dropdown__btn,
  .reeid-theme-auto .reeid-dropdown__menu {
    background: #222;
    color: #eee;
    border-color: #444;
  }

  .reeid-theme-auto .reeid-dropdown__link {
    color: #eee;
  }

  .reeid-theme-auto .reeid-dropdown__link:hover {
    background: #333;
    color: #fff;
  }
}

/* ============================================================================
   FIXES
============================================================================ */

/* Prevent fading on hover (current button) */
.reeid-dropdown:hover .reeid-dropdown__btn {
  background: inherit !important;
  color: inherit !important;
}


/* REEID Woo cart/checkout switcher compatibility */
.reeid-switcher-cart,
.reeid-switcher-checkout {
  margin: 6px 0 16px;
  text-align: right;
}

.reeid-switcher-cart a,
.reeid-switcher-checkout a {
  text-decoration: none;
}

.reeid-switcher-cart a.active,
.reeid-switcher-checkout a.active,
.reeid-lang-switcher a.active {
  font-weight: 600;
  text-decoration: underline;
}

.reeid-switcher-cart .sep,
.reeid-switcher-checkout .sep,
.reeid-lang-switcher .sep {
  opacity: .6;
  margin: 0 .35em;
}

.reeid-switcher--dropdown select {
  max-width: 260px;
}