/* ==========================================================================
   Multi-Currency — Admin + Frontend Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Frontend: currency switcher dropdown
   -------------------------------------------------------------------------- */

.sc-currency-switcher {
    position: relative;
    display: inline-block;
    font-size: .9rem;
    user-select: none;
}

/* Trigger button */
.sc-cs-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: inherit;
    color: inherit;
    white-space: nowrap;
    transition: border-color .15s, box-shadow .15s;
}

.sc-cs-trigger:hover,
.sc-currency-switcher.sc-cs-open .sc-cs-trigger {
    border-color: #aaa;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.sc-cs-arrow {
    /* Force Material Symbols font regardless of theme resets */
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Required for ligature-based icon names like "expand_more" */
    font-feature-settings: 'liga';
    font-variant-ligatures: discretionary-ligatures;
    font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    opacity: .7;
    margin-left: 2px;
    vertical-align: middle;
    display: inline-block;
    transition: transform .15s;
}

.sc-currency-switcher.sc-cs-open .sc-cs-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.sc-cs-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 9999;
    min-width: 100%;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    max-height: 280px;
    overflow-y: auto;
}

.sc-currency-switcher.sc-cs-open .sc-cs-panel {
    display: block;
}

/* Option items */
.sc-cs-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .1s;
}

.sc-cs-option:hover {
    background: #f5f5f5;
}

.sc-cs-option.sc-cs-active {
    background: #eef4ff;
    font-weight: 600;
}

/* Flag icon sizing */
.sc-cs-trigger .fi,
.sc-cs-option .fi {
    width: 1.25em;
    height: 1em;
    border-radius: 2px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Admin: currencies table
   -------------------------------------------------------------------------- */

.sc-mc-currencies-wrap {
    max-width: 1200px;
}

.sc-mc-table {
    border-collapse: collapse;
}

.sc-mc-table th,
.sc-mc-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.sc-mc-table td input[type="text"],
.sc-mc-table td input[type="number"],
.sc-mc-table td input[type="url"],
.sc-mc-table td select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Sort handle */
.sc-mc-sort-handle {
    color: #aaa;
    font-size: 1.2rem;
    user-select: none;
}

.sc-mc-sort-handle:hover {
    color: #555;
}

/* Default row highlight */
.sc-mc-default-row {
    background: #f0fdf4 !important;
}

.sc-mc-default-badge {
    color: #f59e0b;
    font-size: 1.3rem;
    line-height: 1;
}

/* New row highlight (unsaved) */
.sc-mc-new-row {
    background: #fffde7;
}

/* Effective rate cell */
.sc-mc-effective {
    color: #1565c0;
    font-weight: 600;
    white-space: nowrap;
}

/* Message feedback */
#sc-mc-msg,
#sc-mc-settings-msg {
    display: inline-block;
    transition: opacity .3s;
}

/* Print: currency note */
@media print {
    .sc-print-currency {
        font-size: .8em;
        color: #555;
        margin: 0 0 4px;
    }
}
