/* blog-form-calc.css — the "form card" calculators: retirement, FIRE, home
   affordability, insurance check. Their inline <style> was moved out in Feb 2026
   (be2e8be), but into blog-calculator.css, which styles a different set of classes,
   so these four pages had no styling for their forms or results until 28 Oct 2026.
   Rules restored from the originals; colours follow blog-theme.css. */

.intro-box {
    background: rgba(106, 166, 255, 0.08);
    border: 1px solid rgba(106, 166, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.section-title { color: #f1f5f9; font-size: 1.1rem; margin: 24px 0 12px; }

/* Inputs */
.form-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.form-card h3 { color: #f1f5f9; font-size: 1rem; margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-group label { font-size: 0.8rem; color: #a3b3cc; font-weight: 500; }
.form-group input,
.form-group select {
    width: 100%;
    background: #0f2039;
    border: 1px solid #2a4a78;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #6aa6ff;
    box-shadow: 0 0 0 2px rgba(106, 166, 255, 0.25);
}
.toggle-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.toggle-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #6aa6ff; }
.toggle-row label { color: #e8eef8; font-size: 0.9rem; }

.btn-primary {
    display: block;
    width: 100%;
    margin: 20px 0;
    padding: 12px 28px;
    border: 0;
    border-radius: 10px;
    background: #2f6fe0;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.btn-primary:hover { background: #4a88f5; }
.btn-primary:focus-visible { outline: 2px solid #6aa6ff; outline-offset: 2px; }

/* Results: hidden until the page's script adds .visible */
.results-section { display: none; }
.results-section.visible { display: block; }
.result-group {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.result-group h3 {
    color: #f1f5f9;
    font-size: 1rem;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.9rem;
}
.result-label { color: #a3b3cc; }
.result-value { color: #fff; font-weight: 600; text-align: right; white-space: nowrap; }
.result-value.green { color: #4cc38a; }
.result-value.red { color: #ff7b6b; }
.result-value.yellow { color: #f2b14b; }
.result-total { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 8px; padding-top: 8px; }
.big-number { text-align: center; padding: 20px; }
.big-number .amount { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.big-number .label { color: #a3b3cc; font-size: 0.85rem; margin-top: 4px; }

/* Retirement: surplus / shortfall */
.gap-box { border-radius: 12px; padding: 20px; text-align: center; margin-top: 16px; }
.gap-box.surplus { background: rgba(76, 195, 138, 0.1); border: 1px solid rgba(76, 195, 138, 0.35); }
.gap-box.shortfall { background: rgba(255, 123, 107, 0.1); border: 1px solid rgba(255, 123, 107, 0.35); }

/* FIRE */
.fire-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.fire-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.fire-card .label { color: #a3b3cc; font-size: 0.8rem; margin-bottom: 4px; }
.fire-card .amount { font-size: 1.3rem; font-weight: 700; }
.fire-card.primary .amount { color: #4cc38a; }
.fire-card.secondary .amount { color: #6aa6ff; }
.fire-card.warn .amount { color: #f2b14b; }

/* Home affordability */
.dsr-bar { width: 100%; height: 24px; background: rgba(255, 255, 255, 0.1); border-radius: 12px; overflow: hidden; margin: 8px 0; }
.dsr-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}
.dsr-pass { background: #2f9e6b; }
.dsr-warn { background: #c98a2b; }
.dsr-fail { background: #d4574a; }
.max-affordable-box {
    background: rgba(76, 195, 138, 0.1);
    border: 1px solid rgba(76, 195, 138, 0.35);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 16px;
}
.max-affordable-box .amount { font-size: 1.6rem; color: #4cc38a; font-weight: 700; }
.max-affordable-box .label { color: #a3b3cc; font-size: 0.85rem; margin-top: 4px; }
.breakdown-table { width: 100%; font-size: 0.85rem; margin-top: 8px; }
.breakdown-table td { padding: 4px 0; }
.breakdown-table td:last-child { text-align: right; color: #fff; font-weight: 500; }

/* Insurance check */
.coverage-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}
.coverage-card h4 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; }
.coverage-card h4 span:first-child { color: #f1f5f9; font-size: 0.95rem; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge-ok { background: rgba(76, 195, 138, 0.2); color: #4cc38a; }
.badge-low { background: rgba(242, 177, 75, 0.2); color: #f2b14b; }
.badge-gap { background: rgba(255, 123, 107, 0.2); color: #ff9f93; }
.bar-bg { width: 100%; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.bar-green { background: #4cc38a; }
.bar-yellow { background: #f2b14b; }
.bar-red { background: #ff7b6b; }

.info-note {
    background: rgba(242, 177, 75, 0.08);
    border: 1px solid rgba(242, 177, 75, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #f2c77a;
}

/* "Open the app" box */
.cta-box {
    background: rgba(106, 166, 255, 0.08);
    border: 1px solid rgba(106, 166, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin: 30px 0 20px;
}
.cta-box h2 { color: #f1f5f9; font-size: 1.2rem; margin: 0 0 8px; }
.cta-box p { color: #a3b3cc; margin: 0 0 16px; font-size: 0.9rem; }
.cta-btn {
    display: inline-block;
    background: #2f6fe0;
    color: #fff !important;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}
.cta-btn:hover { background: #4a88f5; }

@media (max-width: 480px) {
    .form-grid,
    .fire-cards { grid-template-columns: 1fr; }
}
