/*
 * Fold Certification — Public Input Visibility v0.8.395
 * Presentation only. This layer changes public form-field contrast and does
 * not alter validation, submission, authentication, scoring, or stored data.
 */

/* Text-entry controls throughout the public website. Interactive controls
 * that are not text fields are deliberately excluded. */
html body:not(.wp-admin) input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]),
html body:not(.wp-admin) textarea,
html body:not(.wp-admin) select {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #22d3ee !important;
    background-color: #000000 !important;
    border-color: #315b87 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    color-scheme: dark;
}

/* Rich-text entry areas used by public community/forum editors. */
html body:not(.wp-admin) .wp-editor-area,
html body:not(.wp-admin) .mce-content-body,
html body:not(.wp-admin) #af-wrapper [contenteditable="true"],
html body:not(.wp-admin) #wpforo-wrap [contenteditable="true"],
html body:not(.wp-admin) .wpforoeditor [contenteditable="true"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #22d3ee !important;
    background-color: #000000 !important;
    text-shadow: none !important;
}

/* Placeholders remain visible but are visually distinct from entered text. */
html body:not(.wp-admin) input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"])::placeholder,
html body:not(.wp-admin) textarea::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

/* A clear focus state makes the active field easy to locate. */
html body:not(.wp-admin) input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]):focus,
html body:not(.wp-admin) textarea:focus,
html body:not(.wp-admin) select:focus,
html body:not(.wp-admin) .wp-editor-area:focus,
html body:not(.wp-admin) #af-wrapper [contenteditable="true"]:focus,
html body:not(.wp-admin) #wpforo-wrap [contenteditable="true"]:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #22d3ee !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18) !important;
}

/* Browser autofill is a common source of white-on-white login fields. Keep
 * the black field and white text even after saved credentials are inserted. */
html body:not(.wp-admin) input:-webkit-autofill,
html body:not(.wp-admin) input:-webkit-autofill:hover,
html body:not(.wp-admin) input:-webkit-autofill:focus,
html body:not(.wp-admin) input:-webkit-autofill:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #22d3ee !important;
    -webkit-box-shadow: 0 0 0 1000px #000000 inset !important;
    box-shadow: 0 0 0 1000px #000000 inset !important;
    border-color: #315b87 !important;
    transition: background-color 9999s ease-out 0s;
}

html body:not(.wp-admin) input:-webkit-autofill:focus {
    border-color: #22d3ee !important;
    -webkit-box-shadow: 0 0 0 1000px #000000 inset, 0 0 0 3px rgba(34, 211, 238, 0.18) !important;
    box-shadow: 0 0 0 1000px #000000 inset, 0 0 0 3px rgba(34, 211, 238, 0.18) !important;
}

html body:not(.wp-admin) input:autofill {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #000000 !important;
}

/* Dropdown choices must be readable when the operating system opens them. */
html body:not(.wp-admin) select option,
html body:not(.wp-admin) select optgroup {
    color: #ffffff !important;
    background-color: #000000 !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Preserve legibility for values users can see but cannot currently edit. */
html body:not(.wp-admin) input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]):disabled,
html body:not(.wp-admin) input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"])[readonly],
html body:not(.wp-admin) textarea:disabled,
html body:not(.wp-admin) textarea[readonly],
html body:not(.wp-admin) select:disabled {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
    background-color: #07182b !important;
    opacity: 1 !important;
}

/* Selected text stays readable while copying or replacing an entry. */
html body:not(.wp-admin) input::selection,
html body:not(.wp-admin) textarea::selection,
html body:not(.wp-admin) .wp-editor-area::selection,
html body:not(.wp-admin) #af-wrapper [contenteditable="true"]::selection,
html body:not(.wp-admin) #wpforo-wrap [contenteditable="true"]::selection {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #1d4ed8 !important;
}
