/* ==========================================================================
   LOCHA LABS — lead-form.css
   Modal for the shared lead-capture popup. Reuses ll- tokens from
   style.css (--ll-forest, --ll-green, --ll-font-display, etc.) and the
   existing .ll-btn / .ll-spark / .ll-eyebrow classes.
   ========================================================================== */

body.ll-modal-lock { overflow: hidden; }

.ll-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ll-modal.is-open { display: flex; }

.ll-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 60, 50, 0.55);
    backdrop-filter: blur(2px);
    animation: ll-modal-fade 0.2s var(--ll-ease);
}

.ll-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--ll-bg);
    border-radius: var(--ll-radius-md);
    padding: 36px 32px;
    box-shadow: 0 30px 60px rgba(18, 60, 50, 0.25);
    animation: ll-modal-pop 0.25s var(--ll-ease);
}

@keyframes ll-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ll-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ll-modal__close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: var(--ll-forest-soft);
    transition: background-color 0.2s var(--ll-ease);
}
.ll-modal__close:hover { background: var(--ll-soft-green); color: var(--ll-forest); }

.ll-modal__title {
    font-size: clamp(22px, 3vw, 28px);
    margin-top: 6px;
}

.ll-modal__step[hidden] { display: none; }

/* ---------- Fields ---------- */
#ll-lead-form { margin-top: 22px; }

.ll-field { margin-bottom: 16px; }
.ll-field label {
    display: block;
    font-family: var(--ll-font-display);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ll-forest);
    margin-bottom: 6px;
}

.ll-field input,
.ll-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ll-forest-line);
    border-radius: var(--ll-radius-sm);
    background: var(--ll-white);
    font-family: var(--ll-font-body);
    font-size: 15px;
    color: var(--ll-forest);
    transition: border-color 0.2s var(--ll-ease);
}
.ll-field input:focus,
.ll-field select:focus {
    outline: none;
    border-color: var(--ll-forest);
}

.ll-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ll-field__prefixed {
    display: flex;
    align-items: center;
    border: 1px solid var(--ll-forest-line);
    border-radius: var(--ll-radius-sm);
    overflow: hidden;
    background: var(--ll-white);
}
.ll-field__prefixed:focus-within { border-color: var(--ll-forest); }
.ll-field__prefix {
    padding: 12px 10px 12px 14px;
    color: var(--ll-forest-faint);
    font-size: 15px;
    border-right: 1px solid var(--ll-forest-line);
}
.ll-field__prefixed input {
    border: none;
    flex:2;
}



.ll-field__prefixed {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--ll-forest-line);
    border-radius: var(--ll-radius-sm);
    overflow: hidden;
    background: var(--ll-white);
    transition: border-color 0.2s var(--ll-ease);
}
.ll-field__prefixed:focus-within { border-color: var(--ll-forest); }

/* "+" and the code input sit together as one cell */
.ll-field__cc {
    display: flex;
    align-items: center;
    flex: none;
    padding-left: 14px;
    border-right: 1px solid var(--ll-forest-line);
    background: var(--ll-soft-green);
}
.ll-field__plus {
    font-size: 15px;
    color: var(--ll-forest-soft);
    line-height: 1;
}

/* the extra class beats ".ll-field input" (width:100%, padding, border) */
.ll-field__prefixed input {
    border: none;
    border-radius: 0;
    background: transparent;
}
.ll-field__prefixed input:focus { outline: none; }

.ll-field__prefixed input.ll-field__std {
    flex: none;
    width: 3.2ch;            /* fits up to 4 digits */
    box-sizing: content-box;
    padding: 12px 10px 12px 2px;
    font-weight: 600;
}
.ll-field__prefixed input.ll-field__mobile {
    flex: 1;
    min-width: 0;
    background: var(--ll-white);
}

 

.ll-field--invalid input,
.ll-field--invalid select,
.ll-field--invalid .ll-field__prefixed { border-color: #E0473C; }

.ll-field__error {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    color: #E0473C;
    min-height: 1em;
}

/* Honeypot — hidden from real users, still reachable by bots that ignore CSS */
.ll-field--hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

.ll-modal__form-error {
    font-size: 13.5px;
    color: #E0473C;
    background: rgba(224, 71, 60, 0.08);
    border-radius: var(--ll-radius-sm);
    padding: 10px 14px;
    margin-bottom: 14px;
}

.ll-modal__submit { width: 100%; justify-content: center; margin-top: 6px; }
.ll-modal__submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Success step ---------- */
[data-ll-step="success"] { text-align: center; padding: 12px 0 4px; }
[data-ll-step="success"] .ll-spark { display: block; margin: 0 auto 14px; }
.ll-modal__success-text {
    margin-top: 10px;
    color: var(--ll-forest-soft);
    font-size: 15px;
}
[data-ll-step="success"] .ll-btn { margin-top: 22px; width: 100%; justify-content: center; }

@media (max-width: 480px) {
    .ll-modal__dialog { padding: 28px 22px; }
    .ll-field-row { grid-template-columns: 1fr; gap: 0; }
}


/* ---- APPEND to the end of lead-form.css (registrant type + consents) ----
   Selectors are deliberately more specific than the existing
   ".ll-field input" / ".ll-field label" rules so they win. */

/* Radios + checkboxes must NOT inherit the text-input styling */
.ll-field input[type="radio"],
.ll-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    flex: none;
    margin: 2px 0 0;
    accent-color: var(--ll-forest);
    cursor: pointer;
}

/* Who-are-you-registering-for */
.ll-field--choice { border: none; padding: 0; margin: 0 0 18px; min-width: 0; }
.ll-field--choice legend {
    float: none;
    width: auto;
    padding: 0;
    margin: 0 0 10px;
    font-family: var(--ll-font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ll-forest);
}

.ll-field label.ll-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--ll-forest-line);
    border-radius: var(--ll-radius-sm);
    background: var(--ll-white);
    cursor: pointer;
    font-family: var(--ll-font-body);
    font-weight: 500;
    font-size: 14.5px;
    line-height: 1.4;
    text-align: left;
    color: var(--ll-forest);
    transition: border-color 0.2s var(--ll-ease), background-color 0.2s var(--ll-ease);
}
.ll-field label.ll-choice:hover { border-color: var(--ll-forest); }
.ll-field label.ll-choice:has(input:checked) { border-color: var(--ll-green); background: var(--ll-soft-green); }
.ll-field--invalid label.ll-choice { border-color: #E0473C; }

/* Section headings inside the form */
.ll-form-section {
    margin: 22px 0 12px;
    font-family: var(--ll-font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ll-forest-soft);
}

/* Consent checkboxes */
.ll-field--check { margin-bottom: 14px; }
.ll-field label.ll-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-family: var(--ll-font-body);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    color: var(--ll-forest-soft);
    cursor: pointer;
}
.ll-field label.ll-check a { color: var(--ll-forest); text-decoration: underline; text-underline-offset: 2px; }
.ll-field label.ll-check em { color: var(--ll-forest-faint); font-style: normal; }
.ll-field--check.ll-field--invalid label.ll-check { color: #E0473C; }

/* honour [hidden] even where a class sets display */
.ll-modal [hidden] { display: none !important; }