/* Income Tax Calculator Specific Styles */

/* Input Section Overrides */
.calculator-inputs .section-title,
.calculator-wrapper .section-title {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    margin-top: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(108, 92, 231, 0.2);
    grid-column: 1 / -1;
    /* Span all columns in grid */
}

.calculator-wrapper .section-title:first-child {
    margin-top: 0;
}

.input-hint {
    display: block;
    font-size: 12px;
    color: #8E8E93;
    margin-top: 5px;
    font-style: italic;
}


/* Results Section - Regime Comparison */
.regime-comparison {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
}

.regime-card {
    flex: 1;
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.regime-card.active {
    border-color: #6C5CE7;
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.25);
}

.regime-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.regime-header .badge {
    background: rgba(108, 92, 231, 0.15);
    color: #A29BFE;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.regime-card.active .regime-header .badge {
    background: #6C5CE7;
    color: #FFFFFF;
}

.tax-amount {
    margin: 28px 0 20px;
    color: #FF6B6B;
    font-weight: 800;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.5px;
}

.regime-card.active .tax-amount {
    color: #00D9A5;
}

.tax-amount .currency {
    font-size: 28px;
    vertical-align: top;
    margin-right: 4px;
    font-weight: 700;
}

.tax-details p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.recommendation-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);

    background: #00B894;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 184, 148, 0.2);
    white-space: nowrap;
}

/* Comparison Table */
.tax-breakdown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

.tax-breakdown-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.tax-breakdown-table th:not(:first-child) {
    text-align: right;
    width: 30%;
}

.tax-breakdown-table td {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tax-breakdown-table td:not(:first-child) {
    text-align: right;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
}

.tax-breakdown-table .total-row td {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
}

.tax-breakdown-table .final-row td {
    color: #6C5CE7;
    font-size: 16px;
    font-weight: 700;
    border-bottom: none;
    padding-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .regime-comparison {
        flex-direction: column;
    }

    .tax-breakdown-table {
        font-size: 13px;
    }
}

/* Tax Visualization Section */
.tax-visualization-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #EBEBF0;
}

.tax-visualization-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2F3142;
    margin-bottom: 25px;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.chart-wrapper {
    background: linear-gradient(135deg, #2F3142 0%, #1A1B26 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.chart-wrapper h5 {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-wrapper canvas {
    max-height: 200px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

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

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

    .chart-wrapper canvas {
        max-height: 180px;
    }
}

/* Take-Home Salary Section */
.take-home-section {
    margin-top: 40px;
    padding: 32px;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(108, 92, 231, 0.15);
}

.take-home-section h4 {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 0.2px;
}

.take-home-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.take-home-card {
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.take-home-card:hover {
    transform: translateY(-2px);
    border-color: rgba(108, 92, 231, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.take-home-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.new-regime-take-home .take-home-label {
    color: #A29BFE;
}

.old-regime-take-home .take-home-label {
    color: #00D9A5;
}

.take-home-monthly {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.take-home-value {
    font-size: 36px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.5px;
}

.take-home-period {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.take-home-annual {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.take-home-annual span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
}


/* Responsive take-home */
@media (max-width: 768px) {
    .regime-comparison {
        flex-direction: column;
    }

    .tax-amount {
        font-size: 36px;
    }

    .take-home-cards {
        grid-template-columns: 1fr;
    }

    .take-home-value {
        font-size: 32px;
    }
}

/* Force Tax Slabs Table to be visible */
.yearly-table-wrapper {
    max-height: none !important;
    overflow: visible !important;
}

/* Info Card Link Styling - Fix Arrow Alignment */
.info-card-link .read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #FFD500;
    transition: gap 0.3s ease;
}

.info-card-link .read-more i {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.info-card-link:hover .read-more {
    gap: 10px;
}

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

/* Toggle Switch Styles - Enhanced iOS-Style Design */
.toggle-switch-container {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 4px;
    gap: 0px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sliding background pill */
.toggle-switch-container::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4);
    z-index: 0;
}

/* Move pill when second option is active */
.toggle-switch-container.second-active::before,
.input-mode-toggle.active:last-child~.toggle-switch-container::before,
.city-toggle.active:last-child~.toggle-switch-container::before {
    transform: translateX(calc(100%));
}

.toggle-option {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    min-width: 110px;
    text-align: center;
}

.toggle-option:hover:not(.active) {
    color: rgba(255, 255, 255, 0.65);
}

.toggle-option.active {
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .toggle-switch-container {
        width: 100%;
    }

    .toggle-option {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Info Tooltip Styles */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    cursor: help;
    vertical-align: middle;
}

.info-icon {
    font-size: 12px;
    color: #8E8E93;
    transition: color 0.2s ease;
}

.info-tooltip:hover .info-icon {
    color: #6C5CE7;
}

/* Remove circle outline from info icons in calculator inputs */
.calculator-inputs .info-icon,
.step-fields .info-icon,
.wizard-container .input-group-custom .info-icon,
.form-container .input-group-custom .info-icon,
.input-label-row .info-icon {
    /* Reset any large circle styling from other contexts */
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    display: inline;
    vertical-align: middle;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background: rgba(30, 30, 30, 0.98);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 10px;
    padding: 14px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: all 0.2s ease;
    pointer-events: none;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(30, 30, 30, 0.98);
}

.info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Mobile tooltip adjustments */
@media (max-width: 768px) {
    .tooltip-text {
        width: 220px;
        font-size: 11px;
        padding: 12px;
    }
}

/* ===================================
   WIZARD MODE STYLES
   =================================== */

/* Wizard Progress Bar */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    border-color: #6C5CE7;
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.progress-step.completed .step-circle {
    background: #00D9A5;
    border-color: #00D9A5;
    color: #fff;
}

.step-circle i {
    font-size: 22px;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

.progress-step.active .step-label {
    color: #6C5CE7;
}

.progress-step.completed .step-label {
    color: #00D9A5;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
    position: relative;
    top: -16px;
}

.progress-step.completed+.progress-line {
    background: #00D9A5;
}

/* Wizard Container */
.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    /* Account for fixed header (110px) when scrolling to section */
    scroll-margin-top: 120px;
}

.wizard-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Content */
.step-content {
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.step-header {
    text-align: center;
    margin-bottom: 28px;
}

.step-icon {
    font-size: 48px;
    color: #6C5CE7;
    margin-bottom: 16px;
}

.step-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.step-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.step-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Compact spacing for inputs */
.step-fields .input-group-custom {
    margin-bottom: 10px;
}

/* Reduced margin for step insights */
.step-fields .step-insight,
.step-fields .skip-hint {
    margin-top: 8px;
}

/* Step Insight */
.step-insight {
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.step-insight i {
    color: #6C5CE7;
    font-size: 24px;
}

.step-insight span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.step-insight strong {
    color: #A29BFE;
    font-weight: 700;
}

/* Skip Hint */
.skip-hint {
    background: rgba(0, 217, 165, 0.1);
    border: 1px solid rgba(0, 217, 165, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.skip-hint i {
    color: #00D9A5;
    font-size: 24px;
}

.skip-hint span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Results Step */
.results-step .step-content {
    padding: 40px 20px;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    max-width: 800px;
    margin: 30px auto 0;
    padding: 0 20px;
}

/* Desktop: Non-sticky navigation (matches retirement calc) */
.wizard-nav-placeholder {
    display: none;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.nav-btn.prev {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.nav-btn.prev:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn.next {
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.nav-btn.next:hover {
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn i {
    font-size: 20px;
}

/* Mode Toggle Button */
.mode-toggle-bottom {
    margin-top: 40px;
    text-align: center;
}

.mode-btn-subtle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn-subtle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.mode-btn-subtle i {
    font-size: 18px;
}

/* Form Container (initially hidden) */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

/* Override Bootstrap container max-width for calculator section */
.calculator-section .container {
    max-width: 1400px;
}

/* Mode Toggle at Top of Form */
.mode-toggle-top {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Layout: Inputs Left, Results Right */
body:not(.wizard-mode) .calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    max-width: 1360px;
    margin: 0 auto;
}

/* Inputs Column */
.calculator-inputs {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Results Column - Sticky */
.calculator-results {
    background: linear-gradient(145deg, #2F3142 0%, #252736 100%);
    border-radius: 24px;
    padding: 35px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Compact spacing for form mode inputs */
body:not(.wizard-mode) .calculator-wrapper .input-group-custom {
    margin-bottom: 15px;
}

@media (max-width: 992px) {
    body:not(.wizard-mode) .calculator-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Hide visual breakdown sections until results page */
.wizard-mode .yearly-breakdown-section,
.wizard-mode .tax-visualization-section {
    display: none;
}

.wizard-mode.show-results .yearly-breakdown-section,
.wizard-mode.show-results .tax-visualization-section {
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wizard-progress {
        padding: 0 10px;
        margin: 30px auto;
    }

    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
    }

    .progress-line {
        margin: 0 6px;
        top: -12px;
    }

    .step-content {
        padding: 24px 20px;
    }

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

    .step-icon {
        font-size: 40px;
    }

    /* Mobile only: Sticky bottom navigation */
    .wizard-nav.sticky-nav {
        position: sticky;
        bottom: 0;
        z-index: 100;
        background: rgba(30, 31, 46, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 16px 20px;
        display: flex;
        justify-content: center;
        gap: 16px;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0;
        max-width: 100%;
    }

    .nav-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 16px;
        font-size: 14px;
    }

    .wizard-nav.sticky-nav .nav-btn.prev {
        flex: 0.7;
    }

    .wizard-nav.sticky-nav .nav-btn.next {
        flex: 1.3;
    }

    .nav-btn span {
        display: inline;
    }

    .nav-btn i {
        font-size: 20px;
    }
}

/* Animation Keyframes for Wizard */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
        visibility: visible;
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}