/* Live Tracking Page Styles */
.live-tracking-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.tracking-map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Connection Status Bar */
.connection-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.connection-status-bar.fade-in-out {
    animation: statusBarFadeIn 0.3s ease-out;
}

.status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
    text-align: center;
}

.status-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.status-text {
    flex-shrink: 0;
}

.bus-count {
    font-weight: 500;
    opacity: 0.9;
    flex-shrink: 0;
}

/* Connection Status States */
.status-initializing {
    background-color: rgba(108, 117, 125, 0.95);
    color: white;
}

.status-connecting {
    background-color: rgba(255, 193, 7, 0.95);
    color: #333;
}

.status-connected {
    background-color: rgba(40, 167, 69, 0.95);
    color: white;
}

.status-reconnecting {
    background-color: rgba(255, 152, 0, 0.95);
    color: white;
}

.status-disconnected {
    background-color: rgba(220, 53, 69, 0.95);
    color: white;
}

.status-failed {
    background-color: rgba(178, 34, 52, 0.95);
    color: white;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 1000;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.loading-overlay p {
    margin-top: 15px;
    color: #333;
    font-weight: 500;
}

/* Refresh button */
.refresh-button-container {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    width: calc(100% - 50px);
    max-width: 500px;
}

.refresh-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.refresh-btn i {
    font-size: 20px;
}

/* Close button */
.close-button-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    width: calc(100% - 50px);
    max-width: 500px;
}

.close-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Status message */
.status-message {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 900;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    max-width: 80%;
    text-align: center;
    transition: opacity 0.5s ease-out;
}

.status-message.error {
    background: rgba(220, 53, 69, 0.95);
    color: white;
}

/* Fade in/out animation */
.fade-in-out {
    animation: fadeInOut 3s ease-in-out;
}

/* Status bar specific animation (no horizontal transform) */
@keyframes statusBarFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Material Icons styling */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Bus marker overlay styles for smooth rendering */
.bus-marker-overlay {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.bus-marker-overlay img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .refresh-button-container,
    .close-button-container {
        width: calc(100% - 30px);
    }

    .refresh-btn,
    .close-btn {
        padding: 12px 16px;
        font-size: 16px;
    }

    .status-message {
        max-width: 90%;
        font-size: 13px;
        padding: 10px 20px;
    }
}

@media (min-width: 769px) {
    .refresh-button-container {
        bottom: 140px;
    }

    .close-button-container {
        bottom: 60px;
    }
}

/* Animation for buttons */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.refresh-button-container,
.close-button-container {
    animation: slideUp 0.3s ease-out;
}
