/* assets/css/calculators/income-tax-calculator.css */

.tax-widget-container {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-form {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.input-wrapper {
    margin-bottom: 1.5rem;
}

.input-header {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-field,
select.input-field {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s;
}

.input-field:focus,
select.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f1f5f9;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.toggle-wrapper:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.toggle-wrapper input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.calc-action-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.calc-action-btn:hover {
    background: var(--primary-hover, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.calc-action-btn:active {
    transform: translateY(0);
}

.result-container {
    margin-top: 2rem;
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-card {
    background: #10b981;
    color: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.hero-label {
    opacity: 0.9;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.hero-value {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.tax-breakdown {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
    transition: background 0.2s;
}

.breakdown-row:hover {
    background: #f8fafc;
}

.breakdown-row:last-child {
    border-bottom: none;
    font-weight: 700;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.breakdown-row.sub-info {
    background: #f1f5f9;
    font-size: 0.85rem;
    color: #64748b;
    padding: 10px 20px;
}

.breakdown-row span:last-child {
    font-weight: 600;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    flex-shrink: 0;
}

.dot.fed {
    background: #ef4444;
}

.dot.state {
    background: #f59e0b;
}

.dot.fica {
    background: #3b82f6;
}

.chart-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.chart-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    --fed: 0%;
    --state: 0%;
    --fica: 0%;
    background: conic-gradient(#ef4444 0% var(--fed),
            #f59e0b var(--fed) var(--state),
            #3b82f6 var(--state) var(--fica),
            #10b981 var(--fica) 100%);
    transition: --fed 0.8s ease, --state 0.8s ease, --fica 0.8s ease;
}

.chart-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.chart-hole span:first-child {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.chart-hole strong {
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
}

.result-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 700px) {
    .result-grid-layout {
        grid-template-columns: 1fr;
    }
    .hero-value {
        font-size: 2.4rem;
    }
    .chart-container {
        width: 160px;
        height: 160px;
    }
    .chart-hole {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .calculator-form {
        padding: 1.5rem;
    }
    .calc-action-btn {
        padding: 1rem;
    }
}

#earners {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8fafc;
}

#earners:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.earners-wrapper {
    grid-column: span 1;
}

.earners-note {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.tax-widget-container p {
    line-height: 1.6;
    margin-bottom: 24px;
    color: #334155;
    max-width: 780px;
}

.tax-widget-container li {
    line-height: 1.6;
    margin-bottom: 12px;
    color: #334155;
}

.tax-widget-container h2,
.tax-widget-container h3,
.tax-widget-container h4 {
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
    color: #1e293b;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.validation-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}
