/* ==========================================================================
   VA Loan Entitlement Calculator
   ========================================================================== */

/* ---------- Form Layout ---------- */
.entitlement-form {
    margin-bottom: 2rem;
}

.ent-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 540px) {
    .ent-form-row {
        grid-template-columns: 1fr;
    }
}

.ent-form-group {
    margin-bottom: 1rem;
}

.ent-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.ent-form-group label small {
    font-weight: 400;
    color: var(--text-muted);
}

.ent-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

/* ---------- Select (layout overrides — base from .site-select) ---------- */
.ent-select {
    font-size: 0.9rem;
    padding: 0.6rem 2.5rem 0.6rem 0.75rem;
}

/* ---------- Currency Input ---------- */
.ent-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ent-input-prefix {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.ent-input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 1.5rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-off-white);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: border-color 0.15s;
}

.ent-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* ---------- Radio Group ---------- */
.ent-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.ent-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 400 !important;
}

.ent-radio-label input[type="radio"] {
    accent-color: var(--primary-blue);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.ent-radio-label small {
    color: var(--text-muted);
}

/* ---------- County Limit Display ---------- */
.ent-limit-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-off-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.ent-limit-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ent-limit-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-blue);
}

/* ---------- Calculate Button ---------- */
.ent-calc-btn {
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* ---------- Results ---------- */
.ent-result-box {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-off-white);
}

.ent-result-box h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ent-result-box h3 i {
    color: var(--primary-blue);
}

/* Full entitlement result */
.ent-result-full {
    text-align: center;
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.ent-result-full h3 {
    justify-content: center;
    color: var(--success-green);
    font-size: 1.2rem;
}

.ent-result-icon {
    font-size: 2.5rem;
    color: var(--success-green);
    margin-bottom: 0.5rem;
}

.ent-result-full p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.ent-result-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sm);
}

.ent-detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ent-detail-value {
    font-weight: 600;
    color: var(--text-main);
}

/* Breakdown rows */
.ent-breakdown {
    display: flex;
    flex-direction: column;
}

.ent-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.ent-row-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ent-row-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.ent-row-success .ent-row-value {
    color: var(--success-green);
}

.ent-row-warning .ent-row-value {
    color: var(--alert-red);
}

.ent-row-highlight {
    background: rgba(30, 64, 175, 0.05);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.5rem;
    margin: 0.25rem -0.5rem;
}

.ent-row-highlight .ent-row-label {
    font-weight: 600;
    color: var(--text-main);
}

.ent-row-highlight .ent-row-value {
    color: var(--primary-blue);
    font-size: 1.05rem;
}

.ent-breakdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.35rem 0;
}

.ent-result-note {
    font-size: 0.85rem;
    color: var(--alert-red);
    margin: 0.75rem 0 0;
    padding: 0.75rem;
    background: rgba(220, 38, 38, 0.05);
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

.ent-result-note i {
    margin-right: 0.25rem;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] .ent-input {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ent-limit-display {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ent-result-box {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ent-result-full {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .ent-result-detail {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .ent-row-highlight {
    background: rgba(30, 64, 175, 0.15);
}

/* ---------- Print ---------- */
@media print {
    .ent-calc-btn { display: none; }
}
