/* App Container Styles */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* Hide scrollbars for an app-like feel */
    scrollbar-width: none;
    touch-action: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* We want the app container to fill the screen under the navbar */
.onibus-app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    position: relative;
    background-color: #f8f9fa;
    overflow: hidden;
    touch-action: none;
}

@media (max-width: 991px) {
    .onibus-app-container {
        /* full dynamic height to fix navbar gap */
        height: 100dvh;
    }
}

.app-header {
    background: #ffffff;
    z-index: 1000;
    position: relative;
}

.map-area {
    flex-grow: 1;
    z-index: 1;
}

/* Bottom Sheet */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background: #fff;
    border-radius: 28px 28px 0 0;
    z-index: 1001;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.bottom-sheet.open {
    transform: translateY(0) !important;
}

.bottom-sheet.collapsed {
    /* Hides the content and only shows the custom header (~58px) */
    transform: translateY(calc(100% - 58px)) !important;
}

.sheet-handle {
    width: 45px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 14px auto 8px auto;
    cursor: pointer;
}

/* Custom Bus Stop Marker */
.bus-stop-marker {
    background-color: #113260;
    border: 3px solid #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.bus-stop-marker.nearest {
    background-color: #198754;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(25, 135, 84, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

/* Schedules Badge */
.schedule-badge {
    font-size: 1.05rem;
    padding: 0.6rem 1.2rem;
    background-color: #f1f3f5;
    color: #495057;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid #e9ecef;
}

/* Bus Entrance Animation */
#bus-animation-container {
    position: fixed;
    top: 50%;
    left: -250px;
    transform: translateY(-50%);
    z-index: 9999;
    pointer-events: none;
}

.animate-bus {
    animation: driveBus 3.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

#animated-bus {
    width: 220px;
    height: auto;
    filter: drop-shadow(0px 10px 15px rgba(0, 0, 0, 0.3));
}

@keyframes driveBus {
    0% {
        left: -250px;
        transform: translate(0, -50%) scale(0.9);
    }

    30% {
        left: 50%;
        transform: translate(-50%, -50%) scale(1.1);
    }

    60% {
        left: 50%;
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        left: 100vw;
        transform: translate(0, -50%) scale(0.9);
    }
}

/* Theme Colors */
.text-theme-blue {
    color: #113260 !important;
}

.bg-theme-blue {
    background-color: #113260 !important;
}

.btn-theme-blue {
    background-color: #113260 !important;
    border-color: #113260 !important;
    color: #ffffff !important;
}

.btn-theme-blue:hover {
    background-color: #0b2244 !important;
    border-color: #0b2244 !important;
    color: #ffffff !important;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: #113260 !important;
    color: #ffffff !important;
}

.nav-pills .nav-link {
    color: #113260;
}