/* css/saferoute.css */

body {
    margin: 0;
    overflow: hidden;
    background-color: #f0f9ff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.map-wrapper {
    position: relative;
    height: 100vh;
    width: 100vw;
}

/* Map Base Layer */
#routeMap {
    height: 100%;
    width: 100%;
    z-index: 1;
    /* Piche rahega */
}

/* Floating Header */
.map-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px;
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
    pointer-events: auto;
    max-width: 600px;
    margin: 0 auto;
}

.header-content h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #1e293b;
}

.icon-circle {
    width: 35px;
    height: 35px;
    background: #e0f2fe;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2563eb;
}

/* Floating Search Box */
.search-container {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
    z-index: 1001;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.input-wrapper i {
    margin-right: 10px;
    font-size: 1rem;
}

.source-icon {
    color: #2563eb;
}

.dest-icon {
    color: #ef4444;
}

.input-wrapper input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    color: #1e293b;
}

.route-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: 0.2s;
}

.route-btn:active {
    transform: scale(0.98);
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 260px;
    /* Search box ke niche */
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    transition: opacity 0.3s;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Floating Bottom Nav */
.bottom-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 560px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 10px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-item.active {
    color: #2563eb;
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

/* Custom Marker Styling */
.user-marker-pulse {
    background-color: #2563eb;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 rgba(37, 99, 235, 0.4);
    animation: pulse-ring 1.5s infinite;
}

/* ========================================= */
/* 💻 DESKTOP RESPONSIVENESS (CARD LAYOUT) 💻*/
/* ========================================= */
@media (min-width: 768px) {
    body {
        background-color: #e2e8f0;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .map-wrapper {
        max-width: 900px;
        height: calc(100vh - 80px);
        margin: auto;
        border-radius: 25px;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .header-content {
        max-width: calc(100% - 60px);
        margin: 20px auto 0;
    }

    .bottom-nav {
        max-width: 450px;
        bottom: 30px;
    }
}

/* Custom Selection UI */
.input-wrapper {
    cursor: pointer;
    /* Pointer dikhayega ki ye clickable hai */
    transition: all 0.3s ease;
}

/* Jab koi box select hoga, toh uspar blue border aur glow aayega */
.input-wrapper.active-selection {
    border: 2px solid #2563eb;
    background: #e0f2fe;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.input-wrapper input {
    cursor: pointer;
}

/* Leaflet Routing Machine ke instruction box ko hatane ke liye */
.leaflet-routing-container {
    display: none !important;
}