/* Honeypot Field Hiding - Anti-Bot Protection */

/* Hide all honeypot fields completely */
.honeypot-field,
.honey-pot,
[name="honeypot"],
[name="bot_field"],
[name="bot_avoidance"],
[name="botbotherer"],
#honeypot,
input[type="text"][name="honeypot"],
input[type="email"][name="honeypot"],
fieldset.honeypot-field,
.bot-trap,
.bot-check,
.spam-check {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    visibility: hidden !important;
    display: none !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Also hide the labels for honeypot fields */
label[for="honeypot"],
label[for="bot_field"],
label[for="bot_avoidance"],
label[for="botbotherer"],
.honeypot-field label,
.honey-pot label {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    visibility: hidden !important;
    display: none !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide parent containers if they only contain honeypot fields */
fieldset:has(> input[name="honeypot"]:only-child),
div:has(> input[name="honeypot"]:only-child),
.form-group:has(> input[name="honeypot"]:only-child) {
    display: none !important;
}

/* Ensure honeypot fields don't affect layout */
.honeypot-field + *,
[name="honeypot"] + * {
    margin-top: 0 !important;
}

/* Screen reader accessibility - properly hide from screen readers too */
.honeypot-field,
[name="honeypot"],
label[for="honeypot"] {
    aria-hidden: true !important;
}

/* Additional security - make sure honeypot fields can't be tabbed to */
.honeypot-field,
[name="honeypot"],
[name="bot_field"],
[name="bot_avoidance"] {
    tabindex: -1 !important;
}

/* In case inline styles are used, override them */
input[style*="width: 10px"][name="honeypot"],
input[style*="width:10px"][name="honeypot"] {
    width: 0 !important;
    display: none !important;
}

/* Fallback for older browsers that don't support :has() */
@supports not selector(:has(> *)) {
    fieldset.pure-group.honeypot-field {
        display: none !important;
    }
}

/* Print styles - ensure honeypot fields don't appear in print */
@media print {
    .honeypot-field,
    [name="honeypot"],
    [name="bot_field"],
    [name="bot_avoidance"],
    label[for="honeypot"] {
        display: none !important;
    }
}

/* High contrast mode - maintain hiding */
@media (prefers-contrast: high) {
    .honeypot-field,
    [name="honeypot"] {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Ensure honeypot fields don't interfere with form validation styling */
form:has(.honeypot-field) {
    /* Form should ignore honeypot fields for validation purposes */
    --honeypot-fields: 0;
}

/* Debug mode - uncomment to make honeypot fields visible for testing */
/*
.debug-honeypot .honeypot-field,
.debug-honeypot [name="honeypot"],
.debug-honeypot label[for="honeypot"] {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    opacity: 0.5 !important;
    visibility: visible !important;
    display: block !important;
    background-color: rgba(255, 0, 0, 0.2) !important;
    border: 2px dashed red !important;
    padding: 10px !important;
}
*/