/* FormHandler shared styles. Colours use CSS variables so each site can theme them. */
:root {
    --fh-accent: #1C2641;
    --fh-border: #c9ced8;
    --fh-error: #c62828;
}

/* Honeypot: hidden from people, visible to naive bots */
.fh-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Upload widget */
.fh-upload { position: relative; }
.fh-upload-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.fh-upload-drop {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 22px 16px; border: 2px dashed var(--fh-border); border-radius: 10px;
    background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
    color: var(--fh-accent); width: 100%; margin: 0;
}
.fh-upload-drop:hover, .fh-upload.is-dragover .fh-upload-drop { border-color: var(--fh-accent); background: #f6f8fb; }
.fh-upload-input:focus-visible + .fh-upload-drop { outline: 3px solid rgba(28, 38, 65, .35); outline-offset: 2px; }
.fh-upload-title { font-weight: 600; font-size: 1.05em; }
.fh-upload-hint { font-size: .85em; color: #666; font-weight: normal; }
.fh-upload-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.fh-upload-list:empty { display: none; }
.fh-upload-item {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    border: 1px solid var(--fh-border); border-radius: 8px; padding: 6px; background: #fff; font-size: .8em;
}
.fh-upload-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 5px; display: block; }
.fh-upload-icon {
    display: flex; align-items: center; justify-content: center; height: 100px; border-radius: 5px;
    background: #eef1f6; color: var(--fh-accent); font-weight: 700;
}
.fh-upload-name { word-break: break-all; line-height: 1.3; color: #444; }
.fh-upload-remove {
    position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%;
    border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 18px; line-height: 28px; padding: 0; cursor: pointer;
}
.fh-upload-remove:hover { background: var(--fh-error); }
.fh-upload-error { color: var(--fh-error); font-size: .9em; margin-top: 6px; }
.fh-upload-error:empty { display: none; }

/* Busy submit button */
button[aria-busy="true"], input[aria-busy="true"] { cursor: progress; opacity: .75; }

/* reCAPTCHA v2 */
.fh-recaptcha-wrap { margin: 10px 0; }
.fh-recaptcha-error { color: var(--fh-error); font-size: .9em; margin-top: 6px; }
.fh-recaptcha-error:empty { display: none; }