/*
 * =========================================================================
 * INPUTS
 * =========================================================================
 */

::-webkit-search-cancel-button {
    display: none;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    box-shadow: 0 0 0px 1000px var(--wp--preset--color--base) inset !important;
    -webkit-text-fill-color: var(--wp--preset--color--contrast);
    transition: border-color .3s ease-in-out;
}

label:not([for="wp-comment-cookies-consent"]) {
    margin-bottom: .25rem;
    display: inline-block;
    font-size: var(--wp--preset--font-size--small);
}

input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
textarea,
select {
    display: flex;
    align-items: center;
    width: 100%;
    height: 37px;
    padding: .5rem;
    font-family: var(--wp--preset--font-family--manrope);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 400;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
    background-color: transparent;
    border: .063rem solid var(--wp--preset--color--contrast-alpha-50);
    transition: border-color .3s ease, box-shadow .3s ease;

    &:hover {
        border-color: var(--wp--preset--color--bullet-active);
    }

    &:focus-visible {
        outline: none;
        border-color: var(--wp--preset--color--focus);
        box-shadow: 0 0 0 .2rem var(--wp--preset--color--focus-alpha-50);
    }

    &:focus {
        outline: none;
        border-color: var(--wp--preset--color--bullet-active);
        box-shadow: 0 0 0 1px var(--wp--preset--color--bullet-active), 0 0 0 .2rem var(--wp--preset--color--primary-alpha-50);
    }

    &::placeholder {
        font-family: var(--wp--preset--font-family--manrope);
        font-size: var(--wp--preset--font-size--small);
        color: var(--wp--preset--color--contrast-alpha-50);
    }
}

textarea {
    height: 6rem;
}

/*
 * =========================================================================
 * BUTTONS
 * =========================================================================
 */

.btn,
#submit,
.wpcf7-submit,
.wp-element-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--wp--preset--font-family--manrope);
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    height: 46px;
    padding: .5rem 1rem;
    background-color: var(--wp--preset--color--button);
    border: 1px solid var(--wp--preset--color--button);
    color: var(--wp--preset--color--base);
    transition: all .3s ease;
    background-image: linear-gradient(-60deg, transparent, transparent 40%, #ffffff44 40%, #ffffff44 60%, transparent 60%, transparent 100%);
    background-size: 200% 100%;
    background-position-x: 150%;
    background-repeat: no-repeat;

    &:hover {
        cursor: pointer;
        background-position-x: -150%;
        transition: all 1s;
        filter: brightness(1.1);
    }

    &:has(svg) {
        gap: .5rem;
    }

    &:active {
        transform: translateY(2px);
    }

    &:focus-visible {
        outline: none;
        border-color: var(--wp--preset--color--focus);
        background-color: var(--wp--preset--color--focus);
        color: var(--wp--preset--color--base);
    }

    &.primary {
        background-color: var(--wp--preset--color--button);
        border-color: var(--wp--preset--color--button);
        color: var(--wp--preset--color--base);
    }

    &.secondary {
        background-color: var(--wp--preset--color--secondary);
        border-color: var(--wp--preset--color--secondary);
        color: var(--wp--preset--color--contrast);

        &:hover {
            background-color: var(--wp--preset--color--primary);
            border-color: var(--wp--preset--color--primary);
        }
    }

    &.go-contact {
        background-color: #008000;
        border-color: #008000;
        color: var(--wp--preset--color--base);
        box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px, rgba(0, 0, 0, 0.15) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -2px 0px inset;
        font-size: var(--wp--preset--font-size--small);
        padding: .5rem .8rem;

        & svg {
            width: 13px;
            height: 13px;
        }
    }

    &.hollow {
        background-color: transparent;
        border-color: transparent;
        color: var(--wp--preset--color--contrast);
        background-image: none;

        &:hover {
            background-color: transparent;
            border-color: transparent;
            color: var(--wp--preset--color--contrast);
        }
    }

    &.disable {
        background-color: var(--wp--preset--color--tertiary);
        border-color: var(--wp--preset--color--tertiary);
        color: var(--wp--preset--color--contrast-alpha-50);

        &:hover {
            cursor: not-allowed;
            background-color: var(--wp--preset--color--tertiary);
            border-color: var(--wp--preset--color--tertiary);
            color: var(--wp--preset--color--contrast-alpha-50);
        }
    }
}

/*
 * =========================================================================
 * CHECKBOXS
 * =========================================================================
 */

/* Base for label styling */
input[type="checkbox"]:not(:checked),
input[type="checkbox"]:checked {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-height: 54px;
    opacity: 0;
    z-index: 1;
}

input[type="checkbox"]:not(:checked)+label,
input[type="checkbox"]:checked+label {
    position: relative;
    margin-bottom: 0;
    padding-left: 1.5em;
    font-size: 1.05em;
    line-height: 1.7;
    cursor: pointer;
}

/* checkbox aspect */
input[type="checkbox"]:not(:checked)+label:before,
input[type="checkbox"]:checked+label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 1em;
    height: 1em;
    border: 1px solid #0000002c;
    transition: all 0.275s;
}

/* checked mark aspect */
input[type="checkbox"]:not(:checked)+label:after,
input[type="checkbox"]:checked+label:after {
    content: "";
    width: .6em;
    height: .6em;
    position: absolute;
    top: 0.48em;
    left: 0.2em;
    background-color: var(--wp--preset--color--primary);
    transition: all 0.2s;
}

/* checked mark aspect changes */
input[type="checkbox"]:not(:checked)+label:after {
    opacity: 0;
}

input[type="checkbox"]:checked+label:after {
    opacity: 1;
}

/* Disabled checkbox *
[type="checkbox"]:disabled:not(:checked) + label:before,
[type="checkbox"]:disabled:checked + label:before {
  box-shadow: none;
  border-color: #bbb;
  background-color: #e9e9e9;
}

[type="checkbox"]:disabled:checked + label:after {
  color: #777;
}

[type="checkbox"]:disabled + label {
  color: #aaa;
}

/* Accessibility *
[type="checkbox"]:checked:focus + label:before,
[type="checkbox"]:not(:checked):focus + label:before {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 0 0 6px rgba(203, 34, 237, 0.2);
}
*/