/* Tax Refund Calculator Specific Styles */

.page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    margin-bottom: var(--spacing-xl);
}

.calculator-container {
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px var(--shadow);
}

.calculator-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.calculator-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Form Styles */
.calculator-form {
    max-width: 900px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--spacing-xl);
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group small {
    margin-top: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    z-index: 1;
}

.input-group .form-input {
    padding-left: 32px;
}

.form-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px;
    width: 100%;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:read-only {
    background: #f8fafc;
    color: var(--text-secondary);
}

.calculate-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.125rem;
    font-weight: 600;
}

/* Itemized Deductions Toggle */
#itemized-deductions {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: #f8fafc;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* Results Section */
.tax-refund-results {
    margin-top: var(--spacing-lg);
}

.results-container {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px var(--shadow);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.results-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.summary-card {
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: 0 2px 4px var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-lg);
}

.summary-card.highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.1));
    border-color: var(--primary-color);
}

.summary-card.refund {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05), rgba(5, 150, 105, 0.1));
    border-color: #059669;
}

.summary-card.owe {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.1));
    border-color: #dc2626;
}

.summary-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.summary-card.highlight .card-value {
    color: var(--primary-color);
}

.summary-card.refund .card-value {
    color: #059669;
}

.summary-card.owe .card-value {
    color: #dc2626;
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tax Breakdown */
.tax-breakdown {
    margin-bottom: var(--spacing-xl);
}

.tax-breakdown h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-xs);
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.breakdown-section {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.breakdown-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

.calculation-table {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.calc-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    font-weight: 600;
}

.calc-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.calc-amount {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.calc-row.total .calc-label,
.calc-row.total .calc-amount {
    color: var(--text-primary);
    font-weight: 700;
}

/* Refund Breakdown */
.refund-breakdown {
    margin-bottom: var(--spacing-xl);
}

.refund-breakdown h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-xs);
}

.refund-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.refund-section {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.refund-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

.refund-calc {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.refund-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.refund-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    font-weight: 600;
}

.refund-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.refund-amount {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.refund-row.total .refund-label,
.refund-row.total .refund-amount {
    color: var(--text-primary);
    font-weight: 700;
}

.refund-amount.positive {
    color: #059669;
}

.refund-amount.negative {
    color: #dc2626;
}

/* Tax Tips */
.tax-tips h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--spacing-xs);
}

.tax-tips-content {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.tax-tip {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.tax-tip:last-child {
    margin-bottom: 0;
}

.tax-tip.refund {
    border-left-color: #059669;
    background: #d1fae5;
}

.tax-tip.owe {
    border-left-color: #dc2626;
    background: #fee2e2;
}

.tax-tip.neutral {
    border-left-color: #f59e0b;
    background: #fef3cd;
}

.tip-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.tip-text {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .calculator-container,
    .results-container {
        padding: var(--spacing-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-header {
        flex-direction: column;
        text-align: center;
    }
    
    .result-actions {
        justify-content: center;
    }
    
    .breakdown-grid,
    .refund-table {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}

/* Tax Refund Guide Section */
.tax-refund-guide-section {
    background: #f8fafc;
    padding: 4rem 0;
}

.guide-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
}

.refund-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.guide-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.guide-card h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.5rem;
}

.refund-process {
    margin-bottom: 2rem;
}

.process-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.process-step strong {
    color: #1e293b;
    display: block;
    margin-bottom: 0.5rem;
}

.refund-formula {
    background: #e0f2fe;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.formula-box {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0369a1;
    text-align: center;
    margin-top: 0.5rem;
}

.tax-changes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.change-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.change-category strong {
    color: #1e293b;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.change-category ul {
    margin: 0;
    padding-left: 1.5rem;
}

.change-category li {
    margin-bottom: 0.5rem;
    color: #64748b;
}

.maximization-strategies {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.strategy-item {
    background: #f0fdf4;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #22c55e;
}

.strategy-item strong {
    color: #166534;
    display: block;
    margin-bottom: 0.75rem;
}

.strategy-item ul {
    margin: 0;
    padding-left: 1.5rem;
}

.strategy-item li {
    margin-bottom: 0.5rem;
    color: #15803d;
}

.refund-timing {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timing-info, .refund-options, .refund-tracking {
    background: #fef3c7;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.timing-info strong, .refund-options strong, .refund-tracking strong {
    color: #92400e;
    display: block;
    margin-bottom: 0.75rem;
}

.timing-info ul, .refund-options ul, .refund-tracking ul {
    margin: 0;
    padding-left: 1.5rem;
}

.timing-info li, .refund-options li, .refund-tracking li {
    margin-bottom: 0.5rem;
    color: #a16207;
}

/* Refund Optimization Section */
.refund-optimization-section {
    background: white;
    padding: 4rem 0;
}

.optimization-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.optimization-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.optimization-card h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #8b5cf6;
    padding-bottom: 0.5rem;
}

.strategy-explanation {
    background: #f3e8ff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #8b5cf6;
}

.withholding-tips {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tip-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tip-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 0.75rem;
}

.tip-item p {
    color: #64748b;
    margin-bottom: 0.75rem;
}

.tip-item ul {
    margin: 0;
    padding-left: 1.5rem;
}

.tip-item li {
    margin-bottom: 0.5rem;
    color: #64748b;
}

.credit-strategies {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.credit-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.credit-category strong {
    color: #1e293b;
    display: block;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.credit-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f1f5f9;
    border-radius: 6px;
}

.credit-name {
    color: #475569;
    font-weight: 500;
}

.credit-amount {
    color: #059669;
    font-weight: bold;
}

.year-end-strategies {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.planning-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.planning-category strong {
    color: #1e293b;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.planning-category ul {
    margin: 0;
    padding-left: 1.5rem;
}

.planning-category li {
    margin-bottom: 0.5rem;
    color: #64748b;
}

.refund-usage-strategies {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.usage-priority {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3b82f6;
}

.usage-priority strong {
    color: #1e40af;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.usage-priority p {
    color: #64748b;
    margin: 0;
}

/* FAQ Section Styles */
.faq-section {
    background: #f8fafc;
    padding: 4rem 0;
}

.faq-container {
    max-width: 80%;
    margin: 0 auto;
}

.faq-container h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
    font-size: 2.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f1f5f9;
}

.faq-question.active {
    background-color: #e0f2fe;
    color: #0369a1;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Mobile Responsive for New Sections */
@media (max-width: 768px) {
    .refund-guide-grid,
    .optimization-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .guide-card,
    .optimization-card {
        padding: 1.5rem;
    }

    .guide-card h3,
    .optimization-card h3 {
        font-size: 1.3rem;
    }

    .faq-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .faq-container h2 {
        font-size: 2rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }

    .faq-answer.active {
        padding: 0 1rem 1rem;
    }

    .credit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .process-step,
    .tip-item,
    .strategy-item {
        padding: 1rem;
    }

    .formula-box {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}
