/* 
 * Estilos para selectores de moneda
 */

/* ===== CURRENCY SELECTOR BÁSICO ===== */
.currency-selector {
    display: inline-block;
    position: relative;
    margin-right: 0;
}

#currency-selector {
    background-color: var(--clb-fill-color);
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    appearance: none;
    padding: 4px 10px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    cursor: pointer;
    border-radius: 999px;
    width: auto;
    min-width: 68px;
    max-width: 85px;
    text-align: center;
    text-overflow: unset;
    overflow: visible;
    white-space: nowrap;
}

/* ===== SELECTOR DE DIVISAS CON BANDERAS ===== */
.custom-currency-selector {
    position: relative;
    display: inline-block;
    width: 70px;
    font-family: sans-serif;
}

.selected-option {
    display: flex;
    align-items: center;
    font-size: 13px;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 30px;
    cursor: pointer;
    border: none;
    transition: background-color var(--clb-transition-function) var(--clb-transition-duration);
}

.currency-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.options-container {
    position: absolute;
    top: 100%;
    left: 0;
    padding: 4px 0;
    z-index: 9999;
    border: none;
    border-radius: 8px;
    margin-top: 4px;
    display: none;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Estilo de cada opción en el menú */
.currency-option {
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

/* Aseguramos que el texto no se corte y se vea bien */
.currency-option span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== LIGHT MODE (por defecto) ===== */
body:not(.dark-scheme) .selected-option {
    background-color: #f6f6f6;
    color: #666;
}

body:not(.dark-scheme) .options-container {
    background: #f6f6f6;
    color: #333;
}

body:not(.dark-scheme) .currency-option {
    color: #333;
}

body:not(.dark-scheme) .currency-option:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

/* ===== DARK MODE ===== */
.dark-scheme .selected-option {
    background-color: #1e1e1e;
    color: #f1f1f1;
}

.dark-scheme .options-container {
    background: #1e1e1e;
    color: #f1f1f1;
}

.dark-scheme .currency-option {
    color: #f1f1f1;
}

.dark-scheme .currency-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}