/* Form element CSS */

/*
    Buttons
    Width not specified here
    For grey buttons add form-button-grey class
*/

.form-button30 {
    height: 30px;
    font-size: 15px;
    font-weight: 500;
}

.form-button36 {
    height: 36px;
    font-size: 15px;
    font-weight: 500;
}

.form-button40 {
    height: 40px;
    font-size: 18px;
    font-weight: 600;
}

.form-button30,
.form-button36,
.form-button40 {
    padding: 0 15px 2px 15px;
    font-family: inherit;

    border: none;
    border-radius: var(--ButtonCornerRadius);
    color: var(--RedButtonTextColour);
    background-color: var(--RedButtonBackgroundColour);
    cursor: pointer;
    transition: background-color .3s, color .3s;
}

.form-button-grey {
    font-weight: 400;
    color: var(--GreyButtonTextColour);
    background-color: var(--GreyButtonBackgroundColour);
}


@media (hover: hover) {

    .form-button30:hover,
    .form-button36:hover,
    .form-button40:hover {
        background-color: var(--RedButtonHoverBackgroundColour);
        color: var(--RedButtonHoverTextColour);
    }

    .form-button-grey:hover {
        background-color: var(--GreyButtonHoverBackgroundColour);
        color: var(--GreyButtonHoverTextColour);
    }

}


@media screen and (max-width: 767px) {
    .form-button40 {
        font-size: 16px;
    }
}



/*
    Text fields
    Width not specified here
*/

.form-text {
    font-family: inherit;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--GreyBorderColour);
    border-radius: 6px;
    background-color: #ffffff;
    height: 40px;
    font-size: 15px;
}

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

.form-text[type="number"] {
    -moz-appearance: textfield;
}

.form-text:disabled,
.form-text:read-only {
    background-color: var(--HeaderBackgroundColour);
    user-select: none;
    pointer-events: none;
    color: var(--GreyTextColour);
}

.form-text-uppercase {
    text-transform: uppercase;
}


/*
    Text area
    Width and height not specified here
*/

.form-textarea {
    font-family: inherit;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--GreyBorderColour);
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 15px;
}


/*
    Customised quantity with +/- buttons
    HTML generated by quantityPlusMinus()
    Width and height can be overridden within reason
*/

.form-quantity {
    border: 1px solid var(--GreyBorderColour);
    border-radius: 6px;
    width: 120px;
    height: 36px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    font-size: 16px;
}

.form-quantity .qty {
    position: absolute;
    top: 0;
    left: calc(25% + 1px);
    right: calc(25% + 1px);
    bottom: 0;
    border: none;
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    text-align: center;
    color: #000000;
}

.form-quantity .qty::-webkit-outer-spin-button,
.form-quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-quantity .qty:focus {
    outline: none;
}

.form-quantity .qty-error {
    color: var(--RedTextColour)
}

.form-quantity .minus,
.form-quantity .plus {
    position: absolute;
    width: 25%;
    height: 100%;
    top: 0;
    bottom: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #000000;
    font-size: inherit;
    cursor: pointer;
}

.form-quantity .minus {
    left: 0;
}

.form-quantity .plus {
    right: 0;
}

.form-quantity .minus:disabled,
.form-quantity .plus:disabled {
    background-color: #ffffff;
    color: #aaaaaa;
    cursor: default;
}


/*
    Customised <select>

    <div class="form-select" id="[whatever]">
        <label>
            <select name="[whatever]" id="[whatever]">
                <option></option>
                <option></option>
            </select>
        </label>
    </div>

    Width specified in <div> css (id or another class)

    Height can be changed by setting
    .form-select {height: }
    .form-select label {height: }
    .form-select label:after {line-height: (2px less)}
*/

.form-select {
    position: relative;
    height: 36px;
    font-size: 15px;
    margin: -1px 0 0 0;
    box-sizing: border-box;
}

.form-select label {
    position: relative;
    border: 1px solid var(--GreyBorderColour);
    display: block;
    width: 100%;
    height: 36px;
    background-color: #ffffff;
    box-sizing: border-box;
    margin-top: 1px;
    border-radius: 6px;
}

.form-select label:after {
    font-family: FontAwesome;
    font-size: 12px;
    content: "\f078";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 0 2px 1px;
    line-height: 34px;
    text-align: center;
    vertical-align: middle;
    width: 30px;
    color: #000000;
    box-sizing: border-box;
}

.form-select label select {
    display: block;
    position: relative;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background-color: transparent;
    width: 100%;
    height: 100%;
    padding: 0 30px 0 15px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    color: #000000;
    z-index: 1;
    cursor: pointer;
}

.form-select label select:disabled {
    color: #808080;
}

.form-select label select option {
    background-color: #ffffff;
    color: #000000;
}

.form-select label select option:disabled {
    color: #808080;
}