/* WD Multi Currency - Frontend Styles */

/* ========================================
   Base styles
   ======================================== */
.wdmc-switcher {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    z-index: 999;
}

.wdmc-flag {
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
}

.wdmc-code {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.wdmc-symbol {
    color: #666;
    font-size: 12px;
    margin-left: 2px;
}

.wdmc-name {
    color: #888;
    font-size: 12px;
    margin-left: 4px;
}

/* ========================================
   Dropdown style
   ======================================== */
.wdmc-dropdown .wdmc-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 90px;
}

.wdmc-dropdown .wdmc-selected:hover {
    border-color: #999;
}

.wdmc-dropdown .wdmc-selected:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.wdmc-dropdown .wdmc-arrow {
    margin-left: auto;
    font-size: 11px;
    color: #999;
    transition: transform 0.2s;
}

.wdmc-dropdown.wdmc-open .wdmc-arrow {
    transform: rotate(180deg);
}

.wdmc-dropdown .wdmc-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 4px;
    z-index: 1000;
}

.wdmc-dropdown .wdmc-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    white-space: nowrap;
    margin: 0;
    list-style: none;
}

.wdmc-dropdown .wdmc-option:hover {
    background: #f0f6fc;
}

.wdmc-dropdown .wdmc-option.wdmc-active {
    background: #e8f0fe;
    font-weight: 600;
}

/* ========================================
   Inline buttons style
   ======================================== */
.wdmc-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.wdmc-inline .wdmc-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.wdmc-inline .wdmc-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
}

.wdmc-inline .wdmc-btn.wdmc-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.wdmc-inline .wdmc-btn.wdmc-active .wdmc-flag {
    filter: none;
}

/* ========================================
   Compact inline style
   ======================================== */
.wdmc-compact {
    display: flex;
    gap: 2px;
    align-items: center;
    background: #f3f3f3;
    border-radius: 6px;
    padding: 2px;
}

.wdmc-compact .wdmc-btn-compact {
    padding: 4px 10px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}

.wdmc-compact .wdmc-btn-compact:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
}

.wdmc-compact .wdmc-btn-compact.wdmc-active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========================================
   List style
   ======================================== */
.wdmc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wdmc-list .wdmc-list-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wdmc-list .wdmc-list-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    text-align: left;
    transition: background 0.15s;
}

.wdmc-list .wdmc-list-btn:hover {
    background: #f5f5f5;
}

.wdmc-list .wdmc-active .wdmc-list-btn {
    background: #f0f6fc;
    font-weight: 600;
}

.wdmc-list .wdmc-check {
    margin-left: auto;
    color: #2271b1;
}

/* ========================================
   Floating widget
   ======================================== */
.wdmc-floating {
    position: fixed;
    z-index: 9990;
}

.wdmc-float-bottom_left {
    bottom: 150px;
    left: 20px;
}

.wdmc-float-bottom_right {
    bottom: 150px;
    right: 20px;
}

.wdmc-float-top_left {
    top: 80px;
    left: 20px;
}

.wdmc-float-top_right {
    top: 80px;
    right: 20px;
}

.wdmc-floating .wdmc-dropdown .wdmc-selected {
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

/* ========================================
   Product page switcher
   ======================================== */
.wdmc-product-switcher {
    margin: 8px 0;
}

/* ========================================
   Rates table
   ======================================== */
.wdmc-rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wdmc-rates-table th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.wdmc-rates-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.wdmc-rates-table tr:hover td {
    background: #fafafa;
}

.wdmc-rates-updated {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* ========================================
   Checkout notice
   ======================================== */
.wdmc-checkout-notice {
    margin-bottom: 20px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .wdmc-dropdown .wdmc-selected {
        padding: 6px 10px;
        font-size: 13px;
    }

    .wdmc-dropdown .wdmc-options {
        min-width: 180px;
    }

    .wdmc-inline .wdmc-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .wdmc-floating {
        bottom: 10px !important;
        left: 10px !important;
        right: auto !important;
    }
}

/* ========================================
   Dark theme support
   ======================================== */
@media (prefers-color-scheme: dark) {
    .wdmc-dropdown .wdmc-selected {
        background: #2d2d2d;
        border-color: #555;
        color: #eee;
    }

    .wdmc-dropdown .wdmc-options {
        background: #2d2d2d;
        border-color: #555;
    }

    .wdmc-dropdown .wdmc-option:hover {
        background: #3a3a3a;
    }

    .wdmc-dropdown .wdmc-option.wdmc-active {
        background: #1a3a5c;
    }

    .wdmc-compact {
        background: #3a3a3a;
    }

    .wdmc-compact .wdmc-btn-compact.wdmc-active {
        background: #2d2d2d;
        color: #eee;
    }
}

/* Animation */
.wdmc-switching {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s;
}
