@use "../utils/mixins";
@use "../utils/variables";

/*=====================
 map css start
==========================*/
#map-container {
    height: calc(250px + (350 - 250) * ((100vw - 320px) / (1920 - 320)));
    width: 100%;
}

#coords {
    margin-top: 10px;
}

.map-warper {
    position: relative;
    z-index: 0;
}

.map-instruction {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: variables.$white;
    padding: 20px;
    border-radius: 12px;
    position: sticky;
    top: 90px;

    h4 {
        font-weight: 600;
        font-size: 20px;
        margin-bottom: 12px;
    }

    p {
        font-size: 14px;
        color: variables.$dark-color;
        margin: 0;
        font-weight: 500;
    }

    .map-detail {
        display: flex;
        align-items: start;
        gap: 8px;
        color: rgba(variables.$dark-color, 0.75);

        svg {
            width: 18px;
            height: 18px;
            min-width: 18px;
            margin-top: 3px;
        }
    }

    .notify-img {
        height: 100%;
        width: 100% !important;
        margin-top: 10px;
    }
}

.ui-menu {
    &.ui-widget {
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(variables.$primary-color, 0.10);
        border-radius: variables.$border-radius;
        box-shadow: 0 6px 10px 4px rgba(variables.$dark-color, 0.10);
        max-height: 333px;
        overflow: auto;
        padding: 0;
        background-color: variables.$white;
        width: 39% !important;
        z-index: 13;

        .ui-menu-item {
            font-size: 15px;
            white-space: wrap;
            word-break: break-all;
            border-bottom: 1px solid rgba(variables.$primary-color, 0.10);
            position: relative;
            cursor: pointer;
            padding: calc(8px + (12 - 8) * ((100vw - 320px) / (1920 - 320))) calc(12px + (15 - 12) * ((100vw - 320px) / (1920 - 320)));

            &:last-child {
                border-bottom: none;
            }
        }

        &::-webkit-scrollbar-track {
            background-color: rgba(variables.$dark-color, 0.04);
        }

        &::-webkit-scrollbar {
            width: 3px;
        }

        &::-webkit-scrollbar-thumb {
            background-color: var(--primary-color);
            height: 4px;
        }
    }
}

.ride-location {
    iframe {
        min-height: 350px;
        height: 619px;
        width: 100%;
    }
}

.location-list {
    display: flex !important;
    flex-direction: column;
    gap: 16px;

    li {
        padding-top: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: space-between;

        &:first-child {
            padding-top: 0;
        }

        +li {
            border-top: 1px solid rgba(variables.$gray-color, 0.5);
        }

        h5 {
            font-size: calc(13px + (14 - 13) * ((100vw - 320px) / (1920 - 320)));
            line-height: 1.2;
            font-weight: 500;
            color: rgba(variables.$dark-color, 0.8);
        }

        .btn {
            padding: 4px 10px;
        }

        .user-box {
            gap: 10px;

            img {
                position: relative;
            }

            span[class*=driver-] {
                min-width: 6px;
                width: 6px;
                height: 6px;
                border-radius: 100%;
                z-index: 1;
                animation: round 1.3s ease-in-out infinite;
                font-size: 0;
                display: inline-block;
                position: absolute;
                top: 5px;
                right: 3px;
            }

            .rate-box {
                padding: 2px 4px;
                inset: unset;
                transform: unset;
                margin-top: 4px;
            }
        }
    }
}

.map-location-list {
    border: 1px solid #eee;
    padding: 11px;
    border-radius: 6px;
    margin-top: 6px;
    max-height: 188px;
    overflow: auto;

    &:empty {
        display: none;
    }

    li {
        display: flex;
        gap: 9px;
        cursor: pointer;
        font-size: calc(14px + (15 - 14) * ((100vw - 320px) / (1920 - 320)));

        &::before {
            content: "\ef14";
            @include mixins.font;
            margin-top: 4px;
            line-height: 1;
            color: variables.$grey;
        }

        &:first-child {
            padding-top: 0;
        }

        +li {
            padding-top: 8px;
            margin-top: 8px;
            border-top: 1px solid rgba(variables.$gray-color, 0.5);
        }

        h5 {
            font-size: calc(13px + (14 - 13) * ((100vw - 320px) / (1920 - 320)));
            line-height: 1.2;
            font-weight: 500;
            color: rgba(variables.$dark-color, 0.8);
        }

        .btn {
            padding: 4px 10px;
        }

        .user-box {
            gap: 10px;

            img {
                position: relative;
            }

            span[class*=driver-] {
                min-width: 6px;
                width: 6px;
                height: 6px;
                border-radius: 100%;
                z-index: 1;
                animation: round 1.3s ease-in-out infinite;
                font-size: 0;
                display: inline-block;
                position: absolute;
                top: 5px;
                right: 3px;
            }

            .rate-box {
                padding: 2px 4px;
                inset: unset;
                transform: unset;
            }
        }
    }
}

.pac-container {
    border-radius: 4px;
    box-shadow: 1px 4px 11px rgba(238, 238, 238, 0.96);
    margin-top: -71px;
    border: 1px solid variables.$white-dark;
    font-family: var(--font-family);

    &::after {
        height: auto;
        background-position: center right 13px;
        background-size: 126px auto;
        padding: 15px;
        border-top: 1px solid variables.$white-dark;
        background-color: #f9f9f9;
    }

    .pac-item {
        cursor: pointer;
        line-height: 1.3;
        border: none;
        color: #222;
        padding: 11px 18px;
        display: flex;
        align-items: center;
        gap: 7px;

        +.pac-item {
            border-top: 1px solid variables.$white-dark;
        }

        .pac-icon {
            background: none;
            width: unset;
            height: unset;
            margin: 0;
            line-height: 1;
            display: block;
            vertical-align: middle;
            font-size: 17px;
            color: variables.$grey;

            &::before {
                content: "\ef14";
                @include mixins.font;
            }
        }

        .pac-item-query {
            font-size: 15px;
            padding-right: 0;
            color: rgba(33, 33, 33, 0.9);

            .pac-matched {
                color: #222;
            }
        }

        span {
            &:last-child {
                font-size: 15px;
                color: variables.$grey;
            }
        }
    }
}

.left-map-box {
    .save-address-map-box {
        .alert {
            width: auto;
            text-align: justify;
            border-radius: 6px;
            overflow: hidden;

            a {
                color: var(--primary-color);
            }
        }

        .duration-distance-box {
            display: flex;
            position: absolute;
            top: 10px;
            right: 63px;
            align-items: center;
            justify-content: flex-end;
            gap: calc(6px + (12 - 6) * ((100vw - 320px) / (1920 - 320)));
            margin-bottom: 18px;
            flex-wrap: wrap;

            @media (max-width: 767.98px) {
                top: 60px;
                right: 9px;
            }

            li {
                display: flex;
                align-items: center;
                gap: 10px;
                justify-content: space-between;
                padding: calc(6px + (10 - 6) * ((100vw - 320px) / (1920 - 320))) calc(12px + (15 - 12) * ((100vw - 320px) / (1920 - 320)));
                background-color: #fff;
                border: 1px solid #eee;
                border-radius: 6px;
                font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1920 - 320)));
                font-weight: 400;
                color: rgba(variables.$dark-color, 0.6);

                span {
                    font-weight: 600;
                    color: #171C26;
                }
            }
        }
    }
}

.leaflet-container {
    .leaflet-popup-content {
        width: 208px !important;
    }

    .leaflet-popup-content {
        margin: 16px;
    }

    .leaflet-popup-content-wrapper,
    .leaflet-popup-tip {
        box-shadow: 0 3px 15px 3px rgba(variables.$grey, 0.21);
    }

    .leaflet-popup {
        a {
            &.leaflet-popup-close-button {
                background-color: #626262;
                color: #fff;
                border-radius: 0 6px 0 4px;
                border: 1px solid transparent;

                &:hover,
                &:focus {
                    border-color: #626262;
                    background-color: transparent;

                }
            }
        }
    }

    .leaflet-div-icon {
        border: 2px solid #333;
        background-color: #f9f9f9;
        width: 15px !important;
        height: 15px !important;
        border-radius: 100%;
    }

    .leaflet-draw-guide-dash {
        background-color: #777 !important;
        border-radius: 100%;
    }

    .leaflet-image-layer.leaflet-interactive,
    .leaflet-marker-icon.leaflet-interactive,
    .leaflet-pane>svg path.leaflet-interactive,
    svg.leaflet-image-layer.leaflet-interactive path {
        stroke: var(--primary-color);
        fill: var(--primary-color);
        stroke-width: 2px;
    }

    .leaflet-marker-pane img,
    .leaflet-shadow-pane img,
    .leaflet-tile,
    .leaflet-tile-pane img,
    img.leaflet-image-layer {
        object-fit: contain;
    }
}

.language-list {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    overflow: auto;

    &.accept-bid {
        margin-bottom: 24px;

        .nav-item {
            .nav-link {
                i {
                    &.danger {
                        display: none;
                        margin-left: unset;
                    }
                }
            }
        }
    }

    &::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 6px #e8ebf2;
    }

    &::-webkit-scrollbar {
        height: 6px;
    }

    &::-webkit-scrollbar-thumb {
        background-color: rgba(95, 87, 234, 0.1);
    }

    li {
        a {
            padding: 8px;
            background-color: rgba(237, 239, 241, 0.4);
            border: 1px solid #eee;
            border-radius: 5px;
            color: #777;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 16px;

            &.active {
                background-color: var(--primary-color);
                color: #fff;
                border-color: transparent;

                i {
                    color: #fff;
                }
            }

            i {
                margin-left: 10px;
                vertical-align: -4px;
                position: relative;
                inset: unset;
            }
        }
    }
}

.driver-location-box {
    font-family: Inter, sans-serif;

    .vehicle-image {
        padding: 17px 17px 0;
        width: 100%;
        height: 129px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 0;

        &:before {
            border-radius: 8px;
            background-color: #eeeeee8c;
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 85px;
            z-index: -1;
        }

        img {
            width: 100% !important;
            height: 100% !important;
            object-fit: contain;
        }
    }

    h5 {
        font-size: 16px;
        line-height: 1.3;
        color: rgba(variables.$dark-color, 0.6);
        margin-block: 16px 0;

        span {
            font-weight: 500;
            color: #171C26;
        }
    }

    .location-list {
        gap: 0;
        margin-top: 10px;

        li {
            padding: 0;
            font-weight: 500;
            color: rgba(variables.$dark-color, 0.6);

            &.rate-box {
                background-color: transparent;
                margin: 0;
                width: 100%;

                span {
                    padding: 4px 6px;
                    inset: unset;
                    transform: unset;
                    font-size: 12px;
                    border-radius: 4px;
                    color: #ffffff;
                    background-color: #ffb900;
                    font-weight: 600;
                }
            }

            +li {
                padding-top: 5px;
                margin-top: 5px;
            }

            span {
                color: rgba(variables.$dark-color, 1);
            }
        }
    }
}

.map-section {
    .contentbox {
        overflow: hidden;

        .inside {
            .contentbox-title {
                margin-bottom: 0;
                border-bottom: 0;
            }

            #map {
                width: 100%;
                height: calc(100vh - 70px - 65px - 126px);
                position: relative;
                color: #007bff;
                overflow: hidden;
            }
        }
    }
    .gm-style{
    height: calc(100vh - 194px) !important;
  }
}

.google-map-container {
    height: 300px;
    width: 100%;
    position: relative;
    border-radius: 8px;
    border: 1px solid #ccc;
    overflow: hidden;
}

.map-search-box {
    position: absolute;
    top: 12px;
    right: 74px;
    width: 260px;
    height: 38px;
    z-index: 5;
    box-shadow: 2px 3px 5px rgb(0 0 0 / 10%);
    border-radius: 0;

    &~i {
        right: 86px;
        z-index: 6;
        top: 18px;
    }

    @media (max-width:630px) {
        display: none;
    }
}


.map-toggle-btn {
    padding: 8px 12px;
    margin: 0px;
    border: none;
    cursor: pointer;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.15s ease-in-out;
    background-color: var(--primary-color);
    border: 1px solid transparent;

    &:hover {
        color: var(--primary-color);
        border-color: var(--primary-color);
        background-color: #fff;
    }
}
.gm-style{
    .transit-container {
        div{
            color: #333;
        }
    }
}
/*=====================
 map css end
==========================*/
