.title_bar {
    background-color: var(--grey100);
    height: var(--title-bar-h);
    width: 100%;
    position: fixed;
    top: 0;
    display: flex;
    /* Top padding is the notch inset, so the bar's grey extends up behind the status bar
       while its 48px of content stays below it. See --safe-top in main.css. */
    padding: var(--safe-top) 8px 0;
    box-shadow: 0 3px 6px 0 var(--shadow);
    z-index: 1000;
}
.title_bar .links-container {
    display: flex;
    margin: auto 16;
    width: 100%;
    height: 48px;
    line-height: 48px;
    max-width: 800px;
}
.links-container .link_btn {
    flex-grow: 1;
    text-align: center;
    margin: 0 4px;
}
.link_btn i {
    margin-right: 6px;
}
.link_btn {
    white-space: nowrap;
}


.links-container .selected_btn {
    background-color: var(--green200);
    color: var(--green600);
    position: relative;
    height: 54px;
    padding-top: 6px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 3px 6px 0 var(--shadow);
}

.logo {
    color: var(--grey800);
    margin: auto 0;
    line-height: 14px;
    font-size: 12px;
    font-family: 'Montserrat';
}
.title-bar-username {
    color: var(--grey800);
    margin: auto 0 auto auto;
    min-width: 120px;
    text-align: right;
    pointer-events: none;
}
.account_btn_wrapper {
    display: flex;
}
.account_btn_wrapper > i {
    pointer-events: none;
    padding: 7px 0 7px 14px;
}
.account_btn {
    pointer-events: auto;
    margin: auto 0 auto auto;
    cursor: pointer;
    color: var(--grey400);
    position: relative;
}
/* Signed out it is an <a> to /join rather than a div opening a menu, so the underline the
   browser puts on a link has to come back off. @see title_bar.php */
a.account_btn {
    text-decoration: none;
}
.account_btn:hover, .account_btn:active, .account_btn:focus {
    color: var(--green400);
    /* background-color: var(--green100); */
}
.account_btn i {
    font-size: 32px;
    margin: auto 0 auto 8px;
}

/* DROPDOWN */
.show {
    display: block;
}

.account_dropdown {
    display: none;
    flex-direction: column;
    
    position: fixed;
    right: 0;
    top: var(--title-bar-h); /* hangs off the bottom of .title_bar, inset included */
    width: 170px;
    padding: 2px 0px;
    z-index: 1001;
    
    background-color: var(--grey200);
    box-shadow: 0 3px 6px 0 var(--shadow);
    font-size: 14px;
}

.account_dropdown i {
    padding-right: 8px;
}
.account_dropdown div {
    font-size: 14px;
    margin-left: 16px;
    padding-top: 12px;
    /* text-align: center; */
    width: auto;
}
.account_dropdown a, .account_dropdown button {
    padding: 12px 16px;
    color: var(--grey900);
    font-size: 16px;
}
.account_dropdown a:hover, .account_dropdown button:hover, .account_dropdown button:active {
    background-color: var(--grey300);
}
.account_dropdown button {
    background-color: var(--grey200);
    border: none;
    text-align: left;
    border-top: 2px solid var(--grey300);
    cursor: pointer;
}

@media screen and (max-width: 600px) {
    .username {
        max-width: 181px;
        overflow: hidden;
    }
}
@media screen and (max-width: 900px) {
    .links-container {
        display: none !important;
    }
}
@media screen and (min-width: 900.1px) {
    .account_dropdown {
        width: 200px;
    }
}

@media screen and (min-width: 1024px) {

}
/* ───────────────────────── Notification bell ─────────────────────────
   Sits before .account_btn, which is pushed right by `margin: auto 0 auto auto`.
   The bell takes that auto margin instead, and the adjacent-sibling rule zeroes
   the account button's - scoped so that a page without a bell is unaffected. */

.notif_btn {
    position: relative;
    margin: auto 0 auto auto;
    padding: 0 4px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--grey400);
    line-height: 1;
}
.notif_btn + .account_btn {
    margin-left: 0;
}
.notif_btn:hover, .notif_btn:active, .notif_btn:focus {
    color: var(--green400);
}
.notif_btn i {
    font-size: 25px;
}

.notif_badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background-color: var(--red500);
    color: #fff;
    font-family: "Roboto", sans-serif;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
}

/* Shares .account_dropdown's positioning and chrome; only the sizing differs. */
.notif_dropdown {
    width: 280px;
    max-width: 92vw;
    padding: 0;
}
.notif_head {
    padding: 10px 14px;
    border-bottom: 2px solid var(--grey300);
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    color: var(--grey700);
}
.notif_list {
    max-height: 60vh;
    overflow-y: auto;
    /* Keeps a flick inside the list from carrying on into the page once the list hits its end -
       the same "the panel does not touch what is under it" rule the dismissing tap follows. */
    overscroll-behavior: contain;
}
.notif_item {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 10px 14px;
    border-bottom: 1px solid var(--grey300);
    color: var(--grey900);
    font-size: 14px;
}
.notif_item:hover {
    background-color: var(--grey300);
}
.notif_unread {
    background-color: var(--green100);
}
.notif_text {
    flex: 1;
}
.notif_when {
    color: var(--grey600);
    font-size: 12px;
    white-space: nowrap;
}
.notif_empty {
    padding: 16px 14px;
    color: var(--grey600);
    font-size: 14px;
}
