/* SSY Calculator Styles - Pink/Green Theme for Girl Empowerment */

.calculator-section {
    position: relative;
    padding: 140px 0 80px;
    min-height: 100vh;
}

.calculator-header {
    text-align: center;
    margin-bottom: 50px;
}

.calculator-header h1 {
    font-size: 56px;
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.calculator-header .subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* Calculator Wrapper */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1100px;
    margin: 0 auto;
}

/* Input Groups */
.input-group-custom {
    margin-bottom: 40px;
}

.input-group-custom:last-child {
    margin-bottom: 0;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.input-label-row label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.input-value-display {
    display: flex;
    align-items: center;
    background: rgba(233, 30, 99, 0.1);
    border: 1px solid rgba(233, 30, 99, 0.3);
    border-radius: 8px;
    padding: 8px 14px;
}

.input-value-display .currency,
.input-value-display .unit {
    color: #E91E63;
    font-weight: 600;
    font-size: 15px;
}

.inline-input {
    background: transparent;
    border: none;
    color: #E91E63;
    font-weight: 700;
    font-size: 18px;
    width: 100px;
    text-align: right;
    font-family: "Source Sans Pro", sans-serif;
}

.inline-input:focus {
    outline: none;
}

.age-input {
    width: 40px;
}

.rate-input {
    width: 40px;
}

/* Custom Slider */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #E91E63 0%, #4CAF50 100%);
    outline: none;
    margin: 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 3px solid #E91E63;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 3px solid #E91E63;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Preset Chips */
.preset-chips {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: "Source Sans Pro", sans-serif;
}

.chip:hover {
    background: rgba(233, 30, 99, 0.15);
    border-color: rgba(233, 30, 99, 0.4);
    color: #E91E63;
}

.chip.active {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2) 0%, rgba(76, 175, 80, 0.2) 100%);
    border-color: #E91E63;
    color: #E91E63;
}

/* Scheme Info Box */
.scheme-info-box {
    background: rgba(233, 30, 99, 0.08);
    border: 1px solid rgba(233, 30, 99, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 30px;
}

.scheme-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.scheme-info-header i {
    color: #E91E63;
    font-size: 18px;
}

.scheme-info-header span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
}

.scheme-info-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheme-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.detail-value.highlight {
    color: #4CAF50;
}

/* Advanced Options Toggle Section */
.advanced-toggle-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(233, 30, 99, 0.08);
    border: 1px dashed rgba(233, 30, 99, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
}

.advanced-toggle:hover {
    background: rgba(233, 30, 99, 0.15);
    border-color: rgba(233, 30, 99, 0.5);
    color: #E91E63;
}

.advanced-toggle i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.advanced-toggle.expanded {
    background: rgba(233, 30, 99, 0.15);
    border-style: solid;
    color: #E91E63;
}

.advanced-toggle.expanded i {
    transform: rotate(180deg);
}

/* Advanced Options Panel */
.advanced-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    padding: 0;
}

.advanced-options.show {
    max-height: 200px;
    opacity: 1;
    padding-top: 20px;
}

/* Advanced Option with Toggle */
.advanced-option {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.advanced-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.option-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.option-info {
    flex: 1;
}

.option-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3px;
}

.option-hint {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #E91E63 0%, #4CAF50 100%);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.option-input-row {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.option-input-row.enabled {
    opacity: 1;
    pointer-events: auto;
}

.slider-small {
    flex: 1;
    height: 6px;
}

.input-value-display.small {
    padding: 6px 10px;
}

.input-value-display.small .inline-input {
    font-size: 14px;
    width: 35px;
}

.input-value-display.small .unit {
    font-size: 13px;
}

/* Results Section */
.calculator-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Donut Chart */
.donut-chart-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 30px;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-ring {
    transition: stroke 0.3s ease;
}

.donut-segment {
    transition: stroke-dasharray 0.6s ease-out, stroke-dashoffset 0.6s ease-out;
}

.donut-segment.invested {
    stroke: #E91E63;
}

.donut-segment.interest {
    stroke: #4CAF50;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.donut-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    font-family: "Raleway", sans-serif;
}

/* Result Breakdown */
.result-breakdown {
    width: 100%;
    max-width: 280px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
}

.breakdown-indicator.invested {
    background: #E91E63;
}

.breakdown-indicator.interest {
    background: #4CAF50;
}

.breakdown-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.breakdown-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}

.breakdown-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: "Raleway", sans-serif;
}

/* SSY Summary */
.ssy-summary {
    width: 100%;
    max-width: 280px;
    background: rgba(233, 30, 99, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-row:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.summary-value {
    font-size: 15px;
    font-weight: 700;
    color: #E91E63;
}

/* CTA Section */
.cta-section {
    margin-top: 30px;
    text-align: center;
}

.cta-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

.download-btn {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.download-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.download-btn img {
    height: 48px;
}

/* Yearly Breakdown Section */
.yearly-breakdown-section {
    margin-top: 60px;
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border-radius: 24px;
    padding: 40px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.breakdown-header {
    text-align: center;
    margin-bottom: 30px;
}

.breakdown-header h2 {
    font-size: 32px;
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.breakdown-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

/* Milestones Container */
.milestones-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.milestone-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.milestone-badge.achieved {
    opacity: 1;
    background: rgba(233, 30, 99, 0.1);
    border-color: rgba(233, 30, 99, 0.3);
}

.milestone-badge.achieved .milestone-icon {
    color: #E91E63;
}

.milestone-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
}

.milestone-info {
    display: flex;
    flex-direction: column;
}

.milestone-amount {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.milestone-year {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.milestone-badge.achieved .milestone-year {
    color: #E91E63;
}

/* Chart Container */
.chart-container {
    margin-bottom: 30px;
}

.chart-wrapper {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 30px 20px 20px;
    margin-bottom: 16px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    gap: 8px;
    padding: 0 10px;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    max-width: 60px;
    position: relative;
    height: 100%;
}

.bar-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.bar-invested {
    background: linear-gradient(180deg, #E91E63 0%, #C2185B 100%);
    transition: height 0.4s ease;
}

.bar-interest {
    background: linear-gradient(180deg, #4CAF50 0%, #388E3C 100%);
    transition: height 0.4s ease;
}

.bar-value {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    white-space: nowrap;
    text-align: center;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-label {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    max-width: 60px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.invested {
    background: #E91E63;
}

.legend-color.interest {
    background: #4CAF50;
}

.legend-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Table Toggle */
.yearly-table-container {
    margin-top: 20px;
}

.table-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(233, 30, 99, 0.08);
    border: 1px dashed rgba(233, 30, 99, 0.3);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
}

.table-toggle:hover {
    background: rgba(233, 30, 99, 0.15);
    border-color: rgba(233, 30, 99, 0.5);
    color: #E91E63;
}

.table-toggle i {
    transition: transform 0.3s ease;
}

.table-toggle.expanded {
    background: rgba(233, 30, 99, 0.15);
    border-style: solid;
    color: #E91E63;
}

.table-toggle.expanded i {
    transform: rotate(180deg);
}

/* Yearly Table */
.yearly-table-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.yearly-table-wrapper.show {
    max-height: 800px;
    overflow-y: auto;
}

.yearly-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.yearly-table th,
.yearly-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.yearly-table th {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
}

.yearly-table td {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.yearly-table tr:hover td {
    background: rgba(233, 30, 99, 0.05);
}

.yearly-table .milestone-row {
    background: rgba(233, 30, 99, 0.1);
}

.yearly-table .milestone-row td {
    color: #E91E63;
    font-weight: 600;
}

.milestone-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    font-size: 11px;
    background: rgba(233, 30, 99, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.milestone-indicator i {
    font-size: 12px;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.info-card {
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.15) 0%, rgba(76, 175, 80, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.info-icon i {
    font-size: 28px;
    color: #E91E63;
}

.info-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    font-family: "Raleway", sans-serif;
}

.info-card p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 0;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #E91E63;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    color: #4CAF50;
    gap: 8px;
}

.read-more-link i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(4px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px;
    }

    .calculator-header h1 {
        font-size: 42px;
    }

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

@media (max-width: 768px) {
    .calculator-section {
        padding: 100px 0 60px;
    }

    .calculator-header h1 {
        font-size: 32px;
    }

    .calculator-header .subtitle {
        font-size: 16px;
    }

    .calculator-wrapper {
        padding: 24px;
    }

    .input-group-custom {
        margin-bottom: 30px;
    }

    .preset-chips {
        gap: 8px;
    }

    .chip {
        padding: 6px 12px;
        font-size: 12px;
    }

    .donut-chart-container {
        width: 180px;
        height: 180px;
    }

    .donut-value {
        font-size: 22px;
    }

    .breakdown-value {
        font-size: 18px;
    }

    .yearly-breakdown-section {
        padding: 24px;
        margin-top: 40px;
    }

    .breakdown-header h2 {
        font-size: 24px;
    }

    .chart-bars {
        height: 150px;
    }

    .yearly-table-wrapper {
        overflow-x: auto;
    }

    .yearly-table th,
    .yearly-table td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .inline-input {
        width: 80px;
        font-size: 16px;
    }

    .scheme-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .milestones-container {
        gap: 8px;
    }

    .milestone-badge {
        padding: 10px 12px;
    }

    .milestone-amount {
        font-size: 14px;
    }
}