/* =============================================================
   Client Inquiry Form — Frontend Styles v2
   ============================================================= */

/* ── Reset / Container ──────────────────────────────────────── */
.cif-form-wrap *,
.cif-form-wrap *::before,
.cif-form-wrap *::after { box-sizing: border-box; }

.cif-form-wrap {
    max-width: 840px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.55;
}

/* ── Header ─────────────────────────────────────────────────── */
.cif-form-header {
    text-align: center;
    margin-bottom: 28px;
}
.cif-form-header h2 {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 6px;
}
.cif-form-header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* ── Progress Bar ───────────────────────────────────────────── */
.cif-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.cif-progress-bar {
    flex: 1;
    height: 7px;
    background: #e8eaf0;
    border-radius: 99px;
    overflow: hidden;
    min-width: 0;
}
.cif-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 99px;
    transition: width 0.4s ease;
    width: 0%;
}
.cif-progress-label {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

/* ── Step Card ──────────────────────────────────────────────── */
.cif-step {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: clamp(18px, 4vw, 30px) clamp(16px, 4vw, 28px);
    box-shadow: 0 1px 10px rgba(0,0,0,.06);
    display: none;
}
.cif-step.active { display: block; }

/* ── Step Header ────────────────────────────────────────────── */
.cif-step-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}
.cif-step-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.cif-step-header h3 {
    font-size: clamp(16px, 3vw, 19px);
    font-weight: 700;
    margin: 0 0 3px;
    color: #1a1a2e;
}
.cif-step-header p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* ── Sub headings ───────────────────────────────────────────── */
.cif-sub-heading {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 10px;
}

/* ── Fields ─────────────────────────────────────────────────── */
.cif-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.cif-field {
    margin-bottom: 16px;
    flex: 1 1 100%;
}
.cif-col-1 { flex: 1 1 100%; }
.cif-col-2 { flex: 1 1 calc(50% - 7px); min-width: 220px; }

.cif-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.cif-field label .req { color: #e11d48; }

.cif-field input[type="text"],
.cif-field input[type="email"],
.cif-field select,
.cif-field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #fafbfc;
    transition: border-color .18s, box-shadow .18s, background .18s;
    appearance: none;
    -webkit-appearance: none;
}
.cif-field input:focus,
.cif-field select:focus,
.cif-field textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
    background: #fff;
}
.cif-field textarea { resize: vertical; }
.cif-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}
.cif-error {
    border-color: #f43f5e !important;
    box-shadow: 0 0 0 3px rgba(244,63,94,.1) !important;
}

/* ── Yes/No Radio Group ─────────────────────────────────────── */
.cif-yn-group {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}
.cif-yn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    gap: 10px;
    flex-wrap: wrap;
}
.cif-yn-row:last-child { border-bottom: none; }
.cif-yn-row:nth-child(even) { background: #fafbfc; }
.cif-yn-row > span {
    font-size: 14px;
    color: #374151;
    flex: 1;
    min-width: 160px;
}
.cif-yn-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.cif-yn-btns label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s;
}
.cif-yn-btns label:hover { background: #f1f5f9; }
.cif-yn-btns input[type="radio"] { accent-color: #4f46e5; width: 14px; height: 14px; }

/* ── Checkbox Grid ──────────────────────────────────────────── */
.cif-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 9px;
    margin-top: 6px;
}
.cif-checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: #374151;
    transition: border-color .18s, background .18s;
    user-select: none;
}
.cif-checkbox-label:hover { border-color: #4f46e5; background: #f5f3ff; }
.cif-checkbox-label input[type="checkbox"] { accent-color: #4f46e5; width: 15px; height: 15px; flex-shrink: 0; }
.cif-checkbox-label:has(input:checked) { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
.cif-checkbox-label:has(input:checked) span { font-weight: 600; }

/* ── Divider ─────────────────────────────────────────────────── */
.cif-divider { height: 1px; background: #f1f5f9; margin: 22px 0; }

/* ── Nav Buttons ─────────────────────────────────────────────── */
.cif-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}
.cif-nav-right {
    display: flex;
    gap: 10px;
    margin-left: auto;
}
.cif-btn {
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, opacity .12s;
    line-height: 1;
    white-space: nowrap;
}
.cif-btn:active { transform: translateY(1px); }
.cif-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.cif-btn-prev {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}
.cif-btn-prev:hover:not(:disabled) { background: #e2e8f0; }

.cif-btn-next {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 3px 10px rgba(79,70,229,.32);
}
.cif-btn-next:hover:not(:disabled) { box-shadow: 0 5px 16px rgba(79,70,229,.42); transform: translateY(-1px); }

.cif-btn-submit {
    background: linear-gradient(135deg, #059669, #0d9488);
    color: #fff;
    box-shadow: 0 3px 10px rgba(5,150,105,.32);
}
.cif-btn-submit:hover:not(:disabled) { box-shadow: 0 5px 16px rgba(5,150,105,.42); transform: translateY(-1px); }

/* ── Messages ────────────────────────────────────────────────── */
#cif-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 15px;
    text-align: center;
    line-height: 1.5;
}
.cif-msg-success { background: #d1fae5; color: #064e3b; border: 1px solid #a7f3d0; }
.cif-msg-error   { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

/* =============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================= */

/* ── Tablet (≤ 768px) ─────────────────────────────────────── */
@media (max-width: 768px) {
    .cif-col-2 { flex: 1 1 100%; }   /* stack all 2-col fields */

    .cif-yn-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .cif-yn-btns { flex-wrap: wrap; }

    .cif-checkbox-grid { grid-template-columns: 1fr 1fr; }

    .cif-step-header { gap: 10px; }
    .cif-step-icon   { font-size: 22px; }
}

/* ── Mobile (≤ 480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
    .cif-form-wrap { padding: 0 10px; margin: 24px auto; }

    .cif-step { padding: 16px 14px; border-radius: 10px; }

    .cif-step-header {
        flex-direction: column;
        gap: 6px;
    }

    .cif-checkbox-grid { grid-template-columns: 1fr; }

    .cif-progress-label { display: none; }    /* hide label on tiny screens */

    .cif-nav { flex-direction: column; align-items: stretch; }
    .cif-nav-right { margin-left: 0; }
    .cif-btn { width: 100%; text-align: center; padding: 13px; }

    .cif-yn-btns label { font-size: 12px; }
}

/* ── Very small (≤ 360px) ────────────────────────────────── */
@media (max-width: 360px) {
    .cif-step { padding: 14px 12px; }
    .cif-field label { font-size: 12px; }
    .cif-field input,
    .cif-field select,
    .cif-field textarea { font-size: 13px; padding: 9px 10px; }
}
