/* ====================================================
   WooCommerce Multi Currency Pro — Frontend Styles
   ==================================================== */

/* ── Switcher wrapper ── */
.wmc-switcher {
    position: relative;
    display: inline-flex;
}

/* ── Trigger button ── */
.wmc-curr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    letter-spacing: 0.02em;
    transition: background .15s, border-color .15s, box-shadow .15s;
    white-space: nowrap;
}
.wmc-curr-btn:hover {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.35);
}
.wmc-flag { font-size: 18px; line-height: 1; display:inline-flex; align-items:center; }
.wmc-flag-img { width:24px; height:18px; object-fit:cover; border-radius:2px; display:inline-block; vertical-align:middle; box-shadow:0 0 0 1px rgba(0,0,0,.08); }
.wmc-chevron { transition: transform .22s ease; flex-shrink: 0; }
.wmc-curr-btn.open .wmc-chevron { transform: rotate(180deg); }

/* ── Dropdown panel ── */
.wmc-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 99999;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 14px;
    padding: 8px;
    width: 260px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
    animation: wmcFadeIn .18s ease;
}
.wmc-dropdown.open { display: block; }
@keyframes wmcFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Search box inside dropdown ── */
.wmc-search-wrap { padding: 2px 2px 6px; }
.wmc-search {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: #f8f8f8;
    transition: border-color .15s;
    box-sizing: border-box;
}
.wmc-search:focus { border-color: #3b82f6; background: #fff; }

/* ── Scrollable list ── */
#wmcList {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
}
#wmcList::-webkit-scrollbar { width: 4px; }
#wmcList::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* ── Each option ── */
.wmc-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
    color: #111;
    outline: none;
}
.wmc-option:hover,
.wmc-option:focus { background: #f2f4f8; }
.wmc-option.wmc-active { background: #eff6ff; }
.wmc-option.wmc-active .wmc-opt-name { color: #1d4ed8; font-weight: 600; }
.wmc-option.wmc-hidden { display: none; }
.wmc-opt-flag { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; display:inline-flex; align-items:center; justify-content:center; }
.wmc-option-flag-img { width:24px; height:18px; }
.wmc-opt-info { flex: 1; min-width: 0; }
.wmc-opt-name { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wmc-opt-rate { display: block; font-size: 11px; color: #888; margin-top: 1px; }
.wmc-opt-sym { font-size: 13px; font-weight: 700; color: #555; flex-shrink: 0; }

/* ── Location toast ── */
.wmc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #1e293b;
    color: #fff;
    border-radius: 50px;
    font-size: 13px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.25);
    white-space: nowrap;
    animation: wmcSlideUp .4s cubic-bezier(.22,1,.36,1);
}
@keyframes wmcSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.wmc-toast-flag { font-size: 20px; display:inline-flex; align-items:center; }
.wmc-toast-flag-img { width:24px; height:18px; }
.wmc-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 14px;
    padding: 0 0 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.wmc-toast-close:hover { color: #fff; }

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
    .wmc-curr-btn { border-color: rgba(255,255,255,0.22); color: #f0f0f0; }
    .wmc-curr-btn:hover { background: rgba(255,255,255,0.08); }
    .wmc-dropdown { background: #1a1d23; border-color: rgba(255,255,255,0.1); }
    .wmc-search { background: #2a2d35; border-color: rgba(255,255,255,0.1); color: #f0f0f0; }
    .wmc-option { color: #e8e8e8; }
    .wmc-option:hover, .wmc-option:focus { background: #2a2d35; }
    .wmc-option.wmc-active { background: #1e3a8a40; }
    .wmc-opt-rate { color: #aaa; }
    .wmc-opt-sym { color: #bbb; }
}
