/* ETax Simple 401k Tax Calculator */
#etax-401k-wrap {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 980px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.etax-401k-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px;
}

.etax-401k-inputs {
    flex: 1;
    min-width: 0;
}

.etax-401k-results {
    width: 350px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}

.etax-401k-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F3F4F6;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.etax-401k-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.etax-401k-row {
    margin-bottom: 18px;
}

.etax-401k-row label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.etax-401k-opt {
    font-weight: 400;
    color: #9CA3AF;
    font-size: 0.78rem;
}

.etax-401k-hint {
    font-size: 0.78rem;
    color: #9CA3AF;
    margin: 5px 0 0;
    line-height: 1.4;
}

.etax-401k-row select,
.etax-401k-plain-input,
.etax-401k-input-wrap input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111827;
    background: #F9FAFB;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.etax-401k-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.etax-401k-row select:focus,
.etax-401k-plain-input:focus,
.etax-401k-input-wrap input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5,150,105,0.12);
    background: #fff;
}

.etax-401k-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.etax-401k-prefix {
    position: absolute;
    left: 14px;
    color: #6B7280;
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: none;
}

.etax-401k-suffix {
    position: absolute;
    right: 14px;
    color: #6B7280;
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: none;
}

.etax-401k-input-wrap input:not(.etax-401k-no-prefix) {
    padding-left: 28px;
}

.etax-401k-no-prefix {
    padding-left: 14px !important;
}

/* Contribution row: % or $ side by side */
.etax-401k-contrib-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.etax-401k-contrib-sep {
    font-size: 0.8rem;
    color: #9CA3AF;
    font-weight: 600;
    flex-shrink: 0;
}

#etax-401k-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
}

#etax-401k-btn:hover  { opacity: 0.92; }
#etax-401k-btn:active { transform: scale(0.98); }

/* Results */
.etax-401k-result-rows {
    display: flex;
    flex-direction: column;
}

.etax-401k-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #F3F4F6;
}

.etax-401k-result-row span   { color: #6B7280; }
.etax-401k-result-row strong { color: #111827; font-weight: 600; }

.etax-401k-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 6px 0;
}

.etax-401k-contrib-row-res strong { color: #059669 !important; font-weight: 700; }
.etax-401k-savings-row strong     { color: #059669 !important; font-weight: 700; font-size: 1rem; }
.etax-401k-net-row strong         { color: #047857 !important; font-weight: 700; font-size: 1rem; }

/* Savings highlight box */
.etax-401k-savings-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: linear-gradient(135deg, #059669, #047857);
    border-radius: 12px;
    padding: 18px 16px;
    margin-top: 16px;
    color: #fff;
    text-align: center;
}

.etax-401k-savings-col { flex: 1; }

.etax-401k-savings-label {
    font-size: 0.78rem;
    opacity: 0.85;
    font-weight: 600;
    margin-bottom: 4px;
}

.etax-401k-savings-col > div:last-child {
    font-size: 1.35rem;
    font-weight: 800;
}

.etax-401k-savings-divider {
    width: 1px;
    height: 44px;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* Warning */
.etax-401k-warn {
    background: #FEF3C7;
    border: 1.5px solid #FCD34D;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #92400E;
    margin-top: 12px;
}

.etax-401k-disclaimer {
    font-size: 0.72rem;
    color: #9CA3AF;
    text-align: center;
    margin: 16px 0 0;
    line-height: 1.5;
}

@media (max-width: 760px) {
    #etax-401k-wrap {
        flex-direction: column;
    }
    .etax-401k-results {
        width: 100%;
        position: static;
    }
    .etax-401k-contrib-row {
        flex-direction: column;
        gap: 8px;
    }
    .etax-401k-contrib-sep { display: none; }
}
