
/* ------------------------------------------------------------------
   Sidebar cleanup (2026-10-22)
   Overrides the competing drawer rules in styles.css / above so that
   all menu items fit, nothing clips, and icons line up.
   ------------------------------------------------------------------ */

.logged-in .demo-drawer {
    display: flex !important;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* Cover image: starts at the very top (no empty block above it) */
.logged-in .demo-drawer .demo-drawer-header {
    display: block !important;
    flex: 0 0 auto;
    height: 130px !important;
    margin-top: 0 !important;
    padding: 0 !important;
    background-position: center !important;
    background-size: cover !important;
    border-bottom: none !important;
}

/* Avatar centred over the lower edge of the cover */
.logged-in .demo-drawer .demo-avatar {
    flex: 0 0 auto;
    height: auto;
    display: flex;
    justify-content: center;
    margin-top: -44px;
    position: relative;
}

.logged-in .demo-drawer .demo-avatar img {
    width: 80px;
    height: 80px;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 50% !important;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.logged-in .demo-drawer .demo-avatar-dropdown {
    flex: 0 0 auto;
    justify-content: center;
    margin: 0 !important;
    padding: 10px 16px 6px !important;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logged-in .demo-drawer .demo-avatar-dropdown span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu */
.logged-in .demo-drawer nav.demo-navigation {
    flex: 1 0 auto;
    height: auto !important;
    padding: 6px 10px 16px !important;
}

.logged-in .demo-drawer nav.demo-navigation > nav.demo-navigation,
.logged-in .demo-drawer nav.demo-navigation ul {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}

.logged-in .demo-drawer .menu-item {
    position: relative;
    height: auto !important;
    margin: 1px 0 !important;
    border-left: 4px solid transparent;
    border-radius: 0 8px 8px 0 !important;
    transition: background-color 0.2s, border-color 0.2s;
}

.logged-in .demo-drawer .menu-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.logged-in .demo-drawer .menu-item > a {
    display: block !important;
    padding: 10px 12px 10px 52px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 20px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: none !important;
}

.logged-in .demo-drawer .current-menu-item > a {
    color: #ab0000;
}

.logged-in .demo-drawer .current-menu-item {
    background-color: rgba(171, 0, 0, 0.06) !important;
}

/* Icons: same size for Font Awesome and Material Icons, vertically centred */
.logged-in .demo-drawer .menu-item:before {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    margin-top: 0 !important;
    transform: translateY(-50%);
    width: 24px;
    font-size: 22px !important;
    line-height: 1 !important;
    text-align: center;
    pointer-events: none;
}

/* Icon colour follows the label; an old theme hover rule turned it white */
.logged-in .demo-drawer .menu-item:before,
.logged-in .demo-drawer .menu-item:hover:before {
    color: #222 !important;
}

.logged-in .demo-drawer .current-menu-item:before,
.logged-in .demo-drawer .current-menu-item:hover:before {
    color: #ab0000 !important;
}

/* Short screens: tighten spacing so everything still fits */
@media screen and (max-height: 760px) {
    .logged-in .demo-drawer .demo-drawer-header {
        height: 100px !important;
    }
    .logged-in .demo-drawer .demo-avatar img {
        width: 64px;
        height: 64px;
    }
    .logged-in .demo-drawer .demo-avatar {
        margin-top: -36px;
    }
    .logged-in .demo-drawer .menu-item > a {
        padding-top: 7px !important;
        padding-bottom: 7px !important;
    }
}

/* Readable background: the glass sheet was ~6% opaque, so text vanished over dark content */
.logged-in .demo-drawer {
    background-color: rgba(246, 247, 251, 0.88) !important;
    background-image: none !important;
}

@media screen and (max-width: 1024px) {
    .logged-in .mdl-layout__drawer.is-visible {
        background-color: rgba(246, 247, 251, 0.97) !important;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
    }
}

/* Header logo: the link text "WAM" was painted in white over the logo image */
a.logo_home {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-indent: -9999px;
    overflow: hidden;
}

/* Logged-in header: logo closer to the sidebar (was an 80px gap) */
.logged-in a.logo_home {
    margin-left: 24px !important;
}

/* Header search: was white text on a white navbar and a 100vw-wide form running off-screen.
   Now a visible field placed between the logo and the header icons. */
.logged-in #searchform {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
    left: 150px !important;
    right: 170px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    z-index: 1;
}

.logged-in #searchform .input-search {
    width: 100% !important;
    max-width: 560px;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 16px 0 42px !important;
    box-sizing: border-box;
    background-color: #f1f2f6 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 14px center !important;
    border: 1px solid transparent !important;
    border-radius: 20px !important;
    color: #222 !important;
    font-size: 16px !important;
    text-align: left !important;
    outline: none;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.logged-in #searchform .input-search::placeholder {
    color: #777 !important;
    opacity: 1;
}

.logged-in #searchform .input-search:focus {
    background-color: #fff !important;
    border-color: #d40408 !important;
    box-shadow: 0 0 0 3px rgba(212, 4, 8, 0.12);
}

@media screen and (max-width: 1024px) {
    .logged-in #searchform {
        left: 72px !important;
        right: 150px !important;
    }
    .logged-in #searchform .input-search {
        height: 38px !important;
        font-size: 15px !important;
    }
}

/* Header icon buttons (chat / info): white icons on the white navbar were invisible */
.logged-in .mdl-layout__header .chatbutton {
    background-color: transparent !important;
    border-radius: 50% !important;
    transition: background-color 0.2s;
}

.logged-in .mdl-layout__header .chatbutton .material-icons {
    color: #555 !important;
}

.logged-in .mdl-layout__header .chatbutton:hover {
    background-color: #f1f2f6 !important;
}

.logged-in .mdl-layout__header .chatbutton:hover .material-icons {
    color: #d40408 !important;
}

.logged-in .mdl-layout__header .chatbutton .material-icons {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    line-height: 1 !important;
}

/* Mobile menu (hamburger) button: icon sat in the top-left corner of its 48px button.
   Only below 1025px - on desktop the sidebar is always visible and the button stays hidden. */
@media screen and (max-width: 1024px) {
    .mdl-layout__header .mdl-layout__drawer-button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 50% !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        transform: translateY(-50%);
        border-radius: 50%;
    }

    .mdl-layout__header .mdl-layout__drawer-button .material-icons {
        margin: 0 !important;
        line-height: 1 !important;
    }
}

@media screen and (min-width: 1025px) {
    .mdl-layout--fixed-drawer > .mdl-layout__header .mdl-layout__drawer-button {
        display: none !important;
    }
}
