@use "../utils/variables";

.search-box {
    position: fixed;
    top: 70px;
    left: 255px;
    z-index: 1;
    width: calc(100% - 255px);
    height: 100%;

    @media (max-width: 1199.98px) {
        left: 0;
        width: 100%;
    }

    >.row {
        @media (min-width:1200px) {
            >.custom-col-lg-4 {
                width: 37%;
            }

            >.custom-col-lg-8 {
                width: calc(100% - 37%);
            }
        }

        @media (min-width:1400px) {
            >.custom-col-xxl-3 {
                width: 27%;
            }

            >.custom-col-xxl-9 {
                width: calc(100% - 27%);
            }
        }
    }

    .toggle-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 264px;
        z-index: 1;
        background-color: #fff;
        border: 1px solid #eee;
        padding: 6px 14px;
        box-shadow: 0 3px 4px rgba(variables.$grey, 0.4705882353) !important;
        font-size: 17px;
        align-items: center;
        justify-content: center;

        &:active {
            background-color: #fff;
            border: 1px solid #eee;
        }

        @media (max-width: 1199.98px) {
            display: flex;
        }

        @media (max-width: 991.98px) {
            left: 10px;
        }
    }

    .left-location-box {
        padding: calc(14px + (18 - 14) * ((100vw - 320px) / (1920 - 320)));
        border-right: 1px solid #eee;
        position: relative;
        height: calc(100vh - 65px - 70px);
        overflow: auto;
        background-color: #fff;

        &:has(.no-data[style="display: flex;"]){
            overflow: hidden;
        }

        @media (max-width: 1199.98px) {
            position: fixed;
            top: 70px;
            left: -300px;
            width: 423px;
            height: calc(100vh - 140px);
            z-index: 1;
            transition: all 0.25s ease-in-out;

            &.show {
                left: 255px;
            }
        }

        @media (max-width: 991.98px) {
            left: -450px;
            height: calc(100vh - 123px);
            z-index: 4;

            &.show {
                left: 0;
            }
        }

        @media (max-width: 425px) {
            width: 100%;
        }

        .title {
            margin-bottom: 13px;

            @media (max-width: 1199.98px) {
                margin-bottom: 18px;
                display: flex;
                align-items: center;
                justify-content: space-between;

                .location-close-btn {
                    padding: 0;
                    width: 33px;
                    height: 33px;
                    background-color: #F3F3F3;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 18px;
                    border: none;
                }
            }

            h4 {
                font-size: 19px;
                margin: 0;
                font-weight: 600;
            }
        }

        .no-data {
            height: calc(100% - 175px);
            justify-content: center;
        }
    }

    .search-input {
        display: flex;
        gap: 6px;

        .form-control {
            padding-right: 44px;
            background-color: #F3F3F3 !important;
        }

        i {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: 0;
            padding: 0 16px;
            font-size: 18px;
            color: #777;
        }

        .location-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            padding: 0 12px;
            height: 100%;
            border: none;
            font-size: 20px;
        }

        .btn {
            padding: calc(8px + 3*(100vw - 320px) / 1600) 14px;
            height: 100%;
            line-height: 1;

            i {
                position: relative;
                inset: unset;
                transform: unset;
                padding: 0;
                color: #fff;
                line-height: 1.2;
            }

            span {
                display: none;
            }
        }
    }

    .driver-tabs {
        padding-top: 24px;
        flex-wrap: nowrap;
        position: sticky;
        top: -18px;
        background-color: #fff;
        z-index: 2;
        overflow: auto;
        padding-bottom: 10px;

        .nav-item {
            display: block;
            width: 100%;

            .nav-link {
                background-color: transparent;
                border: none;
                border-bottom: 2px solid transparent;
                color: rgba(variables.$dark-color, 0.6);
                margin: unset;
                font-weight: 500;
                font-size: 16px;
                width: 100%;
                padding-top: 0;
                white-space: nowrap;

                &.active {
                    border-color: var(--primary-color);
                    color: var(--primary-color);
                }
            }
        }
    }

    .driver-content {
        margin-top: 24px;
    }
}

.location-map {
    width: 100%;
    height: 100%;
    position: relative;

    @media (max-width: 1199.98px) {
        height: calc(100vh - 140px);
        width: calc(100vw - 255px);
        margin-left: auto;
    }

    @media (max-width: 991.98px) {
        width: 100%;
        height: calc(100vh - 123px);
    }

    #map_canvas {
        z-index: 0;
        width: 100%;
        height: 100%;

        .gm-style-mtc-bbw {
            @media (max-width: 1199.98px) {
                left: 104px !important;
            }
        }

        .gm-style-iw-ch {
            &:empty {
                display: none;
            }
        }

        .gm-style {
            font-family: Inter, sans-serif;

            >div {
                &:first-child {
                    >div {
                        >div {
                            >div {
                                >div {
                                    &[role="button"] {
                                        width: 50px !important;
                                        height: 50px !important;
                                        overflow: unset !important;

                                        img {
                                            max-width: 100% !important;
                                            height: 100% !important;
                                            width: 100% !important;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }


            .gm-style-iw-c {
                padding: 20px !important;
                max-height: unset !important;
                min-width: 250px !important;
                width: 250px !important;
                max-width: 250px !important;
            }

            .gm-style-iw-d {
                max-height: unset !important;
                overflow: visible !important;

                h5 {
                    font-size: 16px;
                    line-height: 1.3;
                    font-weight: 500;
                    margin: 11px 0 0;
                }

                p {
                    margin: 0;
                    font-size: 14px;
                    font-weight: 400;
                    letter-spacing: 0.3px;
                    color: rgba(variables.$dark-color, 0.6);

                    &:nth-child(3) {
                        margin-top: 8px;
                    }

                    +p {
                        margin-top: 4px;
                        padding-top: 4px;
                        border-top: 1px dashed rgba(225, 225, 226, 0.5);
                    }
                }
            }
        }

        .gm-style-iw-chr {
            display: block;

            button {
                width: auto !important;
                height: auto !important;
                position: absolute !important;
                top: 6px;
                right: 11px;
                z-index: 1;
                opacity: 1;

                span {
                    margin: 0 !important;
                }
            }
        }

        .gm-style-iw-d {
            img {
                width: 50px;
            }
        }
    }

    .location-top-select {
        position: absolute;
        top: 10px;
        right: 60px;
        z-index: 3;
        width: calc(166px + (225 - 166) * ((100vw - 1198px) / (1920 - 1198)));

        @media (max-width: 1199.98px) {
            top: 57px;
            right: 12px;
            width: 166px;
        }

        .accordion {
            .accordion-item {
                transition: none;
                background-color: transparent;
                display: block !important;

                .accordion-header {
                    .accordion-button {
                        background-color: #fff;
                        color: #222;
                        border-radius: 4px;
                        width: 100%;
                        padding: 9px 12px;
                        border: 1px solid #eee;
                        justify-content: space-between;
                        box-shadow: 0 3px 4px #77777778 !important;

                        &::after {
                            content: "\ea4e";
                            font-family: remixicon;
                            background: none;
                            width: auto;
                            height: auto;
                            font-style: normal;
                            -webkit-font-smoothing: antialiased;
                            font-size: 20px;
                            line-height: 1;
                        }

                        &:focus,
                        &:active {
                            border: 1px solid #eee;
                        }
                    }
                }

                .accordion-body {
                    padding: 0;
                }
            }
        }

        .driver-category-box {
            background-color: variables.$white;
            overflow: auto;
            margin-top: 5px;
            border-radius: 5px;
            max-height: 290px;
            padding: 10px;
            box-shadow: 0 3px 4px #77777778 !important;

            &::-webkit-scrollbar-track {
                -webkit-box-shadow: inset 0 0 6px rgba(98, 98, 98, 0.322);
            }

            &::-webkit-scrollbar {
                width: 4px;
                height: 0;
            }

            &::-webkit-scrollbar-thumb {
                background-color: #626262;
            }

            .category-input {
                position: sticky;
                top: -10px;
                left: -10px;
                background-color: #f9f9f8;
                z-index: 1;
                border-radius: 6px;
                width: calc(100% + 20px);
                margin: -10px;
                margin-bottom: 11px;

                .form-control {
                    background-color: rgba(239, 241, 238, 0.4) !important;
                    border: none;
                    border-radius: 0;
                    padding: 14px 16px;
                    font-size: 14px;
                    font-weight: 400;
                    color: rgba(variables.$dark-color, 0.8);
                    line-height: 1;
                    width: 100%;
                    height: 100%;
                }
            }

            .vehicle-list {
                width: 100%;

                +.vehicle-list {
                    margin-top: 2px;
                    padding-top: 2px;
                    border-top: 1px solid #eee;
                }

                .form-check {
                    position: relative;
                    width: 100%;
                    display: flex;
                    align-items: center;
                    padding: 6px 8px;
                    border-radius: 4px;
                    cursor: pointer;
                    overflow: hidden;
                    z-index: 0;

                    &:hover {
                        &::before {
                            content: "";
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100%;
                            background-color: var(--primary-color);
                            opacity: 0.1;
                            z-index: -1;
                        }
                    }

                    &:has(.form-check-input:checked) {
                        label {
                            font-weight: 500;
                        }
                    }

                    .form-check-input {
                        &::after {
                            background-color: transparent;
                            border-color: #eee;
                        }

                        &::before {
                            z-index: 0;
                        }
                    }

                    label {
                        width: 100%;
                        font-size: 15px;

                        img {
                            margin-right: 4px;
                            width: 25px;
                            height: auto;
                            object-fit: contain;
                        }
                    }
                }
            }
        }
    }

    .zone-select-box {
        position: absolute;
        top: 10px;
        right: calc(237px + (300 - 237) * ((100vw - 1198px) / (1920 - 1198)));
        z-index: 2;
        width: calc(166px + (225 - 166) * ((100vw - 1198px) / (1920 - 1198)));

        @media (max-width: 1199.98px) {
            top: 105px;
            right: 12px;
            width: 166px;
        }

        .select-ride-btn {
            background-color: #fff;
            color: #222;
            width: 100%;
            padding: 7px 12px;
            border: 1px solid #eee;
            justify-content: space-between;
            box-shadow: 0 3px 4px #77777778 !important;

            &::after {
                content: "\ea4e";
                font-family: remixicon;
                font-style: normal;
                -webkit-font-smoothing: antialiased;
                font-size: 20px;
                line-height: 1;
            }
        }

        .driver-category-box {
            background-color: variables.$white;
            overflow: auto;
            margin-top: 5px;
            border-radius: 5px;
            max-height: 290px;
            padding: 10px;
            box-shadow: 0 3px 4px #77777778 !important;
            display: none;

            &::-webkit-scrollbar-track {
                -webkit-box-shadow: inset 0 0 6px rgba(98, 98, 98, 0.322);
            }

            &::-webkit-scrollbar {
                width: 4px;
                height: 0;
            }

            &::-webkit-scrollbar-thumb {
                background-color: #626262;
            }

            &.show {
                display: block;
            }

            .category-input {
                position: sticky;
                top: -13px;
                left: -13px;
                background-color: #f9f9f8;
                z-index: 1;
                border-radius: 6px;
                width: calc(100% + 26px);
                margin: -10px;
                margin-bottom: 11px;

                .form-control {
                    background-color: rgba(239, 241, 238, 0.4) !important;
                    border: none;
                    border-radius: 0;
                    padding: 14px 16px;
                    font-size: 14px;
                    font-weight: 400;
                    color: rgba(variables.$dark-color, 0.8);
                    line-height: 1;
                    width: 100%;
                    height: 100%;
                }
            }

            .vehicle-list {
                width: 100%;

                +.vehicle-list {
                    margin-top: 2px;
                    padding-top: 2px;
                    border-top: 1px solid #eee;
                }

                .form-check {
                    position: relative;
                    width: 100%;
                    display: flex;
                    align-items: center;
                    padding: 6px 8px;
                    border-radius: 4px;
                    cursor: pointer;

                    &:hover {
                        background-color: #eaf6f3;
                    }

                    &:has(.form-check-input:checked) {
                        label {
                            font-weight: 600;
                        }
                    }

                    label {
                        width: 100%;
                        font-size: 15px;

                        img {
                            margin-right: 4px;
                            width: 25px;
                            height: auto;
                            object-fit: contain;
                        }
                    }
                }
            }
        }

        .select2 {
            &.select2-container {
                .select2-selection {
                    &.select2-selection--single {
                        box-shadow: 0 3px 4px rgba(variables.$grey, 0.4705882353);

                        .select2-selection__rendered {
                            background-color: #fff;
                            width: 100%;
                            padding: 7px 12px !important;

                            .select2-selection__placeholder {
                                color: #222;
                                font-weight: 500;
                            }
                        }
                    }
                }
            }
        }
    }
}