/**
 * YFI Pension Calculator Styles v2.0
 * Modern Financial Banking UI Design
 */

/* ========================================
   Base & Reset
   ======================================== */

.yfi-pension-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.yfi-pension-calculator *,
.yfi-pension-calculator *::before,
.yfi-pension-calculator *::after {
    box-sizing: border-box;
}

/* ========================================
   Main Wrapper
   ======================================== */

.yfi-calculator-wrapper {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    padding: 3rem;
    max-width: 1200px;
    margin: 2rem auto;
}

@media (max-width: 768px) {
    .yfi-calculator-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
}

/* ========================================
   Header
   ======================================== */

.yfi-calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.yfi-calculator-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .yfi-calculator-main-title {
        font-size: 2rem;
    }
}

.yfi-calculator-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* ========================================
   Body Layout (Two Columns)
   ======================================== */

.yfi-calculator-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 992px) {
    .yfi-calculator-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   Input Panel (Left Side)
   ======================================== */

.yfi-calculator-inputs-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.yfi-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.yfi-input-group.yfi-input-highlight {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #d1fae5;
}

.yfi-input-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

.yfi-input-hint {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #9ca3af;
}

.yfi-input-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   Range Sliders
   ======================================== */

.yfi-range-slider {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.3s ease;
}

.yfi-range-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.yfi-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.yfi-range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.yfi-range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Slider Color Variants */
.yfi-slider-blue::-webkit-slider-thumb { background: #3b82f6; }
.yfi-slider-blue::-moz-range-thumb { background: #3b82f6; }

.yfi-slider-purple::-webkit-slider-thumb { background: #8b5cf6; }
.yfi-slider-purple::-moz-range-thumb { background: #8b5cf6; }

.yfi-slider-teal::-webkit-slider-thumb { background: #14b8a6; }
.yfi-slider-teal::-moz-range-thumb { background: #14b8a6; }

.yfi-slider-orange::-webkit-slider-thumb { background: #f97316; }
.yfi-slider-orange::-moz-range-thumb { background: #f97316; }

.yfi-slider-gradient {
    background: linear-gradient(to right, #10b981 0%, #fbbf24 50%, #ef4444 100%);
}

.yfi-slider-gradient::-webkit-slider-thumb { background: #10b981; }
.yfi-slider-gradient::-moz-range-thumb { background: #10b981; }

/* ========================================
   Value Display Boxes
   ======================================== */

.yfi-value-display {
    min-width: 140px;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.yfi-value-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.yfi-value-unit {
    font-size: 1rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

/* Value Display Color Variants */
.yfi-value-blue {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.yfi-value-blue .yfi-value-number,
.yfi-value-blue .yfi-value-unit {
    color: #1e40af;
}

.yfi-value-purple {
    border-color: #ddd6fe;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.yfi-value-purple .yfi-value-number,
.yfi-value-purple .yfi-value-unit {
    color: #6d28d9;
}

.yfi-value-teal {
    border-color: #99f6e4;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
}

.yfi-value-teal .yfi-value-number,
.yfi-value-teal .yfi-value-unit {
    color: #0f766e;
}

.yfi-value-orange {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.yfi-value-orange .yfi-value-number,
.yfi-value-orange .yfi-value-unit {
    color: #c2410c;
}

.yfi-value-gradient {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.yfi-value-gradient .yfi-value-number {
    color: #047857;
}

/* ========================================
   Yield Labels
   ======================================== */

.yfi-yield-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.yfi-yield-label-left,
.yfi-yield-label-right {
    font-weight: 500;
}

/* ========================================
   Results Panel (Right Side)
   ======================================== */

.yfi-calculator-results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Main Result Card (Green Gradient) */
.yfi-result-card {
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.yfi-result-main {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.yfi-result-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.yfi-icon {
    width: 20px;
    height: 20px;
}

.yfi-result-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .yfi-result-amount {
        font-size: 2.5rem;
    }
}

.yfi-result-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Secondary Result Card (White) */
.yfi-result-secondary {
    background: #ffffff;
    border: 2px solid #e5e7eb;
}

.yfi-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.yfi-result-label {
    color: #6b7280;
    font-weight: 500;
}

.yfi-result-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.yfi-value-blue-text {
    color: #3b82f6;
}

.yfi-value-green-text {
    color: #10b981;
}

.yfi-result-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1rem 0;
}

/* ========================================
   Chart Container
   ======================================== */

.yfi-chart-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

#yfi-chart-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========================================
   Disclaimer Box
   ======================================== */

.yfi-disclaimer-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.25rem;
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.6;
}

.yfi-disclaimer-box strong {
    font-weight: 600;
}

/* ========================================
   Footer CTA
   ======================================== */

.yfi-calculator-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.yfi-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.yfi-cta-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.yfi-cta-icon {
    width: 20px;
    height: 20px;
}

.yfi-cta-note {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 576px) {
    .yfi-value-display {
        min-width: 120px;
        padding: 0.5rem 1rem;
    }

    .yfi-value-number {
        font-size: 1.5rem;
    }

    .yfi-result-amount {
        font-size: 2rem;
    }

    .yfi-result-value {
        font-size: 1.25rem;
    }

    .yfi-cta-btn {
        font-size: 1rem;
        padding: 0.875rem 2rem;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yfi-pension-calculator {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth transitions for all interactive elements */
.yfi-range-slider,
.yfi-cta-btn {
    transition: all 0.3s ease;
}
