/* =============================================================
   INCOME TAX CALCULATOR - CalcLeaf light theme
   White cards, teal accent, navy section headers, gray borders.
   All classes are prefixed "itc-" to avoid collisions with other tools.
   ============================================================= */

.itc-tool {
    max-width: 920px;
    margin: 0 auto;
    font-family: inherit;
    color: #1e2a4a;
}

/* ---------- Top settings card ---------- */
.itc-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.itc-hint {
    background: #1e2a4a;
    color: #ffffff;
    font-size: 13px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.itc-hint-icon {
    font-size: 11px;
}

/* ---------- Section cards (Income / Deductions & Credits) ---------- */
.itc-section-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.itc-section-header {
    background: #1e2a4a;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 16px;
}

/* ---------- Form grid ---------- */
.itc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    padding: 18px 16px;
}

.itc-top-grid {
    padding-top: 0;
}

.itc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.itc-field-wide {
    grid-column: 1 / -1;
}

.itc-field label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.itc-subtext {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    margin-top: 2px;
}

/* ---------- Inputs ---------- */
.itc-input,
.itc-select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1e2a4a;
    background: #ffffff;
    width: 100%;
}

.itc-input:focus,
.itc-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.itc-input-prefix,
.itc-input-suffix {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.itc-input-prefix .itc-input,
.itc-input-suffix .itc-input {
    border: none;
    border-radius: 0;
}

.itc-input-prefix .itc-input:focus,
.itc-input-suffix .itc-input:focus {
    box-shadow: none;
}

.itc-prefix,
.itc-suffix {
    padding: 0 10px;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    align-self: stretch;
}

.itc-prefix {
    border-right: 1px solid #d1d5db;
}

.itc-suffix {
    border-left: 1px solid #d1d5db;
}

/* ---------- Radio groups ---------- */
.itc-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    min-height: 36px;
}

.itc-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
}

.itc-radio input[type="radio"] {
    accent-color: #10b981;
    width: 15px;
    height: 15px;
}

/* ---------- College expense grid ---------- */
.itc-college-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ---------- Buttons ---------- */
.itc-actions {
    display: flex;
    gap: 10px;
    padding: 0 16px 20px 16px;
}

.itc-btn {
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s;
}

.itc-btn:hover {
    opacity: 0.9;
}

.itc-btn-primary {
    background: #10b981;
    color: #ffffff;
}

.itc-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

/* ---------- Refund/Owe box ---------- */
.itc-refund-box {
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
}

.itc-refund-box.itc-refund {
    background: #ecfdf5;
    border-color: #10b981;
}

.itc-refund-box.itc-owe {
    background: #fef2f2;
    border-color: #ef4444;
}

.itc-refund-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.itc-refund-value {
    font-size: 32px;
    font-weight: 800;
    color: #1e2a4a;
}

.itc-refund-box.itc-refund .itc-refund-value {
    color: #10b981;
}

.itc-refund-box.itc-owe .itc-refund-value {
    color: #ef4444;
}

/* ---------- Results ---------- */
.itc-results-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.itc-results-header {
    background: #1e2a4a;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
}

.itc-results-body {
    padding: 8px 16px;
}

.itc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #374151;
}

.itc-result-row:first-child {
    border-top: none;
}

.itc-result-row span:last-child {
    font-weight: 600;
    color: #1e2a4a;
}

.itc-result-total {
    border-top: 2px solid #d1d5db;
    font-weight: 700;
}

.itc-result-total span {
    font-size: 15px;
}

/* ---------- Disclaimer ---------- */
.itc-disclaimer {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
    padding: 0 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .itc-form-grid,
    .itc-college-grid {
        grid-template-columns: 1fr;
    }

    .itc-actions {
        flex-direction: column;
    }

    .itc-btn {
        width: 100%;
    }
}
