/*
 * =========================================================================
 * 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: 46px;
    padding: .5rem;
    font-family: var(--wp--preset--font-family--manrope);
    font-size: var(--wp--preset--font-size--medium);
    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--medium);
        color: var(--wp--preset--color--contrast-alpha-50);
    }
}

textarea {
    height: 6rem;
}

select {
    background-image: url('../../assets/icons/select-image.svg');
    background-repeat: no-repeat;
    background-size: 5px 10px;
    background-position: right .75rem center;
    padding-right: calc(.75rem * 2 + 5px);
    appearance: none;
}

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

.btn,
#submit,
.wpcf7-submit,
.wp-element-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    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);
        }
    }

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

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

    &.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);
        }
    }
}