/* ═══════════════════════════════════════════════════════
   Broom Hiring Form – Frontend
   All rules scoped under #bhf-wrap (ID) so they always
   beat WordPress theme selectors.
   ═══════════════════════════════════════════════════════ */

#bhf-wrap {
    --bhf-brand: #1e293b;
    --bhf-accent: #16a34a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #0f172a !important;
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
    line-height: 1.6;
    background: transparent;
}
#bhf-wrap *, #bhf-wrap *::before, #bhf-wrap *::after { box-sizing: border-box; }

/* Blanket reset — catch every element themes like to color */
#bhf-wrap h1,
#bhf-wrap h2,
#bhf-wrap h3,
#bhf-wrap h4,
#bhf-wrap h5,
#bhf-wrap h6,
#bhf-wrap p,
#bhf-wrap label,
#bhf-wrap span,
#bhf-wrap li,
#bhf-wrap strong,
#bhf-wrap div,
#bhf-wrap a,
#bhf-wrap ol,
#bhf-wrap ul { color: #0f172a !important; }

/* ── Page Header ── */
#bhf-wrap .bhf-page-header { text-align: center; margin-bottom: 2rem; }
#bhf-wrap .bhf-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 .4rem;
    color: #0f172a !important;
    line-height: 1.25;
}
#bhf-wrap .bhf-page-header p {
    color: #64748b !important;
    font-size: 1rem;
    margin: 0;
    font-style: italic;
}

/* ── Card ── */
#bhf-wrap .bhf-card {
    background: #fff !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
#bhf-wrap .bhf-card-head {
    background: var(--bhf-brand);
    padding: 1.25rem 2rem;
}
#bhf-wrap .bhf-card-head h2 { margin:0 0 .15rem; font-size:1.15rem; font-weight:600; color: #fff !important; }
#bhf-wrap .bhf-card-head p  { margin:0; color: #fff !important; font-size:.875rem; opacity: .7; }
#bhf-wrap .bhf-card-body {
    padding: 2rem;
    background: #fff !important;
}

/* ── Field Grid ── */
#bhf-wrap .bhf-fields {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.25rem;
}
#bhf-wrap .bhf-field.bhf-full { width: 100% !important; flex: 0 0 100% !important; }
#bhf-wrap .bhf-field.bhf-half { width: calc(50% - .625rem) !important; flex: 0 0 calc(50% - .625rem) !important; }
#bhf-wrap .bhf-section-heading,
#bhf-wrap .bhf-info-block {
    width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 100% !important;
    display: block !important;
    flex-shrink: 0 !important;
}
@media (max-width: 600px) { #bhf-wrap .bhf-field.bhf-half { width: 100% !important; flex: 0 0 100% !important; } }

/* ── Labels ── */
#bhf-wrap .bhf-field > label:first-child {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #0f172a !important;
    margin-bottom: .4rem;
    line-height: 1.45;
}
#bhf-wrap .bhf-req { color: #ef4444 !important; margin-left: 2px; }

/* ── Inputs ── */
#bhf-wrap .bhf-field input[type="text"],
#bhf-wrap .bhf-field input[type="email"],
#bhf-wrap .bhf-field input[type="tel"],
#bhf-wrap .bhf-field input[type="number"],
#bhf-wrap .bhf-field input[type="url"],
#bhf-wrap .bhf-field select,
#bhf-wrap .bhf-field textarea {
    display: block;
    width: 100%;
    padding: .6rem .85rem;
    font-size: .9375rem;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff !important;
    color: #0f172a !important;
    transition: border-color .2s, box-shadow .2s;
}
#bhf-wrap .bhf-field input:focus,
#bhf-wrap .bhf-field select:focus,
#bhf-wrap .bhf-field textarea:focus {
    outline: none;
    border-color: var(--bhf-brand);
    box-shadow: 0 0 0 3px rgba(30,41,59,.1);
}
#bhf-wrap .bhf-field input::placeholder,
#bhf-wrap .bhf-field textarea::placeholder { color: #94a3b8 !important; }
#bhf-wrap .bhf-field textarea { resize: vertical; min-height: 90px; }

/* ── Section Headings ── */
#bhf-wrap .bhf-section-heading {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}
#bhf-wrap .bhf-section-heading:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
#bhf-wrap .bhf-section-heading h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bhf-brand) !important;
    margin: 0 0 .25rem;
}
#bhf-wrap .bhf-section-desc {
    margin: 0;
    color: #64748b !important;
    font-size: .875rem;
    font-style: italic;
}

/* ── Info Blocks (the "read first" section) ── */
#bhf-wrap .bhf-info-block {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    border-left: 4px solid var(--bhf-brand);
}
#bhf-wrap .bhf-info-block h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bhf-brand) !important;
    margin: 0 0 .75rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}
#bhf-wrap .bhf-info-content {
    font-size: .9rem;
    color: #334155 !important;
    line-height: 1.7;
}
#bhf-wrap .bhf-info-content p {
    margin: 0 0 .75rem;
    color: #334155 !important;
}
#bhf-wrap .bhf-info-content h4 {
    font-size: .9rem;
    font-weight: 700;
    color: #0f172a !important;
    margin: 1.25rem 0 .4rem;
}
#bhf-wrap .bhf-info-content ul {
    margin: 0 0 .75rem 0;
    padding-left: 1.25rem;
    list-style: disc;
}
#bhf-wrap .bhf-info-content li {
    margin-bottom: .35rem;
    color: #334155 !important;
}
#bhf-wrap .bhf-info-content strong { color: #0f172a !important; }

/* Callout box for the hidden-word instruction */
#bhf-wrap .bhf-callout {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: .85rem 1rem;
    margin-top: .5rem;
    font-size: .875rem;
    color: #92400e !important;
}
#bhf-wrap .bhf-callout strong { color: #92400e !important; }
#bhf-wrap .bhf-callout code {
    background: #fff !important;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    color: #b45309 !important;
}

/* ── Radio & Checkbox Groups ── */
#bhf-wrap .bhf-radio-group,
#bhf-wrap .bhf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-top: .15rem;
}
#bhf-wrap .bhf-radio-label,
#bhf-wrap .bhf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .9rem;
    color: #334155 !important;
    cursor: pointer;
    padding: .35rem .5rem;
    border-radius: 6px;
    transition: background .15s;
}
#bhf-wrap .bhf-radio-label span,
#bhf-wrap .bhf-checkbox-label span {
    color: #334155 !important;
    line-height: 1.45;
}
#bhf-wrap .bhf-radio-label:hover,
#bhf-wrap .bhf-checkbox-label:hover { background: #f1f5f9; }
#bhf-wrap .bhf-radio-label input,
#bhf-wrap .bhf-checkbox-label input {
    accent-color: var(--bhf-brand);
    width: 16px; height: 16px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Disclaimer ── */
#bhf-wrap .bhf-disclaimer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.15rem 1.25rem;
    margin-top: 1.75rem;
}
#bhf-wrap .bhf-disclaimer label {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    cursor: pointer;
    color: #0f172a !important;
}
#bhf-wrap .bhf-disclaimer input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--bhf-brand);
    width: 18px; height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}
#bhf-wrap .bhf-disclaimer strong {
    display: block;
    font-size: .875rem;
    color: #0f172a !important;
    margin-bottom: .2rem;
}
#bhf-wrap .bhf-disclaimer span {
    display: block;
    font-size: .8rem;
    color: #64748b !important;
}

/* ── Submit Button ── */
#bhf-wrap .bhf-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .9rem 1rem;
    margin-top: 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff !important;
    background: var(--bhf-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--bhf-accent) 25%, transparent);
    transition: background .2s, box-shadow .2s, transform .15s;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
}
#bhf-wrap .bhf-btn-submit span { color: #fff !important; }
#bhf-wrap .bhf-btn-submit:hover {
    background: color-mix(in srgb, var(--bhf-accent) 80%, #000);
    color: #fff !important;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--bhf-accent) 35%, transparent);
    transform: translateY(-1px);
}
#bhf-wrap .bhf-btn-submit:visited { color: #fff !important; }
#bhf-wrap .bhf-btn-submit:disabled { opacity:.6; cursor:not-allowed; transform:none; }

@keyframes bhf-spin { to { transform:rotate(360deg); } }
#bhf-wrap .bhf-spin { animation: bhf-spin .7s linear infinite; }

/* ── Message ── */
#bhf-wrap .bhf-msg {
    text-align: center;
    padding: .7rem;
    margin-top: 1rem;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
}
#bhf-wrap .bhf-msg.bhf-err  { background:#fef2f2; color: #b91c1c !important; border:1px solid #fecaca; }
#bhf-wrap .bhf-msg.bhf-ok   { background: color-mix(in srgb, var(--bhf-accent) 8%, #fff); color: var(--bhf-accent) !important; border:1px solid color-mix(in srgb, var(--bhf-accent) 30%, #fff); }

/* Invalid highlight */
#bhf-wrap .bhf-field.bhf-invalid input,
#bhf-wrap .bhf-field.bhf-invalid select,
#bhf-wrap .bhf-field.bhf-invalid textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* ═══════════════════════════════════════════════════════
   Thank You
   ═══════════════════════════════════════════════════════ */
#bhf-wrap .bhf-thanks-card {
    background: #fff !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2.5rem;
}
#bhf-wrap .bhf-check-icon {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--bhf-accent) 12%, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    color: var(--bhf-accent) !important;
    animation: bhf-pop .5s ease-out;
}
#bhf-wrap .bhf-check-icon svg { color: var(--bhf-accent) !important; }
@keyframes bhf-pop { from { transform:scale(0); opacity:0; } to { transform:scale(1); opacity:1; } }
#bhf-wrap .bhf-thanks-card h1 { font-size:1.85rem; font-weight:700; color: #0f172a !important; margin:0 0 .6rem; }
#bhf-wrap .bhf-ty-body { color: #475569 !important; font-size:1rem; line-height:1.65; margin:0 0 1.75rem; }

#bhf-wrap .bhf-steps {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: left;
    margin-bottom: 1.75rem;
}
#bhf-wrap .bhf-steps h3 { font-size:.9rem; font-weight:700; color: #0f172a !important; margin:0 0 .6rem; }
#bhf-wrap .bhf-steps ol { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:.6rem; }
#bhf-wrap .bhf-steps li { display:flex; align-items:flex-start; gap:.6rem; font-size:.85rem; color: #475569 !important; }
#bhf-wrap .bhf-step-n {
    display:flex; align-items:center; justify-content:center;
    width:20px; height:20px;
    background:#e2e8f0; border-radius:50%;
    font-size:.7rem; font-weight:700; color: #334155 !important;
    flex-shrink:0; margin-top:1px;
}
#bhf-wrap .bhf-thanks-card .bhf-btn-submit { margin-top:0; }
