@use '../variables' as *;

/*--------------------------------------------------------------------------------------------------------------------*/
/* INPUT
/*--------------------------------------------------------------------------------------------------------------------*/
input[type="email"],
input[type="tel"],
input[type="text"],
select {
    outline: none;
    border: none;
    border-radius: 5px;
    background: #FFF;
    width: 100%;
    height: 40px;
    line-height: 40px;
    padding-left: 10px;
    color: rgba(30, 13, 0, 1);
    font-family: $gotham-medium;
    font-size: 14px;
    font-weight: 400;
}

input::-webkit-input-placeholder {color: rgba(30, 13, 0, 0.88);}

input::-moz-placeholder {color: rgba(30, 13, 0, 0.88);}

input:-moz-placeholder {color: rgba(30, 13, 0, 0.88);}

input:-ms-input-placeholder {color: rgba(30, 13, 0, 0.88);}

.checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;

    [type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    [type="checkbox"] ~ label,
    [type="checkbox"] + label {
        color: rgba(30, 13, 0, 0.88);
        position: relative;
        display: inline-block;
        padding-left: 26px;
        cursor: pointer;
        font-size: 10px;
        font-weight: 400;
        line-height: 10px;
        margin-bottom: 0 !important;

        @media screen and (min-width: 37.5em) {
            padding-left: 30px;
        }

        a {
            color: rgba(30, 13, 0, 0.88);
        }
    }

    [type="checkbox"] ~ label:before,
    [type="checkbox"] + label:before {
        content: '';
        position: absolute;
        display: block;
        left: 0;
        top: 0;
        width: 16px;
        height: 16px;
        border-radius: 4px;
        background: #FFF;
        box-sizing: border-box;

        @media screen and (min-width: 37.5em) {
            width: 20px;
            height: 20px;
            border-radius: 5px;
        }
    }

    [type="checkbox"]:not(:checked) ~ label:before,
    [type="checkbox"]:not(:checked) + label:before {
        background: #FFF;
    }

    [type="checkbox"]:checked ~ label:before,
    [type="checkbox"]:checked + label:before {
        background: #fff;
        border-color: #C29D39;
    }

    [type="checkbox"]:checked ~ label:after,
    [type="checkbox"]:checked + label:after {
        content: '';
        position: absolute;
        display: block;
        left: 4px;
        top: 2px;
        width: 6px;
        height: 10px;
        border: solid #C29D39;
        border-width: 0 2px 2px 0;
        box-sizing: border-box;
        transform: rotate(45deg);

        @media screen and (min-width: 37.5em) {
            left: 6px;
            top: 3px;
            width: 8px;
            height: 13px;
        }
    }


    .error ~ label:before,
    .error + label:before {
        border: 2px solid red;
    }
}
