$white-color: #fff;
$primary-color: #5D5DFF;
$gray-color: #f1f5f8;
$secondary-color: #4646D9;
$gradient-color: linear-gradient(80deg, #45137B 0%, #5D5DFF 100%);

:root {
    --blue: #516EFF;
    --white: #fff;
    --pink: #FF4A97;
    --border: #E4E6EB;
    --pink: #FF4A97;
}

@mixin transform($property) {
    -webkit-transform: $property;
    -ms-transform: $property;
    transform: $property;
}

@mixin border-radius($radius) {
    border-radius: $radius;
    -webkit-border-radius: $radius;
    -ms-border-radius: $radius;
}

//usage: @include shift([property],[duration],[easing]);
@mixin transition($property: all, $duration: 0.4s, $ease: ease) {
    transition: $property $duration $ease;
    -webkit-transition: $property $duration $ease;
    -moz-transition: $property $duration $ease;
    -ms-transition: $property $duration $ease;
}

@mixin flex-position($display, $contet, $items) {
    display: $display;
    justify-content: $contet;
    align-items: $items;
}

// rem convertion function
$bfSize: 16px;

@function rem($pixels, $context: $bfSize) {
    @if (unitless($pixels)) {
        $pixels: $pixels * 1px;
    }

    @if (unitless($context)) {
        $context: $context * 1px;
    }

    @return calc($pixels / $context) * 1rem;
}


/*==================================
   default style
=================================*/
// *, *:before, *:after {
//     box-sizing: border-box;
//   }

.mb-2 {
    margin-bottom: 10px !important;
}

.mb-3 {
    margin-bottom: 15px !important;
}

// etn devider
.etn-devider {
    display: block;
    width: 100%;
    height: 1px;
    background: $gray-color;
}

// default btn
.etn-btn,
button.etn-btn.etn-btn-primary,
.attr-btn-primary,
.etn-attendee-form .etn-btn,
.etn-ticket-widget .etn-btn,
.etn-zoom-btn,
.etn-settings-dashboard .button-primary {
    font-size: rem(16px);
    color: #fff;
    background-color: $primary-color;
    @include border-radius(5px);
    @include transition();
    display: inline-block;
    padding: 5px 20px;
    font-weight: 500;
    text-decoration: none;
    line-height: rem(35px);
    border: none;
    cursor: pointer;
    outline: none;

    &:hover,
    &:focus {
        color: #fff;
        border: none;
        box-shadow: none !important;
    }

    &:hover {
        background-color: $secondary-color;
    }

    &.etn-edit-btn {
        color: rgb(93, 120, 255);
        background-color: rgb(238, 241, 255);
        border: none;
        padding: 0 15px;

        &:hover {
            color: $secondary-color;
        }
    }

    &.etn-delete-btn {
        color: $secondary-color;
        background-color: #ffeeee;
        border: none;
        padding: 0 15px;
    }

    &.etn-btn-border {
        border: 1px solid $primary-color;
        background-color: transparent;
        background-image: none;
        color: $primary-color;
        text-transform: uppercase;

        &:hover {
            border-color: $secondary-color;
            color: $secondary-color;
        }
    }

    &.etn-btn-secondary {
        background-color: $secondary-color;

        &:hover {
            background-color: $primary-color;
        }
    }
}

.wrap {
    .etn-ticket-scanner {
        +.page-title-action {
            display: inline-block;
            height: 30px;
            line-height: 30px;
            padding: 0 10px;
            border-radius: 3px;
            position: relative;
            top: 1px;
            margin-left: 10px;

            &:active {
                padding: 0 10px;
                top: 1px;
                line-height: 30px;
            }
        }
    }
}

.etn-btn {
    &.attendee_update_submit {
        margin-top: 15px;
    }
}


.attr-form-control[disabled],
.attr-form-control[readonly],
fieldset[disabled] .attr-form-control,
.etn-form-control[disabled],
.etn-form-control[readonly],
fieldset[disabled] .etn-form-control {
    background-color: #fff;
    opacity: 1;
}

.btn-danger {
    padding: 10px 15px;

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

.etn-btn-text,
.etn_event_upload_image_button {
    background: transparent !important;
    color: #0073AA;
    border-radius: 6px;
    background-color: transparent;
    border: 1px solid #0073AA;
    font-size: rem(15px);
    text-transform: capitalize;
    padding: 7px 12px 7px;
    line-height: 15px;
    display: inline-block;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    max-width: 100%;
}

.etn_event_upload_image_button {
    padding: 8px 12px;
    border: 1px solid #0073AA;

    &.button {
        border: 1px solid #0073AA;
        padding: 0 12px;
    }
}

.etn-btn-close {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    line-height: 40px;

    .dashicons {
        border-radius: 5px;
        background-color: var(--pink);
        display: inline-block;
        font-weight: 600;
        color: #fff;
        font-size: rem(12px);
        width: 22px;
        height: 22px;
        line-height: rem(22px);
        cursor: pointer;
        align-self: center;
        position: relative;
        top: 10px;
    }
}

.etn-form-control,
.etn-attendee-form-wrap .etn-form-control,
.attr-form-control {
    background: #f1f5f8;
    @include border-radius(5px);
    border-color: transparent;
    border: none;
    height: 45px;
    line-height: 45px;
    box-shadow: none;
    width: 100%;
    padding: 5px 10px;

    &:focus,
    &.focused {
        box-shadow: none;
        border: none;
    }

    &::placeholder {
        color: #cbcbcb;
    }
}

.etn-checkbox-field {
    input[type=checkbox] {
        display: none;
    }

    input[type=checkbox]+label {
        cursor: pointer;
        margin-right: 15px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        line-height: 0.8;
        color: #0D165E;
    }

    input[type=checkbox]+label:before {
        content: "✔";
        border: 1px solid #cccccc;
        border-radius: 5px;
        display: inline-block;
        width: 20px;
        height: 20px;
        vertical-align: bottom;
        color: transparent;
        transition: 0.2s;
        text-align: center;
        line-height: 18px;
        margin-right: 5px;
        background-color: #fff;
        font-size: 11px;
    }

    input[type=checkbox]:checked+label:before {
        background-color: #0D165E;
        border-color: #0D165E;
        color: #fff;
    }
}

/**
* Css switch start for setting page
*/

.etn-meta {
    input.etn-admin-control-input {
        height: 0;
        width: 0;
        visibility: hidden;
        display: none;
    }

    label.etn_switch_button_label {
        cursor: pointer;
        width: 43px;
        height: 24px;
        background: #DDDDDD;
        display: block;
        border-radius: 100px;
        position: relative;
        margin: 0;
        padding: 0 !important;
    }

    label.etn_switch_button_label:after {
        content: '';
        position: absolute;
        top: 4px;
        left: 4px;
        width: 15px;
        height: 15px;
        background: #fff;
        border-radius: 90px;
        -webkit-transition: 0.3s;
        -o-transition: 0.3s;
        transition: 0.3s;
        -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.21);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.21);
    }

    .etn_switch_button_label:before {
        content: '';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #fff;
        font-size: rem(10px);
        display: inline-block;
        text-transform: uppercase;
        font-weight: 600;
    }

    input.etn-admin-control-input:checked+label.etn_switch_button_label {
        background: var(--pink);
    }

    input.etn-admin-control-input:checked+label.etn_switch_button_label:after {
        left: calc(100% - 5px);
        -webkit-transform: translateX(-100%);
        -ms-transform: translateX(-100%);
        transform: translateX(-100%);
    }

    input.etn-admin-control-input:checked+label.etn_switch_button_label:before {
        content: "";
        right: inherit;
        left: 10px;
    }

    label.show_label_text {
        text-indent: 0px;
    }
}

//  radio button style
.etn-radio-btn {
    >input[type="radio"] {
        display: none;
    }

    >img {
        cursor: pointer;
        border: 1px solid $primary-color;
        max-width: 100%;
        @include border-radius((6px));
    }

    >input[type="radio"]:checked+img {
        border: 1px solid $secondary-color;
    }
}

// etn title
.etn-title {
    font-size: rem(22px);
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1;
}

.hide_item {
    display: none;
}

.show_item {
    display: block;
}

/* Eventin button loading effect */
.etn-button-loading {
    position: relative;

    &:before {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        border: 2px solid transparent;
        border-top-color: #000000;
        border-radius: 50%;
        animation: button-loading-spinner 1s ease infinite;

        @keyframes button-loading-spinner {
            from {
                transform: rotate(0turn);
            }

            to {
                transform: rotate(1turn);
            }
        }
    }
}

.related-with-sibling {
    margin: 0;
    border-radius: 0;
    border-bottom: 1px dashed #e5e5e5;
}

.etn-badge {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 12px 40px 20px;
    background-color: #F5841C;
    color: #fff;
    border-radius: 4px;
    line-height: 12px;
    display: inline-block;
    letter-spacing: 0.5px;
    position: absolute;
    right: -40px;
    bottom: -8px;
    transform: rotate(-45deg);
    text-align: center;
    display: inline-block;

    &.success {
        color: #0DB428;
        border-color: #0DB428;
        background-color: #D1F2D7;
    }
}