/**
 * Factory-First Flip Calculator Styles
 * Interactive comparison calculator
 */

.flip-calculator {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 4rem 0;
    margin: 0;
}

.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h2 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.calculator-header p {
    font-size: 1.8rem;
    color: #94a3b8;
    max-width: 800px;
    margin: 0 auto;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 1rem 2rem;
    font-size: 1.6rem;
    font-weight: 600;
    border: 2px solid #334155;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: #22d3ee;
    color: #22d3ee;
}

.preset-btn.active {
    background: #22d3ee;
    border-color: #22d3ee;
    color: #0f172a;
}

/* Input Controls */
.calculator-inputs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 3rem;
}

.input-group {
    margin-bottom: 2.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    color: #e2e8f0;
    font-weight: 600;
}

.input-value {
    font-size: 1.8rem;
    color: #22d3ee;
    font-weight: 700;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #22d3ee;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #0ea5e9;
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #22d3ee;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #0ea5e9;
    transform: scale(1.2);
}

.input-hint {
    font-size: 1.3rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.flip-result {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.flip-result.traditional {
    border-color: #ef4444;
}

.flip-result.modular {
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.05);
}

.flip-result:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h3 {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.flip-result.traditional .result-header h3 {
    color: #fca5a5;
}

.flip-result.modular .result-header h3 {
    color: #22d3ee;
}

.result-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flip-result.traditional .result-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.flip-result.modular .result-badge {
    background: rgba(34, 211, 238, 0.2);
    color: #22d3ee;
}

/* Timeline Visualization */
.timeline-viz {
    margin-bottom: 2rem;
}

.timeline-label {
    font-size: 1.4rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.timeline-bar-container {
    background: rgba(0, 0, 0, 0.3);
    height: 40px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.timeline-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.flip-result.traditional .timeline-bar {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.flip-result.modular .timeline-bar {
    background: linear-gradient(90deg, #22d3ee 0%, #0ea5e9 100%);
    color: #0f172a;
}

/* Metric Rows */
.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 1.5rem;
    color: #94a3b8;
}

.metric-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #e2e8f0;
}

.metric-row.highlight {
    background: rgba(34, 211, 238, 0.1);
    padding: 1.5rem;
    margin: 1rem -1rem;
    border-radius: 8px;
    border-bottom: none;
}

.metric-row.highlight .metric-label {
    font-size: 1.7rem;
    font-weight: 700;
    color: #22d3ee;
}

.metric-row.highlight .metric-value {
    font-size: 2.4rem;
    color: #22d3ee;
}

/* Savings Highlight */
.savings-highlight {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
}

.savings-highlight h3 {
    font-size: 2.8rem;
    color: #d1fae5;
    margin-bottom: 2rem;
}

.savings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.saving-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 8px;
}

.saving-label {
    font-size: 1.4rem;
    color: #a7f3d0;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saving-value {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

/* Summary Message */
.summary-message {
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.7rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
}

.summary-message.urgent {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    color: #fca5a5;
}

.summary-message.positive {
    background: rgba(34, 211, 238, 0.1);
    border: 2px solid #22d3ee;
    color: #22d3ee;
}

.summary-message.neutral {
    background: rgba(148, 163, 184, 0.1);
    border: 2px solid #64748b;
    color: #94a3b8;
}

/* CTA Section */
.calculator-cta {
    text-align: center;
    padding: 3rem;
    background: rgba(34, 211, 238, 0.05);
    border-radius: 12px;
    border: 2px solid #22d3ee;
}

.calculator-cta p {
    font-size: 1.8rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
}

.calculator-cta .btn {
    font-size: 1.9rem;
    padding: 1.5rem 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-header h2 {
        font-size: 2.4rem;
    }

    .calculator-header p {
        font-size: 1.6rem;
    }

    .calculator-inputs {
        padding: 2rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .savings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .saving-value {
        font-size: 2.4rem;
    }

    .preset-buttons {
        flex-direction: column;
    }

    .preset-btn {
        width: 100%;
    }

    .flip-result {
        padding: 2rem;
    }

    .result-header h3 {
        font-size: 2rem;
    }

    .savings-highlight {
        padding: 2rem;
    }

    .savings-highlight h3 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 0 1.5rem;
    }

    .input-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .metric-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .calculator-cta p {
        font-size: 1.6rem;
    }
}

/* Print Styles */
@media print {
    .flip-calculator {
        background: white;
        color: black;
    }

    .calculator-inputs,
    .preset-buttons {
        display: none;
    }

    .flip-result {
        page-break-inside: avoid;
        border: 2px solid black;
    }

    .calculator-cta {
        display: none;
    }
}
