/* =========================================================
   justcalculate.it — Rent vs. Buy calculator additions
   Uses the shared ui-card / ui-field / ui-result / ui-grid styles.
   ========================================================= */

.rent-buy-section {
    margin-top: 30px;
}

.rent-buy-section > .eyebrow {
    margin: 30px 0 12px;
}

.rent-buy-section .ui-card {
    margin-top: 0;
}

.rent-buy-section .ui-grid + .ui-grid {
    margin-top: 0;
}

.rent-buy-actions {
    margin-top: 24px;
}

.rent-buy-error {
    margin: 12px 0 0;
    color: #9b2c2c;
    font-size: 14px;
}

.rent-buy-results {
    margin-top: 48px;
}

.rent-buy-verdict {
    margin-top: 0;
}

.rent-buy-verdict > strong,
.rent-buy-result-grid .ui-result > strong {
    font-family: inherit;
    color: var(--text);
    font-size: 30px;
    font-weight: 750;
    line-height: 1.15;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.rent-buy-result-grid {
    margin-top: 14px;
}

.rent-buy-chart-card,
.rent-buy-table-card {
    margin-top: 16px !important;
}

.rent-buy-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 12px 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.rent-buy-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rent-buy-chart-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: #222;
}

.rent-buy-chart-legend .rent-buy-legend-rent {
    background: #a8a8a1;
}

.rent-buy-chart {
    display: grid;
    gap: 9px;
}

.rent-buy-chart-year {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.rent-buy-chart-year-label {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.rent-buy-chart-bars {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rent-buy-bar {
    height: 9px;
    min-width: 2px;
    border-radius: 0 5px 5px 0;
    transition: width .18s ease;
}

.rent-buy-bar-buy {
    background: #222;
}

.rent-buy-bar-rent {
    background: #a8a8a1;
}

.rent-buy-table-card .ui-table {
    min-width: 560px;
}

.rent-buy-table-card .ui-table td {
    font-variant-numeric: tabular-nums;
}

.rent-buy-positive {
    font-weight: 700;
}

.rent-buy-negative {
    color: var(--muted);
}

.rent-buy-disclaimer {
    margin-top: 16px;
}

.rent-buy-disclaimer p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 600px) {
    .rent-buy-section {
        margin-top: 24px;
    }

    .rent-buy-chart-year {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 8px;
    }
}
