/* inflacion-divisa — estilos específicos */

.flag-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.flag-emoji {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.currency-pair-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: start;
    margin: 1.25rem 0;
}

.pair-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
    color: var(--text-muted, #94a3b8);
    font-size: 1.25rem;
}

.currency-block {
    background: var(--bg-alt, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
}

.currency-block h3 {
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.75rem;
}

.currency-block.block-base h3 {
    color: #16a34a;
}

.currency-block.block-quote h3 {
    color: #dc2626;
}

.currency-block label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--text, #1e293b);
    margin-bottom: 0.3rem;
    margin-top: 0.65rem;
}

.currency-block label:first-of-type {
    margin-top: 0;
}

.currency-block select,
.currency-block input[type="number"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text, #1e293b);
    background: #fff;
    transition: border-color 0.16s, box-shadow 0.16s;
    box-sizing: border-box;
}

.currency-block select:focus,
.currency-block input[type="number"]:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.infl-suffix {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.infl-suffix input[type="number"] {
    flex: 1;
}

.infl-suffix span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    font-family: 'Ubuntu', monospace, sans-serif;
    flex-shrink: 0;
}

/* horizonte temporal */
.horizon-config {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: var(--bg-alt, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    margin: 1.25rem 0;
    flex-wrap: wrap;
}

.horizon-config label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #1e293b);
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.horizon-config input[type="range"] {
    flex: 1;
    min-width: 120px;
    accent-color: var(--primary, #2563eb);
    cursor: pointer;
}

.horizon-config .range-val {
    font-family: 'Ubuntu', monospace, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary, #2563eb);
    min-width: 60px;
    text-align: right;
}

/* dashboard de resultados */
.results-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dash-card {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    background: #fff;
    text-align: center;
}

.dash-card.dash-primary {
    border-color: var(--primary, #2563eb);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(99, 102, 241, 0.05));
}

.dash-card.dash-deprecia {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

.dash-card.dash-aprecia {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.04);
}

.dash-card .dash-icon {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
    color: var(--primary, #2563eb);
}

.dash-card.dash-deprecia .dash-icon {
    color: #dc2626;
}

.dash-card.dash-aprecia .dash-icon {
    color: #16a34a;
}

.dash-card .dash-val {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: 'Ubuntu', monospace, sans-serif;
    color: var(--text, #1e293b);
    line-height: 1.1;
}

.dash-card.dash-primary .dash-val {
    font-size: 1.7rem;
    color: var(--primary, #2563eb);
}

.dash-card.dash-deprecia .dash-val {
    color: #dc2626;
}

.dash-card.dash-aprecia .dash-val {
    color: #16a34a;
}

.dash-card .dash-label {
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.dash-card .dash-sub {
    font-size: 0.73rem;
    color: var(--text-muted, #94a3b8);
    font-family: 'Montserrat', sans-serif;
    margin-top: 0.2rem;
}

/* desglose */
.cost-breakdown {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.cost-breakdown-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    background: var(--primary, #2563eb);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.1rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
}

.cost-row:last-child {
    border-bottom: none;
}

.cost-row:nth-child(even) {
    background: var(--bg-alt, #f8fafc);
}

.cost-row .cr-label {
    color: var(--text-muted, #64748b);
    font-weight: 600;
}

.cost-row .cr-val {
    font-family: 'Ubuntu', monospace, sans-serif;
    font-weight: 700;
    color: var(--text, #1e293b);
}

.cost-row.cr-total {
    background: rgba(37, 99, 235, 0.06);
    font-weight: 700;
}

.cost-row.cr-total .cr-label {
    color: var(--text, #1e293b);
    font-size: 0.9rem;
}

.cost-row.cr-total .cr-val {
    color: var(--primary, #2563eb);
    font-size: 1.05rem;
}

.cr-val.val-down {
    color: #dc2626;
}

.cr-val.val-up {
    color: #16a34a;
}

/* tabla proyección anual */
.proj-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    margin-bottom: 1.25rem;
}

.proj-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    min-width: 480px;
}

.proj-table-wrap thead {
    background: var(--primary, #2563eb);
    color: #fff;
}

.proj-table-wrap thead th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.proj-table-wrap thead th:not(:first-child) {
    text-align: right;
}

.proj-table-wrap tbody tr:nth-child(even) {
    background: var(--bg-alt, #f8fafc);
}

.proj-table-wrap tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.proj-table-wrap tbody td {
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    font-family: 'Montserrat', sans-serif;
    vertical-align: middle;
    color: var(--text, #1e293b);
}

.proj-table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.proj-table-wrap tbody td:not(:first-child) {
    text-align: right;
    font-family: 'Ubuntu', monospace, sans-serif;
}

.proj-table-wrap tbody td.td-down {
    color: #dc2626;
    font-weight: 700;
}

.proj-table-wrap tbody td.td-up {
    color: #16a34a;
    font-weight: 700;
}

/* escenarios preset */
.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 1rem;
}

.preset-chips span {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    align-self: center;
}

.pchip {
    padding: 0.28rem 0.7rem;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 20px;
    background: transparent;
    color: var(--text, #1e293b);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.14s;
    white-space: nowrap;
}

.pchip:hover {
    border-color: var(--primary, #2563eb);
    background: var(--primary, #2563eb);
    color: #fff;
}

/* alerta interpretación */
.interp-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: 1px solid;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
    line-height: 1.55;
}

.interp-box.interp-warn {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.25);
    color: #7f1d1d;
}

.interp-box.interp-ok {
    background: rgba(22, 163, 74, 0.05);
    border-color: rgba(22, 163, 74, 0.25);
    color: #14532d;
}

.interp-box.interp-neutral {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
}

.interp-box i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

@media (max-width: 680px) {
    .currency-pair-grid {
        grid-template-columns: 1fr;
    }

    .pair-divider {
        padding-top: 0;
        transform: rotate(90deg);
    }

    .results-dashboard {
        grid-template-columns: 1fr 1fr;
    }

    .results-dashboard .dash-primary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 400px) {
    .results-dashboard {
        grid-template-columns: 1fr;
    }
}