/**
 * Lowe Forms v1.2 — Quote & Contact form styles
 * All selectors prefixed .lw.lw-form to beat theme specificity
 * Brand: Navy #0f172a, Red #c9302c, Outfit font
 */

.lw.lw-form { max-width: 860px; }

/* ══════════════════════════════════════
   Header
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-header { text-align: center; margin-bottom: 32px; }
.lw.lw-form .lw-form-header h2 {
    font-size: 28px; font-weight: 700; margin: 0 0 8px; padding: 0;
    color: var(--lw-white); border: none; text-transform: none;
    letter-spacing: 0; background: none; line-height: 1.3;
}
.lw.lw-form .lw-form-header p { margin: 0; color: var(--lw-silver); font-size: 15px; }

/* ══════════════════════════════════════
   Body
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-body { max-width: 760px; margin: 0 auto; }

/* ══════════════════════════════════════
   Mode Toggle (Quick / Detailed)
   Divs not buttons to avoid theme conflicts
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}
.lw.lw-form .lw-form-mode-toggle .lw-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 16px;
    border: 2px solid var(--lw-navy-4);
    border-radius: var(--lw-r);
    background: var(--lw-navy-2);
    color: var(--lw-slate);
    cursor: pointer;
    transition: all 0.25s var(--lw-ease);
    font-family: 'Outfit', sans-serif;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
}
.lw.lw-form .lw-mode-btn svg { margin-bottom: 2px; transition: color 0.2s; }
.lw.lw-form .lw-mode-btn .lw-mode-text { font-size: 15px; font-weight: 700; display: block; color: inherit; }
.lw.lw-form .lw-mode-btn .lw-mode-hint { font-size: 12px; opacity: 0.6; display: block; color: inherit; }
.lw.lw-form .lw-form-mode-toggle .lw-mode-btn:hover {
    border-color: var(--lw-navy-5);
    color: var(--lw-light);
    background: var(--lw-navy-3);
}
.lw.lw-form .lw-form-mode-toggle .lw-mode-btn.on {
    border-color: var(--lw-red);
    background: var(--lw-red-bg);
    color: var(--lw-white);
}
.lw.lw-form .lw-mode-btn.on svg { color: var(--lw-red-h); }

/* Full-only section animation */
.lw.lw-form .lw-form-full-only { overflow: hidden; }
.lw.lw-form .lw-form-full-only.lw-expanding { animation: lwSlideDown 0.35s ease forwards; }
.lw.lw-form .lw-form-full-only.lw-collapsing { animation: lwSlideUp 0.25s ease forwards; }
@keyframes lwSlideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 2000px; } }
@keyframes lwSlideUp { from { opacity: 1; max-height: 2000px; } to { opacity: 0; max-height: 0; } }

/* ══════════════════════════════════════
   Sections
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-section { margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--lw-navy-4); }
.lw.lw-form .lw-form-section:last-of-type { border-bottom: none; margin-bottom: 20px; padding-bottom: 0; }
.lw.lw-form .lw-form-section-title {
    font-size: 14px; font-weight: 700; color: var(--lw-white);
    margin: 0 0 20px; padding: 0; text-transform: uppercase;
    letter-spacing: 0.8px; display: flex; align-items: center;
    gap: 10px; border: none; background: none; line-height: 1.4;
}
.lw.lw-form .lw-form-section-title svg { color: var(--lw-red-h); flex-shrink: 0; }
.lw.lw-form .lw-form-section-title::after { content: ''; flex: 1; height: 1px; background: var(--lw-navy-4); }

/* ══════════════════════════════════════
   Grid layouts
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.lw.lw-form .lw-form-grid-2 { grid-template-columns: 1fr 1fr; }
.lw.lw-form .lw-form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ══════════════════════════════════════
   Fields
   Scoped to specific input types to avoid killing checkboxes
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-field { display: flex; flex-direction: column; margin-bottom: 4px; }
.lw.lw-form .lw-form-field > label {
    font-size: 13px; font-weight: 600; color: var(--lw-light);
    margin-bottom: 6px; padding: 0; line-height: 1.4;
}
.lw.lw-form .lw-form-field .lw-req { color: var(--lw-red); }
.lw.lw-form .lw-form-field .lw-form-hint-inline { font-weight: 400; color: var(--lw-slate); font-size: 12px; }

.lw.lw-form .lw-form-field input[type="text"],
.lw.lw-form .lw-form-field input[type="email"],
.lw.lw-form .lw-form-field input[type="tel"],
.lw.lw-form .lw-form-field input[type="number"],
.lw.lw-form .lw-form-field input[type="url"],
.lw.lw-form .lw-form-field textarea,
.lw.lw-form .lw-form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--lw-navy-4);
    border-radius: var(--lw-r);
    background: var(--lw-navy-2);
    color: var(--lw-white);
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s var(--lw-ease);
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    box-shadow: none;
    line-height: 1.5;
}
.lw.lw-form .lw-form-field input[type="text"]::placeholder,
.lw.lw-form .lw-form-field input[type="email"]::placeholder,
.lw.lw-form .lw-form-field input[type="tel"]::placeholder,
.lw.lw-form .lw-form-field input[type="number"]::placeholder,
.lw.lw-form .lw-form-field textarea::placeholder { color: var(--lw-slate); }

.lw.lw-form .lw-form-field input[type="text"]:focus,
.lw.lw-form .lw-form-field input[type="email"]:focus,
.lw.lw-form .lw-form-field input[type="tel"]:focus,
.lw.lw-form .lw-form-field input[type="number"]:focus,
.lw.lw-form .lw-form-field input[type="url"]:focus,
.lw.lw-form .lw-form-field textarea:focus,
.lw.lw-form .lw-form-field select:focus {
    outline: none;
    border-color: var(--lw-red);
    box-shadow: 0 0 0 3px rgba(201,48,44,0.12);
    background: var(--lw-navy-3);
}
.lw.lw-form .lw-form-field input.lw-field-error,
.lw.lw-form .lw-form-field textarea.lw-field-error,
.lw.lw-form .lw-form-field select.lw-field-error {
    border-color: var(--lw-red);
    background: rgba(201,48,44,0.04);
}

/* Select arrow */
.lw.lw-form .lw-form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Number input spinner hide */
.lw.lw-form input[type="number"]::-webkit-inner-spin-button,
.lw.lw-form input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lw.lw-form input[type="number"] { -moz-appearance: textfield; }

/* ══════════════════════════════════════
   Checkbox pills (requirements grid)
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.lw.lw-form .lw-form-checks .lw-form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--lw-navy-4);
    border-radius: var(--lw-r);
    font-size: 13px;
    font-weight: 500;
    color: var(--lw-silver);
    cursor: pointer;
    transition: all 0.2s var(--lw-ease);
    user-select: none;
    background: transparent;
    margin: 0;
}
.lw.lw-form .lw-form-checks .lw-form-check:hover { border-color: var(--lw-navy-5); color: var(--lw-light); }
.lw.lw-form .lw-form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: var(--lw-red);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    margin: 0;
    padding: 0;
}
.lw.lw-form .lw-form-check span { pointer-events: none; }
.lw.lw-form .lw-form-checks .lw-form-check:has(input:checked) {
    border-color: var(--lw-red);
    background: var(--lw-red-bg);
    color: var(--lw-white);
}

/* ══════════════════════════════════════
   Standalone checkbox (repeat programme)
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-check-standalone { margin-top: 8px; }
.lw.lw-form .lw-form-check-solo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--lw-silver);
    user-select: none;
    padding: 10px 0;
}
.lw.lw-form .lw-form-check-solo input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--lw-red);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    margin: 0;
    padding: 0;
}
.lw.lw-form .lw-form-check-solo span { pointer-events: none; }
.lw.lw-form .lw-form-check-solo:hover { color: var(--lw-light); }

/* ══════════════════════════════════════
   Error message
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-error {
    padding: 12px 16px;
    background: rgba(201,48,44,0.08);
    border: 1px solid rgba(201,48,44,0.25);
    border-radius: var(--lw-r);
    color: var(--lw-red-h);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ══════════════════════════════════════
   Footer & Submit
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-footer { margin-top: 8px; }
.lw.lw-form .lw-form-privacy { text-align: center; font-size: 12px; color: var(--lw-slate); margin: 12px 0 0; }

/* Submit button — hardened against theme */
.lw.lw-form .lw-form-footer .lw-btn.lw-btn-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: var(--lw-red);
    color: var(--lw-white);
    border: none;
    border-radius: var(--lw-r);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--lw-ease);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    box-shadow: none;
    text-decoration: none;
    margin: 0;
}
.lw.lw-form .lw-form-footer .lw-btn.lw-btn-red:hover {
    background: var(--lw-red-h);
}
.lw.lw-form .lw-form-footer .lw-btn.lw-btn-red:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.lw.lw-form .lw-form-footer .lw-btn.lw-btn-red svg {
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   Success state
   ══════════════════════════════════════ */
.lw.lw-form .lw-form-success { text-align: center; padding: 48px 24px; }
.lw.lw-form .lw-form-success-icon { margin-bottom: 16px; }
.lw.lw-form .lw-form-success h3 {
    font-size: 24px; font-weight: 700; color: var(--lw-white);
    margin: 0 0 8px; padding: 0; border: none; background: none;
}
.lw.lw-form .lw-form-success p { font-size: 15px; color: var(--lw-silver); margin: 0 0 24px; }

/* Reset button in success */
.lw.lw-form .lw-form-success .lw-btn.lw-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--lw-silver);
    border: 1px solid var(--lw-navy-4);
    border-radius: var(--lw-r);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--lw-ease);
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    margin: 0;
}
.lw.lw-form .lw-form-success .lw-btn.lw-btn-ghost:hover {
    border-color: var(--lw-navy-5);
    color: var(--lw-white);
    background: var(--lw-navy-2);
}

/* ══════════════════════════════════════
   Dropzone
   ══════════════════════════════════════ */
.lw.lw-form .lw-dropzone {
    border: 2px dashed var(--lw-navy-4);
    border-radius: var(--lw-r);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--lw-ease);
    background: transparent;
}
.lw.lw-form .lw-dropzone:hover,
.lw.lw-form .lw-dropzone.lw-drag-over { border-color: var(--lw-red); background: rgba(201,48,44,0.05); }
.lw.lw-form .lw-dropzone-label { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--lw-slate); font-size: 14px; }
.lw.lw-form .lw-dropzone-info { display: block; color: var(--lw-slate); font-size: 11px; margin-top: 6px; opacity: 0.7; }
.lw.lw-form .lw-file-name { font-size: 13px; color: #10b981; margin-top: 6px; display: flex; align-items: center; gap: 6px; }

/* ══════════════════════════════════════
   Contact form — tighter width
   ══════════════════════════════════════ */
.lw.lw-form.lw-contact-form .lw-form-body { max-width: 600px; }

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 768px) {
    .lw.lw-form .lw-form-grid-2,
    .lw.lw-form .lw-form-grid-3 { grid-template-columns: 1fr; }
    .lw.lw-form .lw-form-checks { flex-direction: column; }
    .lw.lw-form .lw-form-mode-toggle { grid-template-columns: 1fr; gap: 8px; }
    .lw.lw-form .lw-form-mode-toggle .lw-mode-btn { flex-direction: row; gap: 10px; padding: 14px 16px; }
    .lw.lw-form .lw-mode-hint { display: none; }
}
@media (max-width: 480px) {
    .lw.lw-form { padding: 24px 16px; }
    .lw.lw-form .lw-form-header h2 { font-size: 22px; }
}

/* Print hide */
@media print { .lw.lw-form { display: none !important; } }
