﻿.navbar {
    display: flex;
    align-items: center;
    /*    justify-content: space-between;*/
    gap: 40px;
    padding: 14px 120px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}


.navbar-logo {
    display: flex;
    align-items: center;
}

.logo-placeholder {
    width: 140px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.navbar-logo-img {
    height: 40px;
    width: auto;
}


.navbar-links {
    list-style: none;
    gap: 28px;
    margin-right: 23%;
    padding: 0;
    display: flex;
}

@media (min-width: 992px) {
    .navbar-collapse {
        display: flex;
        align-items: center;
        flex: 1;
    }

    .navbar-links {
        flex: 1;
        justify-content: center;
    }
}

.navbar-links li a {
    text-decoration: none;
    color: #1a1a1a;
    font-family: 'arial', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

    .navbar-links li a:hover {
        color: #0077c8;
    }


.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}


.btn-book-ticket:hover {
    background-color: #005fa3;
}

.btn-login {
    background-color: #fff;
    color: #1a1a1a;
    border: 1px solid #ccc;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100px;
    height: 40px;
}

    .btn-login:hover {
        background-color: #f2f2f2;
    }


/* ===== Logged-in user widget (avatar + name + dropdown), replaces .btn-login ===== */
.nav-user {
    position: relative;
}

.nav-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .nav-user-trigger:hover {
        background-color: #f2f2f2;
    }

.nav-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #0d6dbf;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
}

.nav-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 1050;
}

.nav-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

    .nav-user-menu-item:hover {
        background-color: #f2f2f2;
        color: #1a1a1a;
    }

.nav-user-menu-icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.nav-user-logout {
    color: #d64545;
}

    .nav-user-logout:hover {
        background-color: #fdeeee;
        color: #d64545;
    }


.btn-book-ticket {
    background-color: #0077c8;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 200;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'arial', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    width: 120px;
}

    .btn-book-ticket:hover {
        background-color: #005fa3;
        color:#ffffff;
    }


.bus-icon {
    width: 20px;
    height: 20px;
}


.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background-color: #13481d;
    box-shadow: 0 0 10px #124b1d;
    animation: pulse 1.5s infinite;
}

/* pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.6);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}
/* ===== nav-link-btn: makes buttons look like nav links ===== */
.navbar-links .nav-link-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: inline;
    text-decoration: none;
    color: #1a1a1a;
    font-family: 'arial', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

    .navbar-links .nav-link-btn:hover {
        color: #0077c8;
    }

@media (max-width: 991.98px) {
    .navbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 20px;
    }

    /* Links collapse into the hamburger and wrap onto their own row when open.
       navbar-left (toggler + logo) and navbar-actions (Book Ticket + Login)
       are separate flex items, so they always stay on the top row. */
    .navbar-collapse {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .navbar-links {
        flex-wrap: wrap;
        gap: 14px;
        justify-content: center;
    }

    /* Logo + toggler shrink here too, in step with the buttons below —
       otherwise they hog space and push the buttons onto their own line. */
    .navbar-left {
        gap: 8px;
    }

    .logo-placeholder {
        width: 120px;
        height: 32px;
    }

    .navbar-toggler {
        padding: 4px 8px;
        font-size: 1rem;
    }

    /* Book Ticket + Login must always stay on one line — shrink them instead
       of letting them wrap or overflow. */
    .navbar-actions {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .btn-book-ticket,
    .btn-login {
        width: auto;
        padding: 8px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .bus-icon {
        width: 16px;
        height: 16px;
    }

    .nav-user-avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 12px;
    }

    .nav-user-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px;
        gap: 8px;
    }

    .navbar-left {
        gap: 6px;
    }

    .logo-placeholder {
        width: 95px;
        height: 26px;
    }

    .navbar-toggler {
        padding: 2px 5px;
        font-size: 0.75rem;
    }

    .live-dot {
        display: none;
    }

    .navbar-actions {
        gap: 6px;
    }

    .btn-book-ticket,
    .btn-login {
        padding: 7px 8px;
        font-size: 11px;
    }

    .nav-user-name {
        display: none;
    }
}
