//  GENERAL
label,
.form-control {
    color: $color-default;
    font-size: 14px;
    font-weight: 400;
}
.dataTables_length select,
.dataTables_length input,
.dataTables_filter select,
.dataTables_filter input {
    color: $color-default;
    font-size: 14px;
    font-weight: 400;
}

label {
    margin-bottom: 0;
    
    &.l-2 {
        padding-top: 21px;
    }
}

.form-default {
    input[type=number],
    input[type=email],
    input[type=text],
    input[type=password],
    textarea,
    select {
        &.form-control {
            border: 1px solid $color-default;
            border-radius: 0;
    
            &:focus {
                color: $color-default;
                box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .25);
                border: 1px solid rgba($cp-r, $cp-g, $cp-b, 1);
            }
        }
    }
}
.form-web {
    input[type=number],
    input[type=email],
    input[type=text],
    input[type=password],
    textarea,
    select {
        &.form-control {
            border: 1px solid $color-default;
            background-image: url(../img/svg/ico/chevron-down-or.svg);
            border-radius: 0.25rem;
            
            &.datepicker {
                background-image: url(../img/svg/ico/calendar-or.svg);
            }
    
            &:focus {
                color: $color-default;
                box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .25);
                border: 1px solid rgba($cp-r, $cp-g, $cp-b, 1);
            }
        }
    }

    .btn {
        padding: 0.355rem 0.75rem;
    }
}
.dataTables_length select,
.dataTables_length input,
.dataTables_filter select,
.dataTables_filter input {
    border: 1px solid $color-default;
    border-radius: 0;

    &:focus {
        color: $color-default;
        box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .25);
        border: 1px solid rgba($cp-r, $cp-g, $cp-b, 1);
    }
}

.input-group-default {
    .form-control,
    .input-group-text {
        border: 1px solid $color-default;
        border-radius: 0;
    
        &:focus {
            color: $color-default;
            box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .25);
            border: 1px solid rgba($cp-r, $cp-g, $cp-b, 1);
        }
    }
    
    .input-group-text {
        line-height: 0.6;
    }
}

//  BOTONES
.btn {
    //  outline primary
    &.btn-outline-primary {
        color: $color-primary;
        border-color: $color-primary;
        
        &:hover {
            background-color: $color-primary;
            border-color: $color-primary;
            color: #FFF;
        }
    }
    &.btn-outline-primary:not(:disabled):not(.disabled).active, 
    &.btn-outline-primary:not(:disabled):not(.disabled):active {
        background-color: $color-primary;
        border-color: $color-primary;
    }
    &.btn-outline-primary.focus, .btn-outline-primary:focus {
        box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .5);
    }
    
    //  outline secondary
    &.btn-outline-secondary {
        color: $color-secondary;
        border-color: $color-secondary;

        &.with-caret {
            background-image: url(../img/svg/ico/caret-down.svg);
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-repeat: no-repeat;
            background-position-x: calc(100% - 10px);
            background-position-y: center;
            padding-right: 30px;
        }
        
        &:hover {
            background-color: $color-secondary;
            border-color: $color-secondary;
            color: #FFF;

            &.with-caret {
                background-image: url(../img/svg/ico/caret-down-wh.svg);
            }
        }
    }
    &.btn-outline-secondary:not(:disabled):not(.disabled).active, 
    &.btn-outline-secondary:not(:disabled):not(.disabled):active {
        background-color: $color-secondary;
        border-color: $color-secondary;
    }
    &.btn-outline-secondary.focus, .btn-outline-secondary:focus {
        box-shadow: 0 0 0 0.2rem rgba($cs-r, $cs-g, $cs-b, .5);
    }

    //  primary
    &.btn-primary {
        color: #fff;
        background-color: $color-primary;
        border-color: $color-primary;
        font-size: 14px;

        &.focus, 
        &:focus {
            box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .5);
        }
        &:not(:disabled):not(.disabled).active, 
        &:not(:disabled):not(.disabled):active, 
        .show>&.dropdown-toggle {
            color: #fff;
            background-color: $color-primary;
            border-color: $color-primary;
        }
        &:not(:disabled):not(.disabled).active:focus, 
        &:not(:disabled):not(.disabled):active:focus, 
        .show>&.dropdown-toggle:focus {
            box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .5);
        }
    }

    //  secondary
    &.btn-secondary {
        color: #fff;
        background-color: $color-secondary;
        border-color: $color-secondary;
        font-size: 14px;

        &.focus, 
        &:focus {
            box-shadow: 0 0 0 0.2rem rgba($cs-r, $cs-g, $cs-b, .5);
        }
        &:not(:disabled):not(.disabled).active, 
        &:not(:disabled):not(.disabled):active, 
        .show>&.dropdown-toggle {
            color: #fff;
            background-color: $color-secondary;
            border-color: $color-secondary;
        }
        &:not(:disabled):not(.disabled).active:focus, 
        &:not(:disabled):not(.disabled):active:focus, 
        .show>&.dropdown-toggle:focus {
            box-shadow: 0 0 0 0.2rem rgba($cs-r, $cs-g, $cs-b, .5);
        }
    }

    //  default
    &.btn-default {
        border: 1px solid $color-default;
        border-radius: 0;

        &.focus, 
        &:focus {
            border: 1px solid rgba($cp-r, $cp-g, $cp-b, 1);
            box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .25);
        }
    }

    //  app
    &.btn-app {
        border-radius: 0;
        position: relative;
        padding: 40px 25px;
        margin: 0 0 10px 10px;
        min-width: 80px;
        width: 100%;
        max-width: 220px;
        min-height: 200px;
        text-align: center;
        color: $color-default;
        font-size: 12px;
        
        &.focus, 
        &:focus {
            box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .5);
        }
        &:not(:disabled):not(.disabled).active, 
        &:not(:disabled):not(.disabled):active, 
        .show>&.dropdown-toggle {
            color: $color-primary;
            background-color: #FFF;
            border-color: $color-primary;
        }
        &:not(:disabled):not(.disabled).active:focus, 
        &:not(:disabled):not(.disabled):active:focus, 
        .show>&.dropdown-toggle:focus {
            box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .5);
        }

        &.btn-white {
            background-color: #FFF;
            -webkit-box-shadow: 0px 2px 5px 2px rgba(238, 238, 238, 1);
            -moz-box-shadow: 0px 2px 5px 2px rgba(238, 238, 238, 1);
            box-shadow: 0px 2px 5px 2px rgba(238, 238, 238, 1);

            &:hover,
            &.active {
                color: $color-primary;
                border-color: $color-primary;
                cursor: pointer;

                span {
                    color: $color-primary;
                }

                .ico-microphone {
                    background: url(../img/svg/ico/microphone-or-2.svg);
                    background-size: 46px 52px;
                }

                .ico-billets {
                    background: url(../img/svg/ico/billets-or-2.svg);
                    background-size: 46px 52px;
                }

                .ico-special {
                    background: url(../img/svg/ico/special-or.svg);
                    background-size: 46px 52px;
                }

                .ico-lector {
                    background: url(../img/svg/ico/lector-or.svg);
                    background-size: 46px 52px;
                }

                .ico-reporte {
                    background: url(../img/svg/ico/reporte-or.svg);
                    background-size: 46px 52px;
                }

                .ico-order-history {
                    background: url(../img/svg/ico/order-history-or.svg);
                    background-size: 46px 52px;
                }

                .ico-payment-method {
                    background: url(../img/svg/ico/payment-method-or.svg);
                    background-size: 46px 52px;
                }

                .ico-profile {
                    background: url(../img/svg/ico/profile-or.svg);
                    background-size: 46px 52px;
                }
            }
        }
        
        & > .fa,
        & > .glyphicon,
        & > .ion {
            font-size: 20px;
            display: block;
        }
        & > .badge {
            position: absolute;
            top: -3px;
            right: -10px;
            font-size: 10px;
            font-weight: 400;
        }

        span {
            margin-top: 10px;
            font-size: 18px;
            font-weight: $font-bold;
            line-height: 20px;
        }

    }
}
.btn-outline-primary:not(:disabled):not(.disabled):active, 
.btn-outline-primary:not(:disabled):not(.disabled).active, 
.show > .btn-outline-primary.dropdown-toggle {
    background-color: $color-primary;
    border-color: $color-primary;
}
.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, .5);
}

//  INPUTS
input[type=text] {
    &.form-control {
        &.datepicker {
            background-image: url(../img/svg/ico/calendar.svg);
            -webkit-appearance: none;
            background-repeat: no-repeat;
            background-position-x: calc(100% - 10px);
            background-position-y: center;
        }
    }
}

//  SELECT
select {
    &.form-control {
        background-image: url(../img/svg/ico/chevron-down.svg);
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-repeat: no-repeat;
        background-position-x: calc(100% - 15px);
        background-position-y: center;

        &.fields {
            background-image: unset !important;
            border: 1px solid $color-default;
            border-radius: 0;
        }
    }
}
.dataTables_length select,
.dataTables_filter select {
    background-image: url(../img/svg/ico/chevron-down.svg);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-position-x: calc(100% - 5px);
    background-position-y: center;
    padding-left: 10px;
}
.bootstrap-select {
    .btn-light {
        background-color: #FFF;
        border-color: $color-default;
        border-radius: 0;
        
        background-image: url(../img/svg/ico/chevron-down.svg);
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-repeat: no-repeat;
        background-position-x: calc(100% - 15px);
        background-position-y: center;
    }
    .dropdown-toggle {
        .filter-option-inner-inner {
            color: $color-default;
        }
        &:after {
            content: unset;
        }
    }
    .text {
        color: #000;
    }
    .btn-light {
        border-color: $color-default;
    }
}
.btn-light:not(:disabled):not(.disabled):active, .btn-light:not(:disabled):not(.disabled).active, .show > .btn-light.dropdown-toggle {
    background-color: #FFF;
    border-color: $color-primary;
}
.btn-light:not(:disabled):not(.disabled):active:focus, .btn-light:not(:disabled):not(.disabled).active:focus, .show > .btn-light.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, 0.5);
}
.btn-light.disabled, 
.btn-light:disabled {
    color: $color-default;
    background-color: #e9ecef;
}
.btn-light:focus, .btn-light.focus {
    box-shadow: 0 0 0 0.2rem rgba($cp-r, $cp-g, $cp-b, 0.5);
    border-color: $color-primary;
}

//  ----------------------------------------------------------
//  CUSTOM
//  ----------------------------------------------------------
//  ROUNDED INPUTS
.input-rounded {
    background-color: #EEE;
    border-radius: 40px;
    
    .input-group-text {
        background: transparent;
        border: none;
        color: $color-default;
        padding: 12px 6px 12px 15px;
    }

    .form-control {
        background: transparent;
        border: none;
        color: $color-default;
        font-size: 13px;
        height: 50px;
        padding: 12px 6px 12px 18px;

        &:focus {
            box-shadow: unset;
        }
    }

    &.with-icon {
        .form-control {
            padding: 12px 6px 12px 6px;
        }
    }
}

//  CHECKBOX SQUARE
.check-square {
    .form-check-input {
        display: none;
        
        & + label {
            cursor: pointer;
            display: block;
            font-size: 13px;
            padding-left: 25px;
            position: relative;
            margin-bottom: 20px;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }
        
        & + label {
            &:last-child { margin-bottom: 0; }
        }
        
        & + label {
            &:before {
                content: '';
                display: block;
                width: 20px;
                height: 20px;
                border: 1px solid $color-default;
                position: absolute;
                left: 0;
                top: 0;
                opacity: .6;
                -webkit-transition: all .12s, border-color .08s;
                transition: all .12s, border-color .08s;
            }
        }
        
        &:checked {
            & + label {
                &:before {
                    width: 10px;
                    top: -5px;
                    left: 5px;
                    border-radius: 0;
                    opacity: 1;
                    border-top-color: transparent;
                    border-left-color: transparent;
                    -webkit-transform: rotate(45deg);
                    transform: rotate(45deg);
                }
            }
        }
    }
}

//  ROUNDED BUTTON
.btn-rounded {
    border-radius: 40px;
    padding: 10px 35px 9px;
}
.confirm-btn-lg {
    padding: 10px 35px 9px !important;
    width: 300px;
}
.swal2-popup .swal2-styled.swal2-confirm,
.swal2-popup .swal2-styled.swal2-cancel {
    border-radius: 40px !important;
}
.swal2-popup .swal2-styled.swal2-confirm {
    background-color: $color-primary !important;
}
.swal2-popup .swal2-styled:focus {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba($cp-r, $cp-g, $cp-b, .4) !important;
}

//  3D BUTTON
.btn3d {
	position: relative;
	top: -6px;
	border: 0;
	transition: all 40ms linear;
	margin-top: 10px;
	margin-bottom: 0;
	margin-left: 2px;
	margin-right: 2px;

    &:active:focus,
    &:focus:hover,
    &:focus {
        -moz-outline-style: none;
        outline: medium none;
    }
    
    &:active,
    &.active {
        top: 2px;
    }
    
    &.btn-white {
        background-color: #FFF;
        border-color: #FFF;
        color: $color-primary;
        font-size: 16px;
        font-weight: $font-bold;
        box-shadow: 0 0 0 1px #ebebeb inset, 0 0 0 2px rgba(255, 255, 255, 0.10) inset, 0 4px 0 0 rgba($cp-r, $cp-g, $cp-b, 1), 0 8px 8px 1px transparent;
        background-color: #f9f9f9;
        
        &:active,
        &.active {
            color: $color-primary;
            box-shadow: 0 0 0 1px #ebebeb inset, 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 1px 3px 1px rgba(0, 0, 0, .1);
            background-color: #f9f9f9;
        }
    }
}