/* =========================================================================
   HOURLY TO ANNUAL CALCULATOR - STYLES
   Prefix: hta__
   ========================================================================= */

.hta__form {
    font-family: inherit;
    color: var(--text-1);
}

.hta__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    background: var(--surface-1);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    overflow: hidden;
}

@media (min-width: 768px) {
    .hta__container {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Left Column: Inputs --- */
.hta__inputs {
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
    background: var(--bg);
}

.hta__field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.hta__label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-2);
}

.hta__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.hta__prefix,
.hta__icon-prefix {
    position: absolute;
    color: var(--text-3);
    font-weight: 700;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.hta__prefix { left: 16px; }
.hta__icon-prefix { 
    left: 14px; 
    color: var(--text-2);
    opacity: 0.6;
}

.hta__input {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-1);
    background: var(--surface-1);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.hta__input-wrap:has(.hta__prefix) .hta__input { padding-left: 32px; }
.hta__input-wrap:has(.hta__icon-prefix) .hta__input { padding-left: 42px; }

.hta__input:focus {
    border-color: var(--accent, var(--green));
    box-shadow: 0 0 0 4px rgba(0, 93, 72, 0.1), inset 0 1px 2px rgba(0,0,0,0.02);
    background: var(--bg);
}

/* Segmented Control */
.hta__segmented-control {
    display: flex;
    flex-wrap: wrap;
    background: var(--surface-2);
    padding: 6px;
    border-radius: var(--r-lg);
    gap: 4px;
    border: 1px solid var(--border-1);
}

.hta__seg-btn {
    flex: 1 1 calc(50% - 4px);
    padding: 10px 8px;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-2);
    background: transparent;
    border: none;
    border-radius: var(--r-md);
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.hta__seg-btn small {
    font-size: var(--text-xs);
    font-weight: 500;
    opacity: 0.8;
    display: block;
    margin-top: 2px;
}

.hta__seg-btn:hover:not(.hta__seg-btn--active) {
    color: var(--text-1);
    background: rgba(0,0,0,0.03);
}

.hta__seg-btn--active {
    background: #fff;
    color: var(--accent, var(--green));
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

/* --- Right Column: Results --- */
.hta__results {
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    justify-content: center;
}

.hta__result-card {
    background: var(--bg);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    text-align: center;
}

.hta__result-card--primary {
    border: 1px solid rgba(0, 93, 72, 0.2);
    background: linear-gradient(135deg, rgba(0, 93, 72, 0.08) 0%, rgba(0, 93, 72, 0.02) 100%);
    padding: var(--sp-6);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02), inset 0 1px 0 rgba(255,255,255,0.6);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hta__result-card--primary::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 93, 72, 0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hta__result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
}

@media (min-width: 1024px) {
    .hta__result-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

.hta__result-label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-2);
}

.hta__result-value {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-1);
    font-family: var(--font-mono, monospace);
}

.hta__result-card--primary .hta__result-value {
    font-size: var(--text-3xl);
}

.hta__text-accent {
    color: var(--accent, var(--green));
}

.hta__result-subtext {
    font-size: var(--text-sm);
    color: var(--text-2);
    margin-top: var(--sp-2);
}

/* Tax Wrap */
.hta__tax-wrap {
    background: var(--bg);
    border: 1px solid var(--border-1);
    border-radius: var(--r-md);
    overflow: hidden;
}

.hta__tax-header {
    background: var(--surface-2);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-1);
    border-bottom: 1px solid var(--border-1);
}

.hta__tax-row {
    display: flex;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-1);
    font-size: var(--text-sm);
    color: var(--text-1);
}

.hta__tax-row--total {
    background: rgba(0, 93, 72, 0.05);
    font-weight: 700;
    border-bottom: none;
}

.hta__font-mono {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
}

.hta__text-danger {
    color: #d32f2f;
}

.hta__text-lg {
    font-size: var(--text-lg);
}

.hta__tax-note {
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-xs);
    color: var(--text-3);
    background: var(--surface-1);
    border-top: 1px solid var(--border-1);
}

/* AI Insight Block */
.hta__ai-insight {
    background: linear-gradient(145deg, #f0fdf4 0%, #e6f6ec 100%);
    border: 1px solid rgba(0, 168, 107, 0.2);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 168, 107, 0.05);
}

.hta__ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent, var(--green));
    margin-bottom: 8px;
}

.hta__ai-text {
    font-size: var(--text-sm);
    color: var(--text-1);
    line-height: 1.5;
    font-weight: 500;
}

/* --- Dark Mode Overrides --- */
[data-theme="dark"] .hta__container {
    background: var(--surface-1);
}
[data-theme="dark"] .hta__inputs {
    background: var(--surface-2);
}
[data-theme="dark"] .hta__result-card,
[data-theme="dark"] .hta__tax-wrap {
    background: var(--surface-2);
}
[data-theme="dark"] .hta__input {
    background: var(--bg);
}
[data-theme="dark"] .hta__tax-header {
    background: var(--surface-3);
}

[data-theme="dark"] .hta__segmented-control {
    background: rgba(0,0,0,0.2);
    border-color: var(--border-2);
}
[data-theme="dark"] .hta__seg-btn:hover:not(.hta__seg-btn--active) {
    background: rgba(255,255,255,0.05);
}
[data-theme="dark"] .hta__seg-btn--active {
    background: var(--surface-3);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
[data-theme="dark"] .hta__ai-insight {
    background: linear-gradient(145deg, rgba(0, 168, 107, 0.1) 0%, rgba(0, 93, 72, 0.15) 100%);
    border-color: rgba(0, 168, 107, 0.2);
}
[data-theme="dark"] .hta__result-card--primary {
    background: linear-gradient(135deg, rgba(0, 93, 72, 0.15) 0%, rgba(0, 93, 72, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: rgba(0, 93, 72, 0.4);
}
[data-theme="dark"] .hta__result-card--primary::before {
    display: none;
}
