/* Rent vs Buy Calculator Specific Styles */

/* Section Headers */
.section-header {
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-results-border);
}

.section-header h3 {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Form hint text */
.form-hint {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* Results Comparison Section */
.comparison-highlight {
    background: linear-gradient(to bottom right, #003049, #00436b);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
}

.comparison-header {
    text-align: center;
    margin-bottom: 20px;
}

.comparison-header h4 {
    font-size: 16px;
    color: #bae6fd;
    margin-bottom: 8px;
}

.comparison-result {
    font-size: 24px;
    font-weight: bold;
}

.comparison-result.buy-better {
    color: #86efac;
}

.comparison-result.rent-better {
    color: #fcd34d;
}

.comparison-savings {
    font-size: 14px;
    color: #bae6fd;
    margin-top: 4px;
}

/* Cost Comparison Boxes */
.cost-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.cost-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.cost-box h5 {
    font-size: 14px;
    color: #bae6fd;
    margin-bottom: 8px;
}

.cost-amount {
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.cost-box.buying .cost-amount {
    color: #93c5fd;
}

.cost-box.renting .cost-amount {
    color: #fde68a;
}

/* Breakeven Section */
.breakeven-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(186, 230, 253, 0.2);
    text-align: center;
}

.breakeven-section h5 {
    font-size: 14px;
    color: #bae6fd;
    margin-bottom: 8px;
}

.breakeven-value {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

/* Cost Details Section */
.cost-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.details-column h4 {
    color: #003049;
    margin-bottom: 16px;
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #bae6fd;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.detail-item span:first-child {
    color: #666;
}

.detail-item span:last-child {
    font-weight: 500;
    color: #003049;
}

.detail-item.total {
    border-top: 1px solid #ddd;
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 600;
}

.detail-item.equity {
    color: #16a34a;
}

.detail-item.equity span:last-child {
    color: #16a34a;
}

.detail-item.net-cost {
    background: rgba(0, 48, 73, 0.05);
    padding: 8px;
    margin: 0 -8px;
    border-radius: 4px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

th, td {
    padding: 10px 8px;
    text-align: right;
    border: 1px solid #bae6fd;
}

th {
    background-color: rgba(0, 48, 73, 0.05);
    font-weight: 600;
    text-align: center;
    color: #003049;
    font-size: 13px;
}

th:first-child {
    text-align: left;
}

td:first-child {
    text-align: left;
    font-weight: 500;
}

tr:nth-child(even) {
    background-color: rgba(186, 230, 253, 0.1);
}

tr:hover {
    background-color: rgba(186, 230, 253, 0.2);
}

/* Better indicator in table */
.better-option {
    color: #16a34a;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .cost-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cost-comparison {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .comparison-result {
        font-size: 20px;
    }

    .cost-amount {
        font-size: 18px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .section-header {
        margin: 20px 0 12px 0;
    }

    .section-header h3 {
        font-size: 16px;
    }
}
