/**=====================
    Button scss
==========================**/
.btn {
    font-size: calc(15px + (16 - 15) * ((100vw - 320px) / (1920 - 320)));
    padding: 10px calc(12px + (16 - 12) * ((100vw - 320px) / (1920 - 320)));
    letter-spacing: 1px;
    line-height: 1.5;
    gap: 4px;
    white-space: nowrap;
    width: 100%;
    transition: all 0.2s ease-in-out;
    border-radius: calc(7px + (12 - 7) * ((100vw - 320px) / (1920 - 320)));
    @include flex_common;

    &.btn-solid,
    &.btn-solid:active {
        background-color: var(--primary-color);
        color: $white;
        border-color: var(--primary-color);    transition: all 0.2s ease-in-out;

        i {
            --Iconsax-Size: 20px;
            --Iconsax-Color: #ffffff;
        }

        &:hover {
            background-color: transparent;
            color: var(--primary-color);

            i {
                --Iconsax-Color: var(--primary-color);
            }
        }
    }

    &.btn-outline {
        border: 1px solid var(--primary-color);
        color: var(--primary-color);

        i {
            --Iconsax-Size: 20px;
            --Iconsax-Color: var(--primary-color);
        }

        &:hover {
            background-color: var(--primary-color);
            color: $white;
        }
    }

    &.btn-fill {
        border: transparent;
        color: $white;
        background-color: var(--primary-color);

        i {
            --Iconsax-Size: 20px;
            --Iconsax-Color: #fff;
        }
    }

    &.btn-solid-gray {
        background-color: $section-bg;
        color: $title-color;

    }

    &.btn-dark-solid {
        background-color: $title-color;
        color: $white;

        &:hover {
            background-color: transparent;
            border-color: $title-color;
            color: $title-color;
        }
    }

    &:focus {
        box-shadow: none;
    }

    &.disabled {
        background-color: $gray-color;
        color: $light-color;
        font-weight: 500;
    }

    &.btn-solid-danger {
        background-color: $danger-color;
        color: $white;

        i {
            --Iconsax-Size: 20px;
            --Iconsax-Color: #ffffff;
        }
    }

    &.btn-solid-success {
        background-color: $success-color;
        color: $white;

        i {
            --Iconsax-Size: 20px;
            --Iconsax-Color: #ffffff;
        }
    }
}

.badge {
    font-size: 14px;
    font-weight: 500;
    border-radius: 15px;
}

.job-btn {
    width: auto;
    display: inline-block;
    padding: 5px 15px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 5px;
}

/* outline buttons */
@each $text-name,
$text-color in (primary, var(--primary-color)),
(secondary, $secondary-color),
(success, $success-color),
(danger, $danger-color),
(info, $info-color),
(light, $light-color),
(title, $title-color),
(warning, $warning-color) {
    .text-#{$text-name} {
        color: $text-color !important;
    }
}


/* badge background */
@each $badge-name,
$badge-color in (primary, var(--primary-color)),
(secondary, $secondary-color),
(success, $success-color),
(danger, $danger-color),
(info, $info-color),
(light, $light-color),
(title, $title-color),
(pending, $pending-color),
(accepted, $accepted-color),
(assigned, $assigned-color),
(on-the-way, $on-the-way-color),
(decline, $decline-color),
(accepted, $accepted-color),
(cancel, $cancel-color),
(on-going, $on-going-color),
(on-hold, $on-hold-color),
(cancel, $cancel-color),
(start-again, $start-again-color),
(completed, $completed-color),
(pending-approval, $pending-approval-color),
(title, $title-color),
(warning, $warning-color) {
    .#{$badge-name}-badge {
        color: $white !important;
        background-color: $badge-color !important;
    }
}

/* badge light background */
@each $badge-name,
$badge-color in (secondary, $secondary-color),
(success, $success-color),
(danger, $danger-color),
(info, $info-color),
(light, $light-color),
(title, $title-color),
(pending, $pending-color),
(accepted, $accepted-color),
(assigned, $assigned-color),
(on-the-way, $on-the-way-color),
(decline, $decline-color),
(accepted, $accepted-color),
(cancel, $cancel-color),
(on-going, $on-going-color),
(on-hold, $on-hold-color),
(cancel, $cancel-color),
(start-again, $start-again-color),
(completed, $completed-color),
(pending-approval, $pending-approval-color),
(warning, $warning-color) {
    .#{$badge-name}-light-badge {
        color: $badge-color !important;
        background-color: rgba($badge-color, 0.10) !important;
    }
}

.primary-light-badge{
    color: var(--primary-color);
    position: relative;
    z-index: 0;
    overflow: hidden;
    &::before{
        @extend %bg-primary-color;
        opacity: 0.1;
    }
}