/* ==========================================================================
   Buy vs Rent Calculator Page Styles
   Based on Style Guide specifications
   ========================================================================== */

/* --------------------------------------------------------------------------
   Calculator Section
   -------------------------------------------------------------------------- */
.calc-section {
    padding: 60px 20px;
    background: var(--bg-light);
}

.calc-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Constrain calc section width */
.calc-section .container {
    max-width: 1200px;
}

/* Constrain info section width */
.info-section .container {
    max-width: 900px;
}

.calc-inputs {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
}

.calc-inputs h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-inputs h2 i {
    color: var(--secondary);
}

/* --------------------------------------------------------------------------
   Input Grid
   -------------------------------------------------------------------------- */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group label i {
    color: var(--primary);
    font-size: 0.9rem;
}

.input-group .hint {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   Sliders
   -------------------------------------------------------------------------- */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(244, 121, 32, 0.4);
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.value-display {
    min-width: 140px;
    padding: 12px 16px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
    transition: border-color 0.3s;
}

.value-display:focus {
    outline: none;
    border-color: var(--secondary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   Results Section
   -------------------------------------------------------------------------- */
.calc-results {
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.result-main {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.result-main.buy-wins {
    border: 3px solid #28a745;
}

.result-main.rent-wins {
    border: 3px solid var(--secondary);
}

.result-main.neutral {
    border: 3px solid var(--primary);
}

.result-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.buy-wins .result-icon {
    background: #d4edda;
    color: #28a745;
}

.rent-wins .result-icon {
    background: #fff3e0;
    color: var(--secondary);
}

.neutral .result-icon {
    background: #e3f2fd;
    color: var(--primary);
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.result-years {
    font-size: 3rem;
    font-weight: 800;
    margin: 15px 0;
}

.buy-wins .result-years {
    color: #28a745;
}

.rent-wins .result-years {
    color: var(--secondary);
}

.neutral .result-years {
    color: var(--primary);
}

.result-description {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Comparison Cards
   -------------------------------------------------------------------------- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.comparison-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.comparison-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comparison-card h3 i {
    font-size: 1.2rem;
}

.comparison-card.buy h3 i {
    color: #28a745;
}

.comparison-card.rent h3 i {
    color: var(--secondary);
}

.comparison-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.comparison-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.comparison-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 5px 0;
}

.detail-row span:first-child {
    color: var(--text-light);
}

.detail-row span:last-child {
    font-weight: 600;
    color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.timeline-section h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-bar {
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.timeline-fill {
    height: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #28a745 0%, #3dd95a 100%);
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --------------------------------------------------------------------------
   Info Section
   -------------------------------------------------------------------------- */
.info-section {
    padding: 60px 20px;
    background: white;
}

.info-section h2 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.info-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.methodology {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.methodology h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.methodology ul {
    list-style: none;
    padding: 0;
}

.methodology li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.methodology li:last-child {
    border-bottom: none;
}

.methodology li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #28a745;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #2a4a6f 100%);
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 14px 28px;
    font-size: 1rem;
}

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

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .slider-row {
        flex-direction: column;
        align-items: stretch;
    }

    .value-display {
        text-align: center;
    }

    .result-years {
        font-size: 2.5rem;
    }
}
