/* =========================================================
   KINETIC MARKET — SINGLE MAP & TURN-BY-TURN DIRECTIONS
   COMPLETE REPLACEMENT for the supplied Directions CSS.
   Keep the existing Map & Directions JavaScript enabled.
   Scoped to single businesses, websites and events.
   Native map tiles, markers, controls and routing stay intact.
   ========================================================= */

/* Only normalize the native directions inputs and buttons.
   The map and its surrounding section retain their existing design. */
body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap form {
    margin:0!important;
    padding:0!important;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap .input-group {
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    gap:0!important;
    width:100%;
    margin:0!important;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap input[type="text"] {
    box-sizing:border-box!important;
    flex:1 1 0!important;
    width:1%!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 13px!important;
    border:1px solid #d6d1c8!important;
    border-radius:6px 0 0 6px!important;
    background:#fff!important;
    color:#171717!important;
    font:inherit;
    font-size:14px!important;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap :is(button,.btn,input[type="submit"]) {
    box-sizing:border-box!important;
    display:inline-flex!important;
    flex:0 0 auto;
    align-items:center!important;
    justify-content:center!important;
    gap:7px;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 14px!important;
    border-radius:0!important;
    font:inherit;
    font-size:14px!important;
    font-weight:700!important;
    line-height:1.2!important;
    white-space:nowrap;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap .gd-directions-from-user {
    min-width:44px;
    padding:0 12px!important;
    border:1px solid #d6d1c8!important;
    background:#fff!important;
    color:#706d66!important;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap .btn-primary {
    border:1px solid #035841!important;
    border-radius:0 6px 6px 0!important;
    background:#035841!important;
    color:#FAF8F5!important;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .geodir-map-directions-wrap .btn-primary:hover {
    background:#024532!important;
}

/* Turn-by-turn panel retains its readable white surface. */
body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-results {
    padding:20px;
    border-top:1px solid #e5e5e5;
    background:#fff;
    color:#222;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-results[hidden] {display:none!important;}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-header {margin-bottom:20px;}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-header h3 {
    margin:0 0 6px;
    color:#111;
    font-size:18px;
    font-weight:700;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-header p {margin:0;color:#666;font-size:14px;}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-steps {margin:0;padding-left:24px;}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-steps li {
    padding:12px 0 12px 8px;
    border-bottom:1px solid #eee;
    color:#222;
    font-size:14px;
    line-height:1.5;
}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-steps li:last-child {border-bottom:0;}

body:is(.single-gd_place,.single-gd_website,.single-gd_event)
.geodir-post-map-wrap .km-route-steps li small {display:block;margin-top:4px;color:#777;font-size:12px;}

/* Hide Leaflet Routing Machine's duplicate built-in form. */
body:is(.single-gd_place,.single-gd_website,.single-gd_event)
#gd_map_canvas_post :is(.leaflet-routing-container,.leaflet-routing-geocoders,.leaflet-routing-geocoder,.leaflet-routing-add-waypoint) {
    display:none!important;
}

@media(max-width:600px) {
    body:is(.single-gd_place,.single-gd_website,.single-gd_event)
    .geodir-post-map-wrap .geodir-map-directions-wrap :is(button,.btn,input[type="submit"]) {
        padding-inline:10px!important;
        font-size:12px!important;
    }
}
