:root {
    --navbar-height: 52px;
    --nav-bar-height: 80px;
}

/* Hidden by default — chatbot.js sets display:flex when appropriate */
.chatbot-fab {
    display: none !important;
}

.navbar {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 6px 16px;
    border-bottom: 3px solid rgba(255,255,255,0.1);
    height: var(--navbar-height);
    min-height: var(--navbar-height);
    max-height: var(--navbar-height);
    background: #F8F6F3;
    backdrop-filter: blur(10px);
    gap: 14px;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.HPVLogo {
    /* Fit inside the navbar so it never clips under .navbar { overflow: hidden }.
       max-height tracks the navbar height so it stays correct at every breakpoint. */
    height: 40px !important;
    width: auto;
    max-width: 220px;
    max-height: calc(var(--navbar-height) - 12px);
    flex-shrink: 0;
    object-fit: contain;
}

.navbar-title {
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    font-family: 'Inter', sans-serif;
}

/* Tablets */
@media only screen and (max-width: 1024px) {
    .navbar {
        padding: 6px 14px;
    }

    .HPVLogo {
        height: 36px !important;
    }
}

@media only screen and (max-width: 768px) {
    .navbar {
        padding: 6px 12px;
        gap: 10px;
    }

    .HPVLogo {
        height: 30px !important;
    }

    .navbar-title {
        font-size: clamp(0.75rem, 3.5vw, 0.95rem);
    }
}

@media only screen and (max-width: 480px) {
    .navbar {
        padding: 5px 10px;
        gap: 8px;
    }

    .HPVLogo {
        height: 26px !important;
    }

    .navbar-title {
        font-size: 0.8rem;
    }
}

/* Portrait phones: put the title on its own full-width row below the logo (and
   chat button), and keep the ellipsis for when it's still too long for that row. */
@media (max-width: 600px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
        height: auto;
        min-height: var(--navbar-height);
        max-height: none;
        row-gap: 3px;
    }
    .navbar-title {
        order: 3;            /* after the logo + chat button → wraps to a new row */
        flex: 1 1 100%;
        width: 100%;
        text-align: left;
    }
    /* The "|" only separates logo and title when they share a row. Once the
       title wraps to its own row it's orphaned next to the logo — hide it. */
    .v-line {
        display: none;
    }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
    :root {
        --navbar-height: 40px;
    }

    .navbar {
        padding: 3px 12px;
        gap: 8px;
    }

    .HPVLogo {
        height: 24px !important;
    }

    .navbar-title {
        font-size: 0.8rem;
    }
}

