/* Tax Calculator Tool Styles */

/* Tool Container - Full Page Layout */
.tax-calculator-tool {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    margin: 0;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(34, 33, 33);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-header h1 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.tool-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Filing Status Tabs */
.filing-status-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    background: #f3f4f6;
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.status-tab {
    padding: 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.status-tab:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.status-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Form Styles */
.tax-form {
    margin-top: 1.5rem;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.input-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-label i {
    color: var(--primary-color);
    width: 16px;
}

.form-input, .form-select {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Deduction Toggle */
.deduction-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.deduction-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.deduction-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.deduction-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Itemized Deductions Section */
.itemized-deductions {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.itemized-deductions h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.itemized-deductions h3 i {
    color: var(--primary-color);
}

.deductions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Withholding Section */
.withholding-section {
    background: #f0f9ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #bae6fd;
}

.withholding-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.withholding-section h3 i {
    color: #0ea5e9;
}

.withholding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Action Controls */
.action-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.calculate-btn, .clear-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
    justify-content: center;
}

.calculate-btn {
    background: var(--primary-color);
    color: white;
}

.calculate-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.calculate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clear-btn {
    background: #f3f4f6;
    color: var(--text-color);
}

.clear-btn:hover {
    background: #e5e7eb;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.results-header h2 i {
    color: var(--primary-color);
}

.copy-result-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-result-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Specific Card Colors */
.income-card .card-header i { color: #10b981; }
.income-card .card-value { color: #10b981; }

.taxable-card .card-header i { color: #f59e0b; }
.taxable-card .card-value { color: #f59e0b; }

.federal-card .card-header i { color: #ef4444; }
.federal-card .card-value { color: #ef4444; }

.state-card .card-header i { color: #8b5cf6; }
.state-card .card-value { color: #8b5cf6; }

.total-card .card-header i { color: #dc2626; }
.total-card .card-value { color: #dc2626; }

.net-card .card-header i { color: #059669; }
.net-card .card-value { color: #059669; }

.effective-card .card-header i { color: #0ea5e9; }
.effective-card .card-value { color: #0ea5e9; }

.marginal-card .card-header i { color: #7c3aed; }
.marginal-card .card-value { color: #7c3aed; }

/* Refund Section */
.refund-section {
    margin-bottom: 2rem;
}

.refund-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.refund-card.owed {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    border-color: #ef4444;
}

.refund-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.refund-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.refund-header i {
    font-size: 1.5rem;
    color: #10b981;
}

.refund-card.owed .refund-header i {
    color: #ef4444;
}

.refund-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.refund-card.owed .refund-amount {
    color: #ef4444;
}

.refund-description {
    font-size: 1rem;
    color: var(--text-light);
}

/* Brackets and Breakdown Sections */
.brackets-section, .breakdown-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.brackets-section h3, .breakdown-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brackets-section h3 i, .breakdown-section h3 i {
    color: var(--primary-color);
}

.brackets-content, .breakdown-content {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    line-height: 1.6;
}

/* Tax Bracket Visualization */
.bracket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.bracket-rate {
    font-weight: 700;
    color: var(--primary-color);
}

.bracket-range {
    color: var(--text-color);
}

.bracket-tax {
    font-weight: 600;
    color: var(--text-light);
}

/* Examples Section */
.examples-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.examples-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.examples-section h3 i {
    color: var(--primary-color);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.example-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.example-item:hover {
    background: #f0f9ff;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.example-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.example-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.example-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* SEO Content */
.seo-content {
    background: white;
    padding: 3rem 0;
    margin-top: 2rem;
}

.seo-content .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.seo-content h2, .seo-content h3, .seo-content h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.seo-content p, .seo-content li {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.seo-content ul {
    padding-left: 1.5rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }

    .calculator-card, .results-section, .examples-section {
        padding: 1.5rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filing-status-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .status-tab {
        padding: 0.75rem 0.25rem;
        font-size: 0.75rem;
        flex-direction: row;
        gap: 0.25rem;
        text-align: center;
    }

    .status-tab i {
        font-size: 0.875rem;
    }

    .deductions-grid, .withholding-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .action-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .calculate-btn, .clear-btn {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .bracket-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 0.75rem;
    }

    .tool-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .calculator-card, .results-section, .examples-section {
        padding: 1rem;
    }

    .filing-status-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .status-tab {
        padding: 0.75rem 0.25rem;
        flex-direction: column;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .status-tab i {
        font-size: 0.875rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .refund-amount {
        font-size: 2rem;
    }

    .deduction-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .deduction-btn {
        padding: 1rem;
        justify-content: center;
    }

    .itemized-deductions, .withholding-section {
        padding: 1rem;
    }

    .related-tools-section {
        padding: 1rem;
        margin: 1rem 0.75rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tool-link {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
        text-align: left;
    }
}

/* Related Tools Section */
.related-tools-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgb(34, 33, 33);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: var(--primary-color);
}

.related-tools-header p {
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Responsive styles for Related Tools */
@media (max-width: 768px) {
    .related-tools-section {
        padding: 1.5rem;
        margin: 1.5rem 1rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 4px;
    }

    .related-tool-link i {
        font-size: 1.1rem;
    }
}
