//
// components.scss
//

//Buttons
@each $name,
$value in $colors {
    .btn-#{$name} {
        background-color: #{$value} !important;
        border: 1px solid #{$value} !important;
        color: $white !important;
        box-shadow: 0 3px 7px rgba($value, 0.5);
        &:hover, &:focus, &:active, &.active, &.focus{
            background-color: darken($value, 10%) !important;
            border-color: darken($value, 10%) !important;
            color: $white !important;
        }
    }

    .btn-soft-#{$name} {
        background-color: rgba($value, 0.15) !important;
        border: 1px solid rgba($value, 0.1) !important;
        color: #{$value} !important;
        box-shadow: 0 3px 7px rgba($value, 0.20);
        &:hover, &:focus, &:active, &.active, &.focus{
            background-color: #{$value} !important;
            border-color: #{$value} !important;
            color: $white !important;
            box-shadow: 0 3px 7px rgba($value, 0.5);
        }
    }

    .btn-outline-#{$name} {
        border: 1px solid #{$value};
        color: #{$value};
        background-color: transparent;    
        &:hover, &:focus, &:active, &.active, &.focus, &:not(:disabled):not(.disabled):active{
            background-color: #{$value};
            border-color: #{$value};
            color: $white;
            box-shadow: 0 3px 7px rgba($value, 0.5);
        }
    }
}
.btn {
    padding: 8px 20px;
    outline: none;
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    font-weight: 600;
    border-radius: 7px;
    &:focus{
        box-shadow: none !important;
    }
    &.btn-sm{
        padding: 7px 16px;
        font-size: 10px;
    }
    &.btn-lg{
        padding: 14px 30px;
        font-size: 20px;
    } 
    &.searchbtn {
        padding: 6px 20px;
    }

    &.btn-pills {
        border-radius: 30px;
    }

    &.btn-light {
        color: $dark !important;
        background: $light;
        border: 1px solid $gray-300;
        &:hover, &:focus, &:active, &.active, &.focus{
            background-color: darken($light, 10%) !important;
            color: $dark; 
        }
    }    
    &.btn-outline-light {
        border: 1px solid $gray-300;
        color: $dark !important;
        background-color: transparent;    
        &:hover, &:focus, &:active, &.active, &.focus{
            background-color: $light;
        }
    }
}

button:not(:disabled) {
    outline: none;
    border: 0;
}
//Shadow 
.shadow {
    box-shadow: $shadow !important;
}
.shadow-large {
    box-shadow: $shadow-lg !important;
}
.badge {
    padding: 5px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    font-size: 10px;
    &:focus, &.focus {
        box-shadow: none !important;
    }
}

//Alert
@each $name,
$value in $colors {
    .alert-#{$name} {
        background-color: lighten($value, 4%);
        color: $white;
        border-color: $value;
        .alert-link {
            color: darken($value, 30%);
        }
    }
    .alert-outline-#{$name} {
        background-color: $white;
        color: $value;
        border-color: $value;
    }
}
.alert {
    padding: 8px 15px;
    border-radius: 7px;
    font-size: 13px;
    &.alert-light {
        background-color: $light;
        color: $dark;
        border-color: $gray-300;
    }
    &.alert-dismissible {
        padding-right: 30px;
        .close {
            top: -2px;
            right: -10px;
            font-size: 16px !important;
        }
    }
    &.alert-pills {
        border-radius: 30px;
        display: inline-block;
        .content {
            font-weight: 600;
        }
    }
}

//Feather Icon
.fea {
    stroke-width: 1.8;
    &.icon-sm {
        height: 16px;
        width: 16px;
    }
    &.icon-ex-md {
        height: 20px;
        width: 20px;
    }
    &.icon-m-md {
        height: 28px;
        width: 28px;
    }
    &.icon-md {
        height: 35px;
        width: 35px;
    }
    &.icon-lg {
        height: 42px;
        width: 42px;
    }
    &.icon-ex-lg {
        height: 52px;
        width: 52px;
    }
}

//Avatar
.avatar {
    &.avatar-ex-sm{
        max-height: 25px;
    }
    &.avatar-md-sm{
        height: 45px;
        width: 45px;
    }
    &.avatar-small{
        height: 70px;
        width: 70px;
    }
    
    &.avatar-m-md {
        height: 90px;
        width: 90px;
    }
    &.avatar-medium{
        height: 110px;
        width: 110px;
    }
    &.avatar-large{
        height: 140px;
        width: 140px;
    }
    &.avatar-ex-large{
        height: 180px;
        width: 180px;
    }
}

// Loader
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(45deg, $white, $white);
    z-index: 9999999;
    #status {
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        .sk-chase {
            width: 40px;
            height: 40px;
            position: relative;
            animation: sk-chase 2.5s infinite linear both;
            margin: 0 auto;
            .sk-chase-dot {
                width: 100%;
                height: 100%;
                position: absolute;
                left: 0;
                top: 0; 
                animation: sk-chase-dot 2.0s infinite ease-in-out both; 
                &:before {
                    content: '';
                    display: block;
                    width: 25%;
                    height: 25%;
                    background-color: $primary;
                    border-radius: 100%;
                    animation: sk-chase-dot-before 2.0s infinite ease-in-out both; 
                }
                &:nth-child(1), 
                &:nth-child(1):before { 
                    animation-delay: -1.1s; 
                }
                &:nth-child(2), 
                &:nth-child(2):before { 
                    animation-delay: -1.0s; 
                }
                &:nth-child(3), 
                &:nth-child(3):before { 
                    animation-delay: -0.9s; 
                }
                &:nth-child(4), 
                &:nth-child(4):before { 
                    animation-delay: -0.8s;
                }
                &:nth-child(5), 
                &:nth-child(5):before { 
                    animation-delay: -0.7s; 
                }
                &:nth-child(6), 
                &:nth-child(6):before { 
                    animation-delay: -0.6s; 
                }                
            }
        }
    }
}

@keyframes sk-chase {
    100% { transform: rotate(360deg); } 
}

@keyframes sk-chase-dot {
    80%, 100% { transform: rotate(360deg); } 
}

@keyframes sk-chase-dot-before {
    50% {
        transform: scale(0.4); 
    } 100%, 0% {
        transform: scale(1.0); 
    } 
}

//FAQ
.accordion {
    .accordion-item {
        overflow: hidden;
        .accordion-button {
            font-weight: 600;
            text-align: left;
            &:focus {
                box-shadow: none;
            }
            &:before {
                content: '\F0143';
                display: block;
                font-family: 'Material Design Icons';
                font-size: 16px;
                color: $primary;
                position: absolute;
                right: 20px;
                top: 50%;
                transform: translateY(-50%);
                transition: all 0.5s ease;
            }
            &.collapsed {
                background-color: $white;
                color: $dark !important;
                transition: all 0.5s;
                &:before {
                    top: 15px;
                    transform: rotate(180deg);
                    color: $dark !important;
                }
            }
            &:not(.collapsed) {
                color: $primary;
            }
            &:after {
                display: none;
            }
        }
    }
}

//back to top and Shape
.home-shape-arrow,
.back-to-top {
    display: block;
    position: absolute;
    width: 100%;
    height: auto;
    z-index: 1;
    left: 0;
    i {
        height: 50px;
        width: 50px;
        margin: 0 auto;
        line-height: 50px;
        text-align: center;
        box-shadow: $shadow;
        border-radius: 30px;
    }
}
.home-shape-arrow .arrow-icon,
.back-to-top .icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    display: inline-block;
    transition: all 0.5s ease;
}

.home-shape-arrow {
    bottom: 25px;
}

.back-to-top {
    top: -25px;
    &:hover {
        .icons {
            background-color: $primary !important;
            color: $white !important;
        }
    }
}

//Map
.map {
    line-height: 0;
    iframe {
        width: 100%;
        height: 440px;
    }
}

.form-control {
    box-shadow: none;
    background-color: transparent;
    border: 1px solid $gray-400;
    color: $dark;
    height: 40px; 
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 7px;
    transition: all 0.5s ease;
    &:focus, 
    &.active {
        border-color: $primary;
        box-shadow: none;
    }
} 
textarea {
    height: 120px !important;
    &.form-control {
        line-height: 25px;
    }
}

//Subscribe form
.subcribe-form {
    input {
        padding: 12.5px 20px;
        width: 100%;
        color: $dark !important;
        border: none;
        outline: none !important;
        padding-right: 130px;
        background-color: rgba($white, 0.90);
    }
    .btn {
        padding: 11.5px 20px !important;
    }
    button {
        position: absolute;
        right: 12px;
        outline: none !important;
    }
}

//Breadcrumbs
.breadcrumb {
    letter-spacing: 0.5px;
    padding: 0;
    display: block;
    background: transparent;
    .breadcrumb-item {
        font-size: 16px;
        font-weight: 600;
        padding-left: 0;
        display: inline-block;
        a {
            color: $dark;
            &:hover {
                color: $primary;
            }
        }
        &.active {
            color: $primary;
        }
        &:before {
            content: "";
        }
        &:after {
            content: "\f0142" !important;
            font-size: 14px;
            color: $dark; 
            font-family: 'Material Design Icons';
            padding-left: 5px;
        }     
        &:last-child {
            &:after {
                display: none;
            }
        } 
    }
}


///Pagination
.pagination {
    .page-item {
        .page-link {
            color: $dark;
            border: 1px solid $gray-300;
            padding: 12px 18px;
            font-size: 14px;
            &:focus {
                box-shadow: none;
            }
            &:hover {
                color: $white;
                background: rgba($primary, 0.9);
                border-color: rgba($primary, 0.9);
            }
        }
        
        &:first-child {
            .page-link {
                border-top-left-radius: 30px;
                border-bottom-left-radius: 30px;
            }
        }
        &:last-child {
            .page-link {
                border-top-right-radius: 30px;
                border-bottom-right-radius: 30px;
            }
        }
        &.active {
            .page-link {
                color: $white;
                background: $primary !important;
                border-color: $primary;
                cursor: not-allowed;
            }
        }
    }
}

//Social icons
.social-icon {
    li {
        a {
            color: $dark;
            border: 1px solid $dark;
            display: inline-block;
            height: 32px;
            text-align: center;
            font-size: 15px;
            width: 32px;
            line-height: 27px;
            transition: all 0.4s ease;
            overflow: hidden;
            position: relative;
            .fea-social {
                stroke-width: 2;
            }
            &:hover {
                background-color: $primary;
                border-color: $primary !important;
                color: $white !important;
                .fea-social {
                    fill: darken($primary, 5%);
                }
            }
        }
    }
    &.social {
        li {
            a {
                color: $gray-500;
                border-color: $gray-500;
            }
        }
    }
}

//back-to-home
.back-to-home {
    position: fixed;
    top: 4%;
    right: 2%;
    z-index: 1;
    a {
        width: 40px;
        height: 40px;
        line-height: 38px;
        background: $primary;
        .fea {
            stroke-width: 2;
        }
    }
}

//partner-img
.partner-img {
    opacity: 0.6;
}

//blog 
.blog-post {
    .title {
        &:hover {
            color: $primary !important;
        }
    }
}

@media (min-width: 1024px) {
    .padding-ten {
        padding-left: 3%;
        padding-right: 3%;
    }
}
@media (min-width: 1025px) {
    .padding-ten {
        padding-left: 10%;
        padding-right: 10%;
    }
}