/* ============================================
   AXQA Browser Form Controls
   Autofill + native checkbox normalization
   ============================================ */


/* ============================================
   AUTOFILL
   Chrome / Edge / Safari
   ============================================ */

/*
   Keep browser autofill preview consistent with
   AXQA's dark form controls.
*/
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input:not([type]),
textarea {
    color-scheme: dark;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):-webkit-autofill,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):-webkit-autofill:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:active {
    -webkit-text-fill-color: #eef4fb !important;
    caret-color: #eef4fb !important;
    -webkit-box-shadow: 0 0 0 1000px #091625 inset !important;
    box-shadow: 0 0 0 1000px #091625 inset !important;
    border-color: rgba(129, 159, 200, 0.19) !important;
    background-color: #091625 !important;
}


/* Autofill while focused */

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):-webkit-autofill:focus,
textarea:-webkit-autofill:focus,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 1000px #0a1829 inset !important;
    box-shadow: 0 0 0 1000px #0a1829 inset !important;
    border-color: rgba(142, 124, 255, 0.52) !important;
}


/* Standard autofill */

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):autofill,
textarea:autofill,
select:autofill {
    color: #eef4fb !important;
    background-color: #091625 !important;
}


/* ============================================
   CHECKBOXES
   ============================================ */

input[type="checkbox"],
.terms-checkbox-wrapper input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;

    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;

    padding: 0 !important;
    margin-left: 0;

    display: inline-grid;
    place-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(129, 159, 200, 0.38) !important;
    border-radius: 5px !important;

    background: #091625 !important;
    background-color: #091625 !important;

    box-shadow: none !important;

    cursor: pointer;
    vertical-align: middle;

    color-scheme: dark;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


/* Check mark */

input[type="checkbox"]::before,
.terms-checkbox-wrapper input[type="checkbox"]::before {
    content: "";

    width: 5px;
    height: 9px;

    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;

    transform: rotate(45deg) scale(0);
    transform-origin: center;

    transition: transform 0.12s ease;
}


/* Checked state */

input[type="checkbox"]:checked,
.terms-checkbox-wrapper input[type="checkbox"]:checked {
    background: #7b68f6 !important;
    background-color: #7b68f6 !important;
    border-color: #8e7cff !important;
}


/* Show check mark */

input[type="checkbox"]:checked::before,
.terms-checkbox-wrapper input[type="checkbox"]:checked::before {
    transform: rotate(45deg) scale(1);
}


/* Keyboard focus */

input[type="checkbox"]:focus-visible,
.terms-checkbox-wrapper input[type="checkbox"]:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(142, 124, 255, 0.18) !important;
}


/* Disabled */

input[type="checkbox"]:disabled,
.terms-checkbox-wrapper input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}