/* Wealth Projection Tool - Clean Light Design with Dark Blue Accents */

.wealth-projection-tool {
    all: initial;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 15px auto;
    padding: 30px 20px;
    box-sizing: border-box;
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wealth-projection-tool * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header */
.wealth-projection-tool .tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.wealth-projection-tool .tool-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.2;
}

.wealth-projection-tool .tool-subtitle {
    font-size: 16px;
    color: #64748b;
    line-height: 1.4;
}

/* Input Form Section */
.wealth-projection-tool .input-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.wealth-projection-tool .input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.wealth-projection-tool .input-group {
    display: flex;
    flex-direction: column;
}

.wealth-projection-tool .input-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: block;
}

.wealth-projection-tool .input-field {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
    transition: all 0.2s ease;
}

.wealth-projection-tool .input-field:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.wealth-projection-tool .input-field::placeholder {
    color: #94a3b8;
}

.wealth-projection-tool select.input-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Slider Styling */
.wealth-projection-tool .slider-container {
    display: flex;
    flex-direction: column;
}

.wealth-projection-tool .slider-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.wealth-projection-tool .slider-input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    appearance: none;
}

.wealth-projection-tool .slider-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wealth-projection-tool .slider-input::-webkit-slider-thumb:hover {
    background: #1e3a8a;
    transform: scale(1.1);
}

.wealth-projection-tool .slider-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    border: none;
}

/* Calculate Button */
.wealth-projection-tool .calculate-btn {
    background: #1e40af;
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 25px;
    width: 100%;
}

.wealth-projection-tool .calculate-btn:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.wealth-projection-tool .calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.wealth-projection-tool .results-section {
    display: none;
    margin-top: 30px;
}

.wealth-projection-tool .results-section.visible {
    display: block;
}

/* Chart Container */
.wealth-projection-tool .chart-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    min-height: 450px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.wealth-projection-tool .chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.wealth-projection-tool #wealthChart {
    width: 100% !important;
    height: 380px !important;
    max-height: 380px;
    flex-shrink: 0;
}

/* Summary Cards */
.wealth-projection-tool .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wealth-projection-tool .summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.wealth-projection-tool .summary-card-age {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.wealth-projection-tool .summary-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 5px;
}

.wealth-projection-tool .summary-card-label {
    font-size: 12px;
    color: #94a3b8;
}

/* Insight Box */
.wealth-projection-tool .insight-box {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.wealth-projection-tool .insight-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wealth-projection-tool .insight-text {
    font-size: 14px;
    color: #1e40af;
    line-height: 1.6;
}

.wealth-projection-tool .insight-text strong {
    color: #1e3a8a;
    font-weight: 600;
}

/* Status Badge */
.wealth-projection-tool .status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.wealth-projection-tool .status-badge.excellent {
    background: #ffffff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.wealth-projection-tool .status-badge.good {
    background: #ffffff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.wealth-projection-tool .status-badge.average {
    background: #fef3c7;
    color: #92400e;
}

.wealth-projection-tool .status-badge.needs-improvement {
    background: #fee2e2;
    color: #991b1b;
}

/* Loading State */
.wealth-projection-tool .loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.wealth-projection-tool .loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #1e40af;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.wealth-projection-tool .error-message {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Helper Text */
.wealth-projection-tool .helper-text {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wealth-projection-tool {
        padding: 20px 15px;
    }

    .wealth-projection-tool .tool-title {
        font-size: 24px;
    }

    .wealth-projection-tool .input-section {
        padding: 20px;
    }

    .wealth-projection-tool .input-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wealth-projection-tool .chart-container {
        padding: 15px;
        min-height: 300px;
    }

    .wealth-projection-tool #wealthChart {
        height: 240px !important;
        max-height: 240px;
    }

    .wealth-projection-tool .summary-grid {
        grid-template-columns: 1fr;
    }

    .wealth-projection-tool .summary-card-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .wealth-projection-tool .tool-title {
        font-size: 20px;
    }

    .wealth-projection-tool .tool-subtitle {
        font-size: 14px;
    }

    .wealth-projection-tool .calculate-btn {
        padding: 12px 30px;
        font-size: 15px;
    }
}
