/* DamnModz Multi-Currency Switcher */

.dmz-mc-switcher {
    position: relative;
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    z-index: 100;
    margin: 10px 0;
    user-select: none;
}

.dmz-mc-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(26, 26, 40, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 6px;
    cursor: pointer;
    color: #e5e7eb;
    transition: border-color 0.2s, background 0.2s;
    min-width: 100px;
}

.dmz-mc-selected:hover {
    border-color: rgba(220, 38, 38, 0.8);
    background: rgba(30, 30, 45, 0.95);
}

.dmz-mc-flag {
    font-size: 18px;
    line-height: 1;
}

.dmz-mc-code {
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.dmz-mc-arrow {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.6;
    transition: transform 0.2s;
}

.dmz-mc-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    margin-top: 4px;
    padding: 4px 0;
    list-style: none;
    background: rgba(18, 18, 26, 0.98);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(12px);
}

.dmz-mc-dropdown.dmz-mc-open {
    display: block;
    animation: dmzMcFadeIn 0.15s ease-out;
}

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

.dmz-mc-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    color: #d1d5db;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.dmz-mc-option:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #fff;
}

.dmz-mc-option.dmz-mc-active {
    background: rgba(220, 38, 38, 0.25);
    color: #fff;
    font-weight: 600;
}

.dmz-mc-option .dmz-mc-flag {
    font-size: 16px;
}

/* Scrollbar styling for dropdown */
.dmz-mc-dropdown::-webkit-scrollbar {
    width: 6px;
}
.dmz-mc-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.dmz-mc-dropdown::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 3px;
}

/* Smooth price transition when converting */
.dmz-mc-converting .woocommerce-Price-amount,
.dmz-mc-converting .amount,
.dmz-mc-converting bdi {
    transition: opacity 0.15s;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .dmz-mc-switcher {
        font-size: 13px;
    }
    .dmz-mc-selected {
        padding: 6px 10px;
    }
    .dmz-mc-dropdown {
        min-width: 180px;
    }
    .dmz-mc-option {
        padding: 8px 12px;
    }
}

/* Light theme fallback for non-dark sites */
@media (prefers-color-scheme: light) {
    body:not([class*="dark"]):not([data-theme="dark"]) .dmz-mc-selected {
        background: rgba(26, 26, 40, 0.95);
        color: #e5e7eb;
    }
}
