/**
 * Currency Rates Widget Styles
 * Minimalist design for sidebar widgets
 */

/* Container */
.currency-widget-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.currency-widget-container {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

/* Header */
.currency-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.currency-widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.currency-widget-source {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* List */
.currency-widget-list {
    display: flex;
    flex-direction: column;
}

/* Row */
.currency-widget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.currency-widget-row:last-child {
    border-bottom: none;
}

.currency-widget-row:hover {
    background-color: #f8f9fa;
}

/* Currency Info */
.currency-widget-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-widget-flag {
    font-size: 24px;
    line-height: 1;
}

.currency-widget-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-widget-code {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.currency-widget-name {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

/* Rate Display */
.currency-widget-rate {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.currency-widget-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.currency-widget-change {
    font-size: 12px;
    line-height: 1.2;
}

.currency-widget-change .change-value {
    color: #999;
}

.currency-widget-change.positive .change-value {
    color: #28a745;
}

.currency-widget-change.positive .change-value::before {
    content: '+';
}

.currency-widget-change.negative .change-value {
    color: #dc3545;
}

/* Loading State */
.loading-dots {
    color: #999;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* Footer */
.currency-widget-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.currency-widget-update {
    font-size: 11px;
    color: #999;
}

/* Loading State */
.currency-widget-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Compact Variation */
.currency-widget-wrapper.compact .currency-widget-row {
    padding: 10px 16px;
}

.currency-widget-wrapper.compact .currency-widget-flag {
    font-size: 20px;
}

.currency-widget-wrapper.compact .currency-widget-code {
    font-size: 13px;
}

.currency-widget-wrapper.compact .currency-widget-name {
    font-size: 11px;
}

.currency-widget-wrapper.compact .currency-widget-value {
    font-size: 14px;
}

.currency-widget-wrapper.compact .currency-widget-change {
    font-size: 11px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .currency-widget-container {
        background: #1a1a1a;
        border-color: #333;
    }

    .currency-widget-header {
        background: #222;
        border-color: #333;
    }

    .currency-widget-title {
        color: #ffffff;
    }

    .currency-widget-row {
        border-color: #333;
    }

    .currency-widget-row:hover {
        background-color: #222;
    }

    .currency-widget-code {
        color: #ffffff;
    }

    .currency-widget-name {
        color: #999;
    }

    .currency-widget-value {
        color: #ffffff;
    }

    .currency-widget-footer {
        background: #222;
        border-color: #333;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .currency-widget-header {
        padding: 14px;
    }

    .currency-widget-row {
        padding: 12px 14px;
    }

    .currency-widget-flag {
        font-size: 20px;
    }

    .currency-widget-code {
        font-size: 13px;
    }

    .currency-widget-value {
        font-size: 14px;
    }
}
