/* Cost Calculator specific styles */

/* ── Summary cards row ── */
.cost-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cost-summary-card {
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.cost-summary-icon {
    font-size: 1.5rem;
    color: var(--primary, #1e40af);
    margin-bottom: 0.5rem;
}

.cost-summary-label {
    font-size: 0.85rem;
    color: var(--text-light, #64748b);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cost-summary-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark, #1e293b);
    margin-bottom: 0.25rem;
}

.cost-summary-subtitle {
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
}

/* ── Breakdown section ── */
.cost-breakdown-section {
    margin-bottom: 2rem;
}

.cost-breakdown-title {
    font-size: 1.1rem;
    color: var(--text-dark, #1e293b);
    margin-bottom: 1.25rem;
}

.cost-breakdown-title i {
    color: var(--primary, #1e40af);
    margin-right: 0.5rem;
}

/* ── Cost category card ── */
.cost-category {
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s;
}

.cost-category:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cost-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cost-category-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark, #1e293b);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cost-category-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary, #1e40af);
    white-space: nowrap;
}

.cost-category-desc {
    font-size: 0.85rem;
    color: var(--text-light, #64748b);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.cost-category-detail {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
}

.cost-category-detail i {
    color: var(--accent, #3b82f6);
    margin-right: 0.25rem;
}

/* ── Cost bar ── */
.cost-bar {
    height: 6px;
    background: var(--bg-light, #f1f5f9);
    border-radius: 3px;
    overflow: hidden;
}

.cost-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary, #1e40af), var(--accent, #3b82f6));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ── Type badges ── */
.cost-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cost-type-initial {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.cost-type-annual {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.cost-type-both {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* ── Penalty comparison ── */
.penalty-comparison {
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.penalty-comparison h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark, #1e293b);
}

.penalty-comparison h4 i {
    margin-right: 0.5rem;
}

/* ── Factors summary ── */
.cost-factors-summary {
    background: var(--bg-light, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.cost-factors-summary h4 {
    margin-bottom: 1rem;
    color: var(--text-dark, #1e293b);
}

.cost-factors-summary h4 i {
    color: var(--primary, #1e40af);
    margin-right: 0.5rem;
}

.cost-factors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cost-factor-tag {
    background: white;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-dark, #1e293b);
}

.cost-factor-tag strong {
    color: var(--primary, #1e40af);
}

/* ── Legal disclaimer ── */
.legal-disclaimer {
    background: var(--bg-light, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light, #64748b);
    line-height: 1.6;
}

.legal-disclaimer i {
    color: var(--primary, #1e40af);
    margin-right: 0.25rem;
}

/* ── Results animation ── */
#cost-results {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s, transform 0.4s;
}

#cost-results.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .cost-summary {
        grid-template-columns: 1fr;
    }

    .cost-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cost-category-detail {
        flex-direction: column;
        gap: 0.25rem;
    }

    .cost-factors-grid {
        gap: 0.5rem;
    }

    .cost-factor-tag {
        font-size: 0.8rem;
    }
}
