/* =========================================================
   RITHCABS
   LOCATION MAP
   assets/css/location-map.css
   ========================================================= */


/* =========================================================
   BODY
   ========================================================= */

body.location-map-open {
    overflow: hidden;
}


/* =========================================================
   LOCATION INPUT
   ========================================================= */

.booking-location-field {
    position: relative;
}


.booking-location-field .booking-input-wrap {
    position: relative;
}


/* =========================================================
   MAP BUTTON
   ========================================================= */

.location-map-btn {
    position: absolute;

    top: 50%;
    right: 8px;

    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    color: #06283D;

    background: #FFF5D9;

    border: 1px solid rgba(255, 184, 0, 0.35);

    border-radius: 9px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;

    z-index: 4;
}


.location-map-btn:hover {
    color: #06283D;
    background: #FFB800;
    border-color: #FFB800;
}


.location-map-btn:active {
    transform:
        translateY(-50%) scale(0.96);
}


.location-map-btn i {
    font-size: 15px;
    line-height: 1;
}


/* =========================================================
   INPUT SPACE FOR MAP BUTTON
   ========================================================= */

.booking-location-field .booking-input-wrap input {
    padding-right: 48px;
}


/* =========================================================
   MAP MODAL OVERLAY
   ========================================================= */

.location-map-modal {
    position: fixed;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(2, 20, 33, 0.72);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;

    z-index: 99999;
}


.location-map-modal.active {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   MAP DIALOG
   ========================================================= */

.location-map-dialog {
    width: min(920px, 100%);

    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    background: #FFFFFF;

    border: 1px solid #E6EDF3;

    border-radius: 20px;

    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.28);

    overflow: hidden;

    transform:
        translateY(16px) scale(0.985);

    transition:
        transform 0.22s ease;
}


.location-map-modal.active .location-map-dialog {
    transform:
        translateY(0) scale(1);
}


/* =========================================================
   HEADER
   ========================================================= */

.location-map-header {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 16px 20px;

    background: #FFFFFF;

    border-bottom: 1px solid #E6EDF3;
}


/* =========================================================
   HEADER TITLE
   ========================================================= */

.location-map-title-wrap {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 13px;
}


.location-map-title-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #06283D;

    background: #FFF5D9;

    border: 1px solid rgba(255, 184, 0, 0.35);

    border-radius: 12px;
}


.location-map-title-icon i {
    font-size: 20px;
}


.location-map-title-content {
    min-width: 0;
}


.location-map-title-content small {
    display: block;

    margin-bottom: 3px;

    color: #61798C;

    font-family: "Inter", sans-serif;
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.09em;

    text-transform: uppercase;
}


.location-map-title-content h3 {
    margin: 0;

    color: #06283D;

    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 800;

    line-height: 1.25;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.location-map-close {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #61798C;

    background: #F6F8FA;

    border: 1px solid #E6EDF3;

    border-radius: 11px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


.location-map-close:hover {
    color: #06283D;

    background: #FFF5D9;

    border-color: #FFB800;
}


.location-map-close i {
    font-size: 20px;
}


/* =========================================================
   MAP TOOLBAR
   ========================================================= */

.location-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 12px 20px;

    background: #F8FAFC;

    border-bottom: 1px solid #E6EDF3;
}


/* =========================================================
   HELP TEXT
   ========================================================= */

.location-map-help {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 8px;

    color: #61798C;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
}


.location-map-help i {
    flex: 0 0 auto;

    color: #FFB800;

    font-size: 15px;
}


/* =========================================================
   CURRENT LOCATION
   ========================================================= */

.location-map-current {
    min-height: 38px;

    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 14px;

    color: #06283D;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 700;

    background: #FFFFFF;

    border: 1px solid #D8E1E8;

    border-radius: 10px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.location-map-current:hover {
    background: #FFF5D9;

    border-color: #FFB800;
}


.location-map-current i {
    color: #FFB800;

    font-size: 15px;
}


.location-map-current:disabled {
    opacity: 0.65;

    cursor: wait;
}


/* =========================================================
   CURRENT LOCATION LOADING
   ========================================================= */

.location-map-current.loading i {
    animation:
        rithcabsLocationSpin 0.8s linear infinite;
}


@keyframes rithcabsLocationSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   MAP AREA
   ========================================================= */

.location-map-body {
    position: relative;

    background: #EEF3F7;
}


#rithcabsLocationMap {
    width: 100%;
    height: 440px;

    background: #EEF3F7;
}


/* =========================================================
   LEAFLET
   ========================================================= */

#rithcabsLocationMap .leaflet-container {
    font-family: "Inter", sans-serif;
}


#rithcabsLocationMap .leaflet-control-zoom {
    overflow: hidden;

    border: 0;

    border-radius: 10px;

    box-shadow:
        0 5px 18px rgba(6, 40, 61, 0.16);
}


#rithcabsLocationMap .leaflet-control-zoom a {
    color: #06283D;

    border-bottom-color: #E6EDF3;
}


#rithcabsLocationMap .leaflet-control-zoom a:hover {
    background: #FFF5D9;
}


#rithcabsLocationMap .leaflet-control-attribution {
    font-family: "Inter", sans-serif;
    font-size: 9px;
}


/* =========================================================
   CENTER GUIDE
   ========================================================= */

.location-map-center-guide {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 44px;
    height: 44px;

    display: none;

    align-items: center;
    justify-content: center;

    color: #FFB800;

    font-size: 32px;

    transform:
        translate(-50%, -100%);

    pointer-events: none;

    z-index: 500;
}


/* =========================================================
   SELECTED LOCATION
   ========================================================= */

.location-map-selected {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 15px 20px;

    background: #FFFFFF;

    border-top: 1px solid #E6EDF3;
}


/* =========================================================
   SELECTED ICON
   ========================================================= */

.location-map-selected-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #06283D;

    background: #FFF5D9;

    border-radius: 10px;
}


.location-map-selected-icon i {
    color: #FFB800;

    font-size: 18px;
}


/* =========================================================
   SELECTED CONTENT
   ========================================================= */

.location-map-selected-content {
    min-width: 0;

    flex: 1;
}


.location-map-selected-content small {
    display: block;

    margin-bottom: 3px;

    color: #61798C;

    font-family: "Inter", sans-serif;
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


.location-map-selected-content p {
    margin: 0;

    color: #06283D;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;

    line-height: 1.5;

    overflow-wrap: anywhere;
}


.location-map-selected-content p.is-placeholder {
    color: #8294A3;

    font-weight: 500;
}


/* =========================================================
   FOOTER
   ========================================================= */

.location-map-footer {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    padding: 14px 20px;

    background: #F8FAFC;

    border-top: 1px solid #E6EDF3;
}


/* =========================================================
   CANCEL
   ========================================================= */

.location-map-cancel {
    min-width: 105px;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 17px;

    color: #61798C;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 700;

    background: #FFFFFF;

    border: 1px solid #D8E1E8;

    border-radius: 10px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}


.location-map-cancel:hover {
    color: #06283D;

    background: #F1F5F8;

    border-color: #BCCAD4;
}


/* =========================================================
   CONFIRM
   ========================================================= */

.location-map-confirm {
    min-width: 165px;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 9px 18px;

    color: #06283D;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 800;

    background: #FFB800;

    border: 1px solid #FFB800;

    border-radius: 10px;

    cursor: pointer;

    box-shadow:
        0 7px 16px rgba(255, 184, 0, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


.location-map-confirm:hover {
    background: #FFC329;

    box-shadow:
        0 9px 20px rgba(255, 184, 0, 0.28);

    transform: translateY(-1px);
}


.location-map-confirm:active {
    transform: translateY(0);
}


.location-map-confirm i {
    font-size: 15px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991.98px) {

    .location-map-modal {
        padding: 18px;
    }


    .location-map-dialog {
        max-height:
            calc(100vh - 36px);
    }


    #rithcabsLocationMap {
        height: 400px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .location-map-modal {
        align-items: flex-end;

        padding: 0;
    }


    .location-map-dialog {
        width: 100%;

        max-height: 94vh;

        border-radius:
            20px 20px 0 0;

        transform:
            translateY(30px);
    }


    .location-map-modal.active .location-map-dialog {
        transform:
            translateY(0);
    }


    .location-map-header {
        min-height: 68px;

        padding:
            13px 15px;
    }


    .location-map-title-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }


    .location-map-title-content h3 {
        font-size: 16px;
    }


    .location-map-toolbar {
        align-items: stretch;

        flex-direction: column;

        gap: 10px;

        padding:
            10px 15px;
    }


    .location-map-current {
        width: 100%;
    }


    #rithcabsLocationMap {
        height: 360px;
    }


    .location-map-selected {
        padding:
            13px 15px;
    }


    .location-map-footer {
        padding:
            12px 15px;
    }


    .location-map-cancel,
    .location-map-confirm {
        min-width: 0;

        flex: 1;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    #rithcabsLocationMap {
        height: 320px;
    }


    .location-map-title-content small {
        display: none;
    }


    .location-map-selected-content p {
        font-size: 12px;
    }


    .location-map-footer {
        gap: 8px;
    }


    .location-map-cancel,
    .location-map-confirm {
        min-height: 44px;

        padding:
            9px 10px;

        font-size: 12px;
    }

}


/* =========================================================
   MAP LOCATION SEARCH / AUTOCOMPLETE
   ========================================================= */

.location-map-search-wrap {
    position: relative;
    z-index: 1200;

    padding: 14px 20px 0;

    background: #FFFFFF;
}

.location-map-search-box {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
}

.location-map-search-box>i {
    position: absolute;

    left: 15px;
    top: 50%;

    color: #FFB800;

    font-size: 16px;

    transform: translateY(-50%);

    pointer-events: none;

    z-index: 2;
}

.location-map-search-box input {
    width: 100%;
    height: 46px;

    padding: 0 46px 0 43px;

    color: #06283D;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;

    background: #F8FAFC;

    border: 1px solid #D8E1E8;
    border-radius: 11px;

    outline: none;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.location-map-search-box input::placeholder {
    color: #8294A3;

    font-weight: 500;
}

.location-map-search-box input:focus {
    background: #FFFFFF;

    border-color: #FFB800;

    box-shadow:
        0 0 0 3px rgba(255, 184, 0, 0.13);
}

.location-map-search-clear {
    position: absolute;

    top: 50%;
    right: 8px;

    width: 32px;
    height: 32px;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #61798C;

    background: transparent;

    border: 0;
    border-radius: 8px;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.location-map-search-clear.visible {
    display: inline-flex;
}

.location-map-search-clear:hover {
    color: #06283D;

    background: #FFF5D9;
}

.location-map-search-clear i {
    font-size: 14px;
    line-height: 1;
}

.location-map-search-results {
    position: absolute;

    top: calc(100% + 6px);
    left: 20px;
    right: 20px;

    display: none;

    max-height: 260px;

    overflow-y: auto;

    background: #FFFFFF;

    border: 1px solid #D8E1E8;
    border-radius: 12px;

    box-shadow:
        0 14px 35px rgba(6, 40, 61, 0.18);

    z-index: 1300;
}

.location-map-search-results.active {
    display: block;
}

.location-map-search-item {
    width: 100%;

    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 11px 13px;

    color: #06283D;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;

    line-height: 1.45;

    text-align: left;

    background: #FFFFFF;

    border: 0;
    border-bottom: 1px solid #EDF1F4;

    cursor: pointer;

    transition:
        background-color 0.18s ease;
}

.location-map-search-item:last-child {
    border-bottom: 0;
}

.location-map-search-item:hover {
    background: #FFF9E8;
}

.location-map-search-item i {
    flex: 0 0 auto;

    margin-top: 2px;

    color: #FFB800;

    font-size: 15px;
}

.location-map-search-item span {
    min-width: 0;

    flex: 1;
}

.location-map-search-message {
    padding: 13px 14px;

    color: #61798C;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;

    line-height: 1.45;

    text-align: center;
}


/* =========================================================
   MAP SEARCH - MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .location-map-search-wrap {
        padding:
            12px 15px 0;
    }

    .location-map-search-box input {
        height: 44px;

        font-size: 13px;
    }

    .location-map-search-results {
        left: 15px;
        right: 15px;

        max-height: 220px;
    }

}


@media (max-width: 480px) {

    .location-map-search-item {
        padding:
            10px 12px;

        font-size: 11.5px;
    }

    .location-map-search-message {
        font-size: 11.5px;
    }

}


/* =========================================================
   MAP MODAL HEIGHT FIX
   Keep Selected Location + Confirm Location visible
   ========================================================= */

.location-map-dialog {
    height: calc(100vh - 48px);
    max-height: 820px;
}

.location-map-header,
.location-map-search-wrap,
.location-map-toolbar,
.location-map-selected,
.location-map-footer {
    flex-shrink: 0;
}

.location-map-body {
    min-height: 0;
    flex: 1 1 auto;
}

#rithcabsLocationMap {
    height: 100%;
    min-height: 260px;
}


/* =========================================================
   TABLET HEIGHT FIX
   ========================================================= */

@media (max-width: 991.98px) {

    .location-map-dialog {
        height: calc(100vh - 36px);
        max-height: none;
    }

    #rithcabsLocationMap {
        height: 100%;
        min-height: 240px;
    }

}


/* =========================================================
   MOBILE HEIGHT FIX
   ========================================================= */

@media (max-width: 767.98px) {

    .location-map-dialog {
        height: 94vh;
        max-height: 94vh;
    }

    #rithcabsLocationMap {
        height: 100%;
        min-height: 210px;
    }

}


/* =========================================================
   SMALL MOBILE HEIGHT FIX
   ========================================================= */

@media (max-width: 480px) {

    #rithcabsLocationMap {
        height: 100%;
        min-height: 180px;
    }

}