@import url(colors.css);

/* Shared by every screen: the logo with 14px above and below it, the links
   level with it (their underline hangs a little lower). */
:root {
    --navbar-height: 64px; /* design px — use inside zoomed UI */
    --navbar-height-visual: calc(var(--navbar-height) * var(--ui-scale));
}

/* logo.svg is 260 × 44 */
.logo {
    display: block;
    height: 36px;
}

.navbar {
    display: flex;
    gap: 20px;
    padding: 14px 24px 0 20px;
    height: var(--navbar-height);
    align-items: flex-start;
    justify-content: space-between;
    zoom: var(--ui-scale);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #000;
    transform: translateY(0);
    transition: transform 0.3s ease, background-color 0.2s ease;
    will-change: transform;
}

/* Over the cover the navbar is see-through, so the cover can rise into it */
.navbar.over-cover {
    background-color: transparent;
}

.navbar.curled {
    transform: translateY(-100%);
}

.button_container {
    display: flex;
    gap: 28px;
    margin-top: 7px; /* centres the words on the logo */
    width: fit-content;
}

.link_container_navbar {
    width: fit-content;
}

.link_title_navbar {
    position: relative;
    z-index: 1;
    margin: 0 3px 0 4px;
    font-size: 24px;
    font-weight: 400;
    line-height: normal;
    width: fit-content;
}

.link_underline_navbar {
    top: -13px; /* move up to overlap previous */
    z-index: 2; /* make sure it’s on top */
    height: 31px;
    position: relative;
    width: auto;

    background: linear-gradient(
        to bottom,
        rgba(var(--rgb), 0) 0%,
        rgba(var(--rgb), 0.5) 25%,
        rgba(var(--rgb), 1) 50%,
        rgba(var(--rgb), 0.5) 75%,
        rgba(var(--rgb), 0) 100%
    );
}


/* The same size in the navbar, the footer and "Gửi ngay" */
.navbar .link_title_navbar,
.site_footer .link_title_navbar,
.contact_send .link_title_navbar {
    font-size: 18px;
    white-space: nowrap;
}

.navbar .link_underline_navbar,
.site_footer .link_underline_navbar,
.contact_send .link_underline_navbar {
    top: -10px;
    height: 22px;
}

.navbar a {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Phones: logo and links still share one line */
@media (max-width: 480px) {
    .navbar {
        gap: 12px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .button_container {
        gap: 16px;
    }
}

/* Reader page on phones: a smaller bar with just the logo */
@media (max-width: 760px) {
    .page-reader {
        --nav-h: 56px;
    }

    .page-reader .navbar {
        zoom: 1;
        height: var(--nav-h);
        padding: 10px 16px 0;
    }

    .page-reader .logo {
        height: 36px;
    }

    .page-reader .button_container {
        display: none;
    }
}
