/* ============================================
   QALB WELFARE FOUNDATION — FORM STYLESHEET
   Shared styles for all questionnaire-style forms
   (financial-report.html, membership.html, etc.)
   Link this AFTER style.css:
     <link rel="stylesheet" href="../style.css" />
     <link rel="stylesheet" href="../form.css" />

   NOTE: this file now reuses the brand variables
   defined in style.css (--brick, --ink, --line,
   --font-body, --font-urdu, etc.) instead of its
   own hardcoded colors/fonts, so it matches the
   rest of the site (and isn't a hotter/warmer red
   than the shared --brick).
   ============================================ */

/* ── Page wrapper ─────────────────────────────────────── */
.form-content {
    padding-bottom: 0;
}

/* ── Intro box ────────────────────────────────────────── */
.form-intro {
    background: #fff;
    border-left: 5px solid var(--brick);
    border-radius: 8px;
    padding: 22px 26px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.form-intro h2 {
    font-size: 1.15rem;
    color: var(--brick);
    margin-bottom: 8px;
}

.form-intro p {
    font-size: 0.87rem;
    color: var(--ink-soft);
}

/* Optional Urdu line inside intro box (used by financial-report.html) */
.form-intro-urdu {
    direction: rtl;
    text-align: right;
    font-size: 1.05rem;
    line-height: 2;
    color: var(--ink);
    margin-bottom: 8px;
    font-family: var(--font-urdu);
}

/* ── Question card ────────────────────────────────────── */
.q-card {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.09);
    overflow: hidden;
}

.q-head {
    background: var(--brick);
    padding: 11px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.q-num {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 700;
    flex-shrink: 0;
}

.q-label {
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    flex: 1;
}

.q-req {
    font-size: 0.69rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.18);
    padding: 2px 9px;
    border-radius: 20px;
}

.q-body {
    padding: 15px 18px 18px;
}

/* ── Inputs ───────────────────────────────────────────── */
.q-input,
.q-select,
.q-textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 7px;
    padding: 10px 13px;
    font-size: 0.92rem;
    color: var(--ink);
    background: var(--paper-deep);
    font-family: var(--font-body);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.q-input:focus,
.q-select:focus,
.q-textarea:focus {
    border-color: var(--brick);
    box-shadow: 0 0 0 3px var(--brick-tint-strong);
    background: #fff;
}

.q-textarea {
    resize: vertical;
    min-height: 88px;
}

.q-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4.5 4.5L10 1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}

/* ── Radio chips ──────────────────────────────────────── */
.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.radio-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1.5px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.88rem;
    font-family: var(--font-body);
    color: var(--ink-soft);
    background: var(--paper-deep);
    transition: border-color 0.14s, background 0.14s, color 0.14s;
    user-select: none;
}

.radio-chip:hover {
    border-color: var(--brick);
}

.radio-chip input[type="radio"] {
    display: none;
}

.radio-chip.active {
    border-color: var(--brick);
    background: var(--brick-tint);
    color: var(--brick-deep);
    font-weight: 600;
}

.chip-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    transition: all 0.14s;
}

.radio-chip.active .chip-dot {
    border-color: var(--brick);
    background: var(--brick);
    box-shadow: inset 0 0 0 3px #fff;
}

/* ── Error toast ──────────────────────────────────────── */
.error-toast {
    display: none;
    background: var(--brick-tint);
    border: 1px solid var(--brick-tint-strong);
    color: var(--brick-deep);
    border-radius: 7px;
    padding: 11px 15px;
    font-size: 0.87rem;
    margin-bottom: 14px;
}

/* ── Success screen ───────────────────────────────────── */
.success-box {
    display: none;
    background: #fff;
    border-radius: 8px;
    padding: 52px 32px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.09);
    margin-bottom: 24px;
}

.success-icon-wrap {
    width: 68px;
    height: 68px;
    background: var(--brick);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.success-icon-wrap svg {
    color: #fff;
}

.success-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brick);
    margin-bottom: 10px;
}

.success-sub {
    color: var(--ink-soft);
    font-size: 0.93rem;
    line-height: 1.9;
}

/* Optional Urdu line inside success message (used by financial-report.html) */
.success-sub .urdu {
    display: block;
    direction: rtl;
    font-size: 1rem;
    font-family: var(--font-urdu);
    color: var(--ink);
    margin-bottom: 4px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--brick);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1.5px solid var(--brick);
}

/* ── Progress bar (fixed bottom) ─────────────────────── */
.prog-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 100;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
    margin-top: 10px;
    border-radius: 8px;
}

.prog-label {
    font-size: 0.82rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

.prog-track {
    flex: 1;
    height: 5px;
    background: #eee;
    border-radius: 99px;
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    background: var(--brick);
    border-radius: 99px;
    width: 0%;
    transition: width 0.25s;
}

.btn-submit {
    background: var(--brick);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.2px;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-submit:hover {
    background: var(--brick-deep);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Mobile overrides ─────────────────────────────────── */
@media (max-width: 768px) {
    .form-intro {
        padding: 16px 14px;
    }

    .form-intro-urdu {
        font-size: 0.97rem;
    }

    .q-head {
        padding: 10px 14px;
    }

    .q-body {
        padding: 13px 14px 15px;
    }

    .radio-chip {
        padding: 8px 12px;
        font-size: 0.84rem;
    }

    .prog-bar {
        padding: 9px 12px;
        gap: 10px;
    }

    .prog-label {
        font-size: 0.78rem;
    }

    .btn-submit {
        padding: 9px 16px;
        font-size: 0.85rem;
    }

    .success-box {
        padding: 36px 20px;
    }
}