@import 'abstracts/variables';
@import 'abstracts/mixins';
@import 'abstracts/functions';


body {
    background-color: #f3f5fa !important;
    font-family: usualN, sans-serif;
    color: $primary-color;
    font-weight: 400;
    font-size: $exsmall;
    line-height: 1.625;
}

.arrow-button {
    border-radius: 4px;
    background-color: $light-blue-color;

    i {
        position: relative;
        left: -6px;
        color: $white;
    }

    &.arrow-button-left {
        margin-right: $spacing-sm;
    }

    &.arrow-button-right {
        margin-left: $spacing-sm;
    }

    &.disabled {
        background-color: $light-grey-color;
        cursor: not-allowed;
    }

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

.check-box-switch-off {
    &.card {
        .job-details-block {
            width: 100%;
        }

        .job-list-block {
            width: 100%;
        }

        .map-off-stage {
            display: flex !important;
        }

        .map-on-stage {
            display: none !important;
        }

        .card-list-item {
            margin-top: 0px;
        }

        .summary {
            padding-bottom: 4px;
        }

        .view-vacancies-btn {
            width: 90%;
        }
    }

}

.job-card {
    padding: 10px;
    box-sizing: border-box;
}

.custom-dropdown {
    position: $position-relative;
    display: $display-inline-block;
    width: 100%;

    button {
        width: 100%;
        text-align: left;
        padding: $spacing-md $spacing-lg $spacing-md $spacing-sm;
        background-color: $white;
        border-color: $white;

        &:hover {
            background-color: $white;
            border-color: $white;
        }
    }

    &:hover {
        .dropdown-content {
            display: block;
        }

        .drop-down-icon {
            transform: rotate(180deg);
        }
    }


    .dropdown-content {
        display: $display-none;
        position: $position-absolute;
        @include box-shadow-var($shadow-default);
        background-color: white;
        min-width: 200px;
        z-index: 2;
        padding: $spacing-sm;

        label {
            padding: 0 0 $spacing-md;

            input {
                margin-right: $spacing-sm;
                position: $position-relative;
                top: $spacing-xxxs;
            }

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

        &.show {
            display: $display-block;
        }
    }

    .filter-item-list {
        padding-left: 0;

        li {
            list-style: none;

            label {
                padding: 0 0 $spacing-md;

                input {
                    margin-right: $spacing-sm;
                    position: $position-relative;
                    top: $spacing-xxxs;
                }

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


    }

}

.input-block {
    position: $position-relative;

    .input-group-icon {
        position: $position-absolute;
        left: 10px;
        top: 18px;
        color: $light-blue-color;
    }

    .input-icon-group {
        .form-control {
            padding: 28px 12px 28px 40px;
            color: $light-grey-color;
            border: 1px solid $white;
			line-height: 1.5;
			
        }
    }
}

.filter-tags {
    .active-filter-text {
        color: $light-grey-color;
        font-size: $small;
    }

    .badges {
        background-color: $lightest-grey-color !important;
        color: $primary-color;
        padding: $spacing-xxs $spacing-xl $spacing-xxs $spacing-sm;
        position: $position-relative;

        i {
            color: $secondary-color;
            font-size: $exsmall;
            position: $position-absolute;
            right: $spacing-xxs;
            cursor: pointer;
            top: 6px;
        }
    }

    .clear-filter {
        padding-left: $spacing-xxs;
        color: $light-blue-color;
        font-size: $medium;

        i {
            position: $position-relative;
            top: $spacing-xxxs;
            font-size: $large;
        }
    }
}

.mobile-filter-button {
    border: 1px solid $light-blue-color;
    @include transition($transition-slow);
    padding: $spacing-xxs $spacing-md $spacing-xxs;
    font-size: $exsmall;
    position: $position-relative;
    border-radius: 4px;
    font-weight: bold;
    font-size: $small;

    i {
        color: $light-blue-color;
        position: $position-relative;
        top: $spacing-xxxs;
        font-size: $small;
    }

    &:hover {
        border-color: $secondary-color;
        background-color: $lightest-grey-color !important;
        color: $primary-color;
    }
}

.vacancy-alert-row {
    .vacancy-alert-text {
        padding: $spacing-sm $spacing-lg 0 0;
    }

    .vacancy-alert-button {
        border: 1px solid $light-blue-color;
        @include transition($transition-slow);
        padding: $spacing-xs $spacing-md $spacing-xs $spacing-xl;
        font-size: $exsmall;
        position: $position-relative;
        border-radius: 4px;

        i {
            color: $light-blue-color;
            position: $position-absolute;
            left: $spacing-xxs;
            top: $spacing-xxs;
        }

        &:hover {
            border-color: $secondary-color;
            background-color: $lightest-grey-color !important;
            color: $primary-color;
        }
    }
}

.card {
    @include transition($transition-slow);
    width: 100%;
    padding: $spacing-md $spacing-md $spacing-sm;
    margin: 0 0 $spacing-md;
    position: relative;
    border: 2px solid $white;
    background-color: $white;
    min-height: 100px;
    padding: $spacing-md $spacing-lg $spacing-xxxxxl;

    h2 {
        padding-bottom: $spacing-lg;
        font-size: 1.375rem;
        margin-bottom: 0;
    }

    .summary {
        padding-bottom: $spacing-lg;
    }

    .small-text {
        font-size: .625rem;
    }

    .card-list-item {
        margin-top: $spacing-xxl;

        li {
            margin-bottom: $spacing-xxs;
            position: $position-relative;

            i {
                width: 24px;
                color: $light-blue-color;
                font-size: $ex-large;
                position: $position-relative;
                top: $spacing-xs;
            }
        }


    }

    .view-vacancies-btn {
        margin: 0;
        padding-right: $spacing-xxxl;
        position: $position-relative;
        margin-right: $spacing-sm;

        i {
            position: $position-absolute;
            right: 0;
        }
    }

    .favorite-btn {
        border-radius: 4px;
        background-color: $lightest-grey-color;
        height: 42px;
        padding: $spacing-xs;
        color: $light-blue-color;

        &:active {
            background-color: $lightest-grey-color;
            border-color: transparent;
            color: $light-blue-color;
        }
    }
}

.show-map-check-box {
    .form-check-input {
        float: right;
        width: 46px;
        height: 24px;
        margin-top: 0;
    }

    .form-check-label {
        margin-right: $spacing-xxxxl;
    }

}

.ui-autocomplete {
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    z-index: 10000 !important;

    &.ui-widget-content {
        @include box-shadow-var($shadow-default);
        background: $white;
        color: $primary-color;

        li {
            a {
                &.ui-state-focus {
                    border: none;
                    background: none;
                    color: $primary-color;
                    margin: 0;
                    cursor: pointer;
                }
            }
        }
    }

}

// custom drop down
.custom-dropdown {
    .dropdown-toggle {
        position: $position-relative;

        &::after {
            display: $display-none;
        }

        .drop-down-icon {
            position: $position-absolute;
            right: 5px;
            color: $secondary-color;
        }
    }

    .dropdown-icon {
        @include transition($transition-default);
        display: $display-inline-block;
        vertical-align: middle;
    }

    .dropdown-content {
        ul {
            padding-left: $spacing-xxs;
            margin-bottom: 0;
        }

        &.show {
            +.dropdown-toggle {
                .dropdown-icon {
                    transform: rotate(180deg);
                }
            }
        }

        li {
            list-style: none;
        }
    }

    .total-count-block {
        .total-count {
            font-size: 12px;
            color: #99a6cc;
        }
    }

    .total-count {
        margin-left: $spacing-xxs;
    }
}


.filter-popup {
    display: $display-none;
    position: $position-fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    background: $white;
    @include box-shadow-var($shadow-light);
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    display: $display-flex;
    flex-direction: column;

    .filter-popup-header {
        position: $position-sticky;
        top: 0;
        background: $white;
        z-index: 10;
        padding: $spacing-md $spacing-md-xl 0 $spacing-md-xl;
    }

    .filter-popup-footer {
        position: sticky;
        bottom: 0;
        background: $white;
        padding: $spacing-md $spacing-md-xl;
        @include box-shadow-var($shadow-heavy);

        .left-element {
            color: $light-blue-color ;
        }

    }

    .popup-content {
        flex-grow: 1;
        max-height: 75vh;
        overflow-y: auto;
        position: $position-relative;

        .popup-content-block {
            padding: $spacing-md-xl;
        }
    }

    .close-btn {
        position: $position-absolute;
        top: -$spacing-xxs;
        right: 6px;
        font-size: $xx-large;
        cursor: pointer;
        color: $light-blue-color;
    }

    .drop-down-title {
        font-size: $xx-small;
        color: $light-grey-color;
    }
}

.overlay {
    display: $display-none;
    position: $position-fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 1040;
    /* Ensure it's below the popup but above everything else */
}

.dropdown-toggle {
    display: $display-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding-right: $spacing-sm;

    .drop-down-icon {
        flex-shrink: 0;
        margin-left: $spacing-xs;
    }

    span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 100%;
    }

}

#map-container {
    position: -webkit-sticky;
    position: sticky;
    top: $spacing-md-xl;
    height: 600px;
    overflow: hidden;
}

.marker-glow {
    position: $position-relative;
    display: $display-inline-block;
    width: 60px;
    height: 60px;
    background-color: rgba(10, 83, 190, 0.3);
    border-radius: 50%;
    overflow: hidden;
}


.job-card.highlighted {
    background-color: $light-white;
    border: 2px solid $blue;
    @include box-shadow-var($shadow-card);
}

.pagination {
    .page-item {

        &.active {
            a {
                &.page-link {
                    background-color: $light-blue-color;
                    color: $white;
                }
            }
        }

        a {
            &.page-link {
                border: none;
                border-radius: 50%;
                width: 35px;
                height: 35px;
                border-top-left-radius: 50%;
                border-bottom-left-radius: 50%;
                background-color: transparent;
                padding: 6px 12px;
                color: $primary-color;

            }

        }
    }
}

@media (max-width: $mobile) {
    .filter-tags {
        display: $display-none !important;
    }

    .card {
        h2 {
            padding-bottom: 0;
        }

        .card-list-item {
            margin-top: $spacing-md-xl;

        }

        .view-vacancies-btn {
            width: 90%;
        }
    }

}

.custom-dropdown-inp {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.custom-dropdown-inp .dropdown-item {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
}

.custom-dropdown-inp .dropdown-item:hover {
    background-color: #f1f1f1;
}

.custom-dropdown-inp .dropdown-item:active {
    background-color: #e0e0e0;
}