/* Alliance Lead Form — styled to match allianceinstallations.ca ---------- */

.alf-form {
    --alf-accent:  var(--au-gold);
    --alf-text:    var(--au-charcoal);
    --alf-muted:   var(--au-text-mid);
    --alf-border:  var(--au-border);
    --alf-field:   var(--au-white);
    --alf-error:   #b3403a;  /* functional status color, not brand palette */
    --alf-success: #3c7a46;  /* functional status color, not brand palette */
    font-size: 15px;
    color: var(--alf-text);
    max-width: 720px;
}

.alf-form *,
.alf-form *::before,
.alf-form *::after { box-sizing: border-box; }

/* Layout ----------------------------------------------------------------- */
.alf-row {
    display: flex;
    gap: 24px;
}
.alf-row .alf-group { flex: 1 1 0; min-width: 0; }
.alf-group { margin-bottom: 18px; }

@media (max-width: 640px) {
    .alf-row { flex-direction: column; gap: 0; }
}

/* Labels & inputs --------------------------------------------------------- */
/* Selectors are prefixed with .alf-form to out-specify theme form styles
   (e.g. input[type="text"]) that would otherwise override the field fill
   and label size. */
.alf-form .alf-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 7px;
}
.alf-req { color: var(--alf-error); }

.alf-form .alf-input,
.alf-form .alf-textarea {
    display: block;
    width: 100%;
    background-color: var(--alf-field) !important;
    border: 1px solid var(--alf-border);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    color: var(--alf-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.alf-input:focus,
.alf-textarea:focus {
    outline: none;
    border-color: var(--alf-accent);
    box-shadow: 0 0 0 3px rgba(180, 151, 89, .18);
}
.alf-input.alf-invalid,
.alf-textarea.alf-invalid { border-color: var(--alf-error); }

.alf-textarea { min-height: 120px; resize: vertical; }

.alf-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b675f'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* Section headings --------------------------------------------------------- */
.alf-section {
    font-size: 16px;
    font-weight: 600;
    margin: 26px 0 14px;
    color: var(--alf-text);
}
.alf-hint {
    font-size: 13.5px;
    color: var(--alf-muted);
    margin: -6px 0 14px;
    line-height: 1.5;
}

/* Product checkboxes -------------------------------------------------------- */
.alf-checks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    gap: 9px 24px;
    margin-bottom: 6px;
}
@media (max-width: 520px) {
    .alf-checks {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        grid-template-rows: none;
    }
}
.alf-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    cursor: pointer;
}
.alf-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--alf-accent);
    cursor: pointer;
}

/* Dropzone ------------------------------------------------------------------ */
.alf-dropzone {
    border: 1.5px dashed var(--alf-border);
    border-radius: 8px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    background: var(--alf-field);
    transition: border-color .15s ease, background .15s ease;
}
.alf-dropzone:hover,
.alf-dropzone:focus,
.alf-dropzone.alf-dragover {
    border-color: var(--alf-accent);
    background: rgba(180, 151, 89, .05);
    outline: none;
}
.alf-dz-icon { font-size: 20px; color: var(--alf-muted); line-height: 1; }
.alf-dz-text { font-size: 14px; margin-top: 8px; }
.alf-dz-sub  { font-size: 12px; color: var(--alf-muted); margin-top: 5px; }

.alf-file-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}
.alf-file-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    background: var(--alf-field);
    border: 1px solid var(--alf-border);
    border-radius: 6px;
    padding: 7px 11px;
    margin-bottom: 6px;
}
.alf-file-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alf-file-size { color: var(--alf-muted); font-size: 12.5px; flex: 0 0 auto; }
.alf-file-remove {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--alf-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}
.alf-file-remove:hover { color: var(--alf-error); }

/* Honeypot — off-screen, still focusable by dumb bots ----------------------- */
.alf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* Submit ---------------------------------------------------------------------- */
.alf-submit-wrap { margin-top: 26px; }
.alf-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--alf-accent);
    color: var(--au-white);
    border: none;
    border-radius: 3px;
    padding: 5px 20px;
    min-height: var(--au-btn-min-height);
    font-family: var(--au-font-button);
    font-size: var(--au-btn-font-size);
    font-weight: var(--au-btn-font-weight);
    letter-spacing: var(--au-btn-letter-spacing);
    text-transform: var(--au-btn-text-transform);
    cursor: pointer;
    transition: filter .15s ease;
}
/* Brightens on hover, matching .au-btn-primary / .pdp-btn-primary
   elsewhere (Blocksy's actual configured button hover lightens from
   wheat #C09C58 to tan #DBB77D — confirmed, not guessed). Uses filter
   instead of a hardcoded color swap since --alf-accent is customizable
   per shortcode instance via the `accent` attribute, so this must
   brighten whatever color is actually active, not always assume gold. */
.alf-submit:hover  { filter: brightness(1.15); color: var(--au-white); }
.alf-submit:active { filter: brightness(.92); color: var(--au-white); }
.alf-submit:disabled { opacity: .6; cursor: default; }

/* Status message --------------------------------------------------------------- */
.alf-msg {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}
.alf-msg.alf-msg-success {
    background: rgba(60, 122, 70, .1);
    border: 1px solid rgba(60, 122, 70, .35);
    color: var(--alf-success);
}
.alf-msg.alf-msg-error {
    background: rgba(179, 64, 58, .08);
    border: 1px solid rgba(179, 64, 58, .3);
    color: var(--alf-error);
}
.alf-msg[hidden] { display: none; }
.alf-file-list[hidden] { display: none; }
