/**
 * Currency Switcher SEK - Stylesheet
 *
 * Flytande valutaväxlare i hörnet.
 */

/* === Huvudcontainer === */
.cs-switcher-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === Toggle-knapp === */
.cs-switcher-toggle {
    background: #2271b1;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    user-select: none;
}

.cs-switcher-toggle:hover {
    background: #135e96;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.cs-switcher-toggle .cs-current-currency {
    font-size: 16px;
    letter-spacing: 0.5px;
}

.cs-switcher-toggle .cs-icon {
    transition: transform 0.3s ease;
}

.cs-switcher-toggle.open .cs-icon {
    transform: rotate(180deg);
}

/* === Dropdown === */
.cs-switcher-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Header === */
.cs-switcher-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f6fc;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    color: #2271b1;
}

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

.cs-currency-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.cs-currency-item:hover {
    background: #f5f5f5;
}

.cs-currency-item.active {
    background: #e7f3ff;
}

.cs-currency-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #2271b1;
}

.cs-currency-flag {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.cs-currency-code {
    font-weight: 600;
    font-size: 14px;
    color: #1e1e1e;
    min-width: 40px;
}

.cs-currency-name {
    font-size: 13px;
    color: #666;
    flex: 1;
}

.cs-check-icon {
    color: #2271b1;
    margin-left: auto;
}

/* === Footer === */
.cs-switcher-footer {
    padding: 10px 16px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.cs-switcher-footer small {
    font-size: 11px;
    color: #999;
}

/* === Loading State === */
.cs-switcher-widget.loading .cs-switcher-toggle {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Mobile Responsive === */
@media screen and (max-width: 768px) {
    .cs-switcher-widget {
        bottom: 15px;
        right: 15px;
    }

    .cs-switcher-toggle {
        padding: 10px 14px;
        font-size: 13px;
    }

    .cs-switcher-dropdown {
        min-width: 220px;
        bottom: 55px;
    }

    .cs-currency-item {
        padding: 10px 14px;
    }
}

/* === Print - Dölj switcher === */
@media print {
    .cs-switcher-widget {
        display: none !important;
    }
}
