/*
 * Admin top bar, layered over the Gentelella theme in custom.min.css.
 * Markup lives in sidebar.php. 57px tall to line up with the logo strip.
 */
:root {
    /* The UQuiz site gradient (deep purple to violet), white text on top */
    --hd-bg: linear-gradient(90deg, #3D014D 0%, #5B21B6 65%, #7C3AED 100%);
    --hd-text: #FFFFFF;
    --hd-muted: rgba(255, 255, 255, .72);
    --hd-hover: rgba(255, 255, 255, .14);
    --hd-avatar: linear-gradient(135deg, #FB923C, #F04000);
    /* Drop-down menu (white card) */
    --menu-line: #ECE8F5;
    --menu-text: #2E1A47;
    --menu-muted: #7B6F93;
    --menu-hover: #F5F1FC;
    --hd-danger: #DC2626;
}

.top_nav .nav_menu {
    background: var(--hd-bg);
    border-bottom: 0;
    box-shadow: 0 2px 8px rgba(61, 1, 77, .18);
    margin-bottom: 10px;
}
.admin-header {
    display: flex;
    align-items: center;
    height: 57px;
    padding: 0 16px 0 10px;
}

/* Menu toggle */
.admin-header .nav.toggle {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}
.admin-header .toggle a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
    color: var(--hd-muted);
    transition: background-color .15s, color .15s;
}
.admin-header .toggle a em {
    font-size: 18px;
}
.admin-header .toggle a:hover,
.admin-header .toggle a:focus-visible {
    background: var(--hd-hover);
    color: var(--hd-text);
    outline: none;
}

/* Breadcrumb */
.admin-header__crumbs {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
}
.admin-header__crumb {
    color: var(--hd-muted);
}
.admin-header__sep {
    color: rgba(255, 255, 255, .45);
}
.admin-header__page {
    color: var(--hd-text);
    font-weight: 600;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User menu */
.admin-header .navbar-right {
    width: auto;
    float: none;
    margin: 0 0 0 auto;
    flex-shrink: 0;
}
.admin-header .navbar-right > li {
    float: none;
}
.admin-header a.admin-header__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    color: var(--hd-text) !important;
    transition: background-color .15s;
}
.top_nav .admin-header .nav > li > a.admin-header__user:hover,
.top_nav .admin-header .nav > li > a.admin-header__user:focus,
.top_nav .admin-header .nav .open > a.admin-header__user {
    background: var(--hd-hover);
}
.admin-header__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hd-avatar);
    color: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
    font-weight: 700;
    font-size: 14px;
}
.admin-header__who {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}
.admin-header__name {
    font-weight: 600;
    font-size: 13px;
}
.admin-header__role {
    color: var(--hd-muted);
    font-size: 11px;
}
.admin-header__caret {
    color: var(--hd-muted);
}

.top_nav .admin-header__menu {
    min-width: 230px;
    margin-top: 8px;
    padding: 6px;
    border: 1px solid var(--menu-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(46, 26, 71, .18);
}
.admin-header__menu-head {
    padding: 8px 14px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--menu-line);
}
.admin-header__menu-head strong {
    display: block;
    color: var(--menu-text);
    font-size: 13px;
}
.admin-header__menu-head span {
    color: var(--menu-muted);
    font-size: 12px;
}
.top_nav .admin-header__menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--menu-text);
}
.top_nav .admin-header__menu li a em {
    width: 16px;
    font-size: 13px;
    color: var(--menu-muted);
}
.top_nav .admin-header__menu li a:hover {
    background: var(--menu-hover);
}
.top_nav .admin-header__menu li.admin-header__logout a,
.top_nav .admin-header__menu li.admin-header__logout a em {
    color: var(--hd-danger);
}

/* Phones: keep the avatar, drop the name and section crumbs */
@media (max-width: 767px) {
    .admin-header__who,
    .admin-header__crumb,
    .admin-header__sep {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-header .toggle a,
    .admin-header a.admin-header__user {
        transition: none;
    }
}

/* The theme colours every link in the top bar; keep the user chip white */
.top_nav .admin-header .admin-header__name {
    color: var(--hd-text);
}
.top_nav .admin-header .admin-header__role,
.top_nav .admin-header .admin-header__caret {
    color: var(--hd-muted);
}
