/* ===== Calculator Pages Styles ===== */

.calc-header {
    text-align: center;
}

.calc-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.calc-header h1 i {
    color: var(--primary-light);
}

/* Calculator Layout */
.calculator-section {
    padding: 60px 0 80px;
    background: var(--gray-50);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.calculator-layout.simple {
    max-width: 1000px;
    margin: 0 auto;
}

/* Calculator Card */
.calc-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.calc-header {
    padding: 20px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.calc-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.125rem;
    margin: 0;
}

.calc-header h3 i {
    color: var(--primary);
}

.calc-body {
    padding: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group .required {
    color: var(--danger);
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.form-group select:focus,
.form-group input:focus {
    background: var(--white);
    border-color: var(--primary);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .currency {
    position: absolute;
    left: 7px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-500);
    z-index: 1;
    pointer-events: none;
}

.input-with-icon.large .currency {
    font-size: 1.25rem;
    left: 18px;
}

.input-with-icon .suffix {
    position: absolute;
    right: 16px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.input-with-icon input {
    padding-left: 40px;
}

.input-with-icon.large input {
    font-size: 1.25rem;
    padding: 18px 16px 18px 48px;
}

.form-group .hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Range Slider */
.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin-top: 12px;
    -webkit-appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Calc Type Toggle */
.calc-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.type-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.type-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* GST Rates */
.gst-rates {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.rate-btn {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.rate-btn:hover {
    background: var(--gray-200);
}

.rate-btn.active {
    background: var(--primary-pale);
    border-color: var(--primary);
    color: var(--primary);
}

.custom-rate {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-rate span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.custom-rate input {
    width: 80px;
    padding: 8px 12px;
    text-align: center;
}

/* Results Card */
.results-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.results-card h3 {
    margin-bottom: 24px;
    font-size: 1.25rem;
}

/* Regime Tabs */
.regime-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.regime-tab {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-600);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.regime-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Regime Content */
.regime-content {
    display: none;
}

.regime-content.active {
    display: block;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.regime-tag {
    padding: 4px 12px;
    background: var(--primary-pale);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* Result Breakdown */
.result-breakdown {
    margin-bottom: 20px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item.highlight {
    padding: 16px;
    margin: 12px -16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: var(--dark);
}

/* Total Tax */
.total-tax {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    color: var(--white);
    margin-bottom: 20px;
}

.total-tax span:first-child {
    font-weight: 500;
}

.total-tax span:last-child {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
}

/* Comparison Box */
.comparison-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--success-light);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.comparison-icon {
    width: 48px;
    height: 48px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.comparison-text strong {
    display: block;
    color: var(--success);
    margin-bottom: 4px;
}

.comparison-text p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.comparison-text span {
    font-weight: 700;
    color: var(--success);
}

/* Result Actions */
.result-actions {
    margin-top: 24px;
}

/* Info Card */
.info-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.info-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1rem;
}

.info-card h4 i {
    color: var(--primary);
}

.slabs-table {
    width: 100%;
    border-collapse: collapse;
}

.slabs-table tr td {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
}

.slabs-table tr:last-child td {
    border-bottom: none;
}

.slabs-table tr td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

.info-card ul {
    padding-left: 0;
}

.info-card ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.info-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.info-card .note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* GST Results */
.gst-results {
    text-align: center;
}

.gst-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.gst-result-item {
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.gst-result-item .label {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.gst-result-item .value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.gst-result-item.highlight {
    background: var(--primary-pale);
}

.gst-result-item.highlight .value {
    color: var(--primary);
}

.total-box {
    padding: 24px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    color: var(--white);
    margin-bottom: 20px;
}

.total-box.success {
    background: var(--success);
}

.total-box .label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.total-box .value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.taxable-box {
    padding: 16px 20px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.taxable-box .label {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.taxable-box .value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--danger);
}

.result-note {
    text-align: left;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.result-note p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.result-note i {
    color: var(--primary);
    margin-right: 8px;
}

/* HRA Breakdown */
.hra-breakdown {
    margin-bottom: 24px;
}

.hra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.hra-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hra-label .step {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

.hra-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

/* EMI Results */
.emi-result-main {
    text-align: center;
    padding: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    color: var(--white);
    margin-bottom: 24px;
}

.emi-result-main .label {
    display: block;
    font-size: 0.9375rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.emi-result-main .value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
}

.emi-breakdown {
    margin-bottom: 24px;
}

.emi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.emi-item.total {
    padding: 16px;
    margin: 12px -16px 0;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: none;
}

.emi-item .label {
    color: var(--gray-600);
}

.emi-item .value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.emi-item .value.highlight {
    color: var(--danger);
}

/* EMI Chart */
.emi-chart {
    margin-top: 24px;
}

.chart-bar {
    display: flex;
    height: 24px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.principal-bar {
    background: var(--primary);
    transition: width 0.5s ease;
}

.interest-bar {
    background: var(--secondary);
    transition: width 0.5s ease;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.principal {
    background: var(--primary);
}

.legend-dot.interest {
    background: var(--secondary);
}

/* TDS Results */
.tds-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tds-result-item {
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    text-align: center;
}

.tds-result-item .label {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.tds-result-item .value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.tds-result-item.highlight {
    background: var(--danger-light);
}

.tds-result-item.highlight .value {
    color: var(--danger);
}

/* Rate Badges */
.rate-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.rate-0 { background: #d1fae5; color: #059669; }
.rate-5 { background: #dbeafe; color: #2563eb; }
.rate-12 { background: #fef3c7; color: #d97706; }
.rate-18 { background: #fed7aa; color: #ea580c; }
.rate-28 { background: #fee2e2; color: #dc2626; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calculator-section {
        padding: 40px 0 60px;
    }

    .calc-body {
        padding: 20px;
    }

    .results-card {
        padding: 24px;
    }

    .gst-result-grid,
    .tds-result-grid {
        grid-template-columns: 1fr;
    }

    .gst-rates {
        flex-wrap: wrap;
    }

    .gst-rates .rate-btn {
        flex: 0 0 calc(50% - 4px);
    }

    .regime-tabs {
        flex-direction: column;
    }

    .total-tax span:last-child {
        font-size: 1.5rem;
    }

    .emi-result-main .value {
        font-size: 2rem;
    }

    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

