/* General Styles */
/*hello this is test*/

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

/* Fullscreen Map */
#map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.5);
    color: black;
    font-size: 12px;
    padding: 4px;
    border-radius: 4px;
    display: none;
}


/* Tracking card with semi transparent background */
.container {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    backdrop-filter: blur(2px);
    max-width: 600px;
    background: rgba(255, 255, 255, 0.714);
    padding: 15px;
    box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 15px 15px;
    z-index: 1000;
    text-align: center;
    display: none;
}


/* Dropdown & Buttons */
button,
select {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
}

#recenter {
    background: #007bff;
    color: white;
}

#find-distance {
    background: #28a745;
    color: white;
    display: none;
}

select {
    background: #ffffff;
    border: 1px solid #ced4da;
}

/* Button Container */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.button-container button {
    flex: 1;
    max-width: 180px;
    padding: 10px 20px;
    font-size: 16px;
}

/* Bottom Floating Menu */
.bottom-menu {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 200px;
    display: flex;
    background: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    z-index: 1000;
    padding: 10px;
    justify-content: space-between;
}

.menu-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    font-size: 24px;
    /* Bigger icon size */
    position: relative;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
    /* Removes the blue highlight on tap */
    outline: none;
}

.menu-item.active {
    color: #007bff;
}

.menu-item.active::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Distance & Time Info */
#distance-time {
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
}

#last-updated {
    color: gray;
    font-size: 12px;
}

#role-selector-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
}

#role-selector-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#role-selector-btn:active {
    transform: translateY(0) scale(1);
}

.route_info {
    display: block !important;
    position: fixed;
    top: 10px;
    left: 35%;
    width: 30%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: black;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    /* Red with 50% transparency */
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    padding: 8px 0;
    /* Add padding for better visibility */
    border-radius: 12px 12px;
    margin-bottom: 5px !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    width: auto;
    padding: 2%;
    border-radius: 12px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}


.login-inp {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-btn {
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.google-login-btn {
    background-color: transparent;
    align-items: center;
    display: flex;
    width: auto;
    color: white;
    border-radius: 5px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.haAclf {
    padding-left: 40px !important;
}

.close {
    float: right;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .route_info {
        top: 1.5%;
        font-size: clamp(0.75rem, 2.5vw, 1.1rem);
        left: 28%;
        width: 40%;
    }

    .modal-content {
        width: auto;
        height: auto;
        padding: 5%;
    }

    #floating-recenter-btn {
        bottom: 10px !important;
        /* Adjusted to clear the bottom menu */
        left: 10px;
        /* Adjusted for smaller screens */
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}

@media (max-width: 516px) {
    .route_info {
        top: 1.5%;
        font-size: clamp(0.5rem, 2.5vw, 1.1rem);
        ;
        left: 28%;
        width: 40%;
    }
}

#floating-recenter-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    /* Adjust if needed to clear the bottom menu */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0078A8;
    color: #0078A8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    z-index: 1200;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#floating-recenter-btn:hover {
    background: #0078A8;
    color: #fff;
}

/* Demo Mode Styles */
.demo-banner {
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.demo-role-switcher {
    padding: 20px 10px;
}

.demo-role-switcher p {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.demo-btn {
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.demo-btn.student {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.demo-btn.driver {
    background: #fff3e0;
    color: #fb8c00;
    border: 1px solid #ffe0b2;
}

.demo-btn.admin {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.demo-btn.superadmin {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd0;
}

.d-grid {
    display: grid;
}

.gap-2 {
    gap: 0.5rem;
}