/**
 * Estilos del plugin UF Chile - Banco Central
 */

.ufcb-container {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

.ufcb-container * {
    box-sizing: border-box;
}

/* === Estilo Card === */
.ufcb-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    margin: 16px auto;
}

.ufcb-card .ufcb-label {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.ufcb-card .ufcb-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 12px 0;
}

.ufcb-card .ufcb-currency {
    font-size: 24px;
    font-weight: 400;
    opacity: 0.85;
}

.ufcb-card .ufcb-amount {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ufcb-card .ufcb-date {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 8px;
}

.ufcb-card .ufcb-source {
    font-size: 11px;
    opacity: 0.75;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ufcb-card .ufcb-source a {
    color: #fff;
    text-decoration: underline;
}

.ufcb-card .ufcb-source a:hover {
    opacity: 0.8;
}

/* === Estilo Banner === */
.ufcb-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #1e40af;
    padding: 16px 20px;
    border-radius: 6px;
    margin: 16px 0;
}

.ufcb-banner .ufcb-banner-left {
    display: flex;
    flex-direction: column;
}

.ufcb-banner .ufcb-banner-label {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
}

.ufcb-banner .ufcb-banner-date {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.ufcb-banner .ufcb-banner-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

/* === Estilo Minimal === */
.ufcb-minimal {
    display: inline-block;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 14px;
    color: #0f172a;
}

.ufcb-minimal strong {
    color: #1e40af;
    margin-right: 4px;
}

/* === Estilo Inline === */
.ufcb-inline {
    display: inline;
    font-weight: 600;
    color: #1e40af;
}

/* === Stale (datos antiguos) === */
.ufcb-stale {
    opacity: 0.85;
}

.ufcb-stale-notice {
    font-size: 11px;
    margin-top: 8px;
    color: #fbbf24;
    font-style: italic;
}

/* === Error === */
.ufcb-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #dc2626;
    font-size: 13px;
}

/* === Widget === */
.widget_ufcb .ufcb-card {
    margin: 0;
    max-width: 100%;
}

/* === Responsive === */
@media (max-width: 480px) {
    .ufcb-card {
        padding: 20px;
    }

    .ufcb-card .ufcb-amount {
        font-size: 32px;
    }

    .ufcb-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* === Modo oscuro (auto) === */
@media (prefers-color-scheme: dark) {
    .ufcb-banner {
        background: #1e293b;
        border-color: #334155;
        border-left-color: #3b82f6;
    }

    .ufcb-banner .ufcb-banner-label {
        color: #60a5fa;
    }

    .ufcb-banner .ufcb-banner-value {
        color: #f1f5f9;
    }

    .ufcb-banner .ufcb-banner-date {
        color: #94a3b8;
    }

    .ufcb-minimal {
        background: #1e293b;
        color: #f1f5f9;
    }

    .ufcb-minimal strong {
        color: #60a5fa;
    }
}
