/* =============================================
   WooCommerce Live Currency Switcher — Frontend
   ============================================= */

.wcs-switcher {
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
}

/* ─── Dropdown toggle button ──────────────── */
.wcs-dropdown-wrap {
    position: relative;
    z-index: 9999;
}

.wcs-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 8px 12px 8px 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    white-space: nowrap;
    transition: border-color 0.18s, box-shadow 0.18s;
    user-select: none;
}

.wcs-dropdown-toggle:hover,
.wcs-dropdown-toggle:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
    outline: none;
}

.wcs-current-code {
    font-weight: 700;
    letter-spacing: 0.03em;
}

.wcs-current-symbol {
    color: #888;
    font-size: 13px;
    font-weight: 400;
}

/* Bigger flag in toggle button */
.wcs-dropdown-toggle .wcs-flag-text,
.wcs-dropdown-toggle > span:first-child {
    font-size: 20px;
    line-height: 1;
}

.wcs-chevron {
    transition: transform 0.2s ease;
    opacity: 0.55;
    flex-shrink: 0;
}

.wcs-dropdown-wrap.wcs-open .wcs-chevron {
    transform: rotate(180deg);
}

/* ─── Dropdown menu ───────────────────────── */
.wcs-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.13);
    list-style: none;
    margin: 0;
    padding: 5px 0;
    z-index: 99999;
    max-height: 340px;
    overflow-y: auto;
}

.wcs-dropdown-wrap.wcs-open .wcs-dropdown-menu {
    display: block;
    animation: wcsDrop 0.14s ease;
}

@keyframes wcsDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wcs-dropdown-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wcs-dropdown-menu .wcs-switch {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.12s;
    gap: 10px;
    cursor: pointer;
    box-shadow: none;
    border: none;
}

.wcs-dropdown-menu .wcs-switch:hover {
    background: #f4f8fb;
    color: #0073aa;
    text-decoration: none;
}

/* Active = blue highlight, no checkmark */
.wcs-dropdown-menu .wcs-switch.wcs-active {
    background: #e8f4fb;
    color: #005c87;
}

.wcs-dropdown-menu .wcs-switch.wcs-active .wcs-item-left strong {
    color: #005c87;
}

/* ─── Hide checkmark & rate completely ────── */
.wcs-checkmark,
.wcs-item-rate,
.wcs-item-right {
    display: none !important;
}

/* ─── Item layout ─────────────────────────── */
.wcs-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Bigger flag emoji in dropdown rows */
.wcs-item-left > span:first-child {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.wcs-item-left strong {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    min-width: 36px;
}

.wcs-item-name {
    color: #777;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Button style ────────────────────────── */
.wcs-buttons-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wcs-btn-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    font-weight: 600;
    transition: all 0.15s;
    white-space: nowrap;
}

.wcs-btn-switch:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f4f8fb;
}

.wcs-btn-switch.wcs-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* ─── Loading state ───────────────────────── */
.wcs-switcher.wcs-loading {
    pointer-events: none;
    opacity: 0.55;
    cursor: wait;
}
