﻿/* ========================================
   FONTS
======================================== */

@font-face {
    font-family: 'Roboto';
    src: url('/webfonts/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

/* ========================================
   THEME VARIABLES
======================================== */

/* Dark Theme (Default) */
:root {
    --fa-width: auto; /* Font Awesome 7 defaults icons to a fixed 1.25em width; auto restores v5 sizing */
    --header-bg: #011A42;
    --sidebar-bg: #000000;
    --mobile-bg: #2A2A2A;
    --sidebar-text: #FFFFFF;
    --sidebar-text-hover: #FFFFFF;
    --sidebar-mobile-text: #FFFFFF;
    --sidebar-mobile-text-hover: #FFFFFF;
    --navigation-glow-colour: #DF1394;
    --heart-colour: #FF00A0;
    --page-bg: #2a2a2a;
    --text-colour: #FFFFFF;
    --tile-hover: #FFFFFF;
    --hover-text-colour: #FFFFFF;
    --accent-colour: #000000;
    --border-colour: #FFFFFF;
    --hover-colour: #DF1394;
}

/* Light Theme */
.lightmode {
    --header-bg: #011A42;
    --sidebar-bg: #000000;
    --mobile-bg: #E5F3F3;
    --sidebar-text: #FFFFFF;
    --sidebar-text-hover: #011A42;
    --sidebar-mobile-text-hover: #FFFFFF;
    --sidebar-mobile-text: #011A42;
    --navigation-glow-colour: #2DD5C4;
    --heart-colour: #FF00A0;
    --page-bg: #E5F3F3;
    --text-colour: #011A42;
    --tile-hover: #2DD5C4;
    --hover-text-colour: #FFFFFF;
    --accent-colour: #011A42;
    --border-colour: #FFFFFF;
    --hover-colour: #2DD5C4;
}

/* ========================================
   BASE / GLOBAL STYLES
======================================== */

.halo-chat-bot .chat-holder {
    z-index: 1000 !important;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    font-family: 'Roboto', Arial, sans-serif;
}

a {
    text-decoration: none;
    cursor: pointer;
}

button {
    background: none;
    border: none;
}

h2 {
    color: var(--text-colour);
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--hover-colour);
    outline-offset: 2px;
}

/* ========================================
   UTILITY CLASSES
======================================== */

.disabled {
    display: none !important;
}

.selected {
    background: var(--hover-colour);
    font-weight: 600;
}

/* ========================================
   PAGE LAYOUT
======================================== */

.app-layout {
    display: flex;
    flex: 1;
}

.main-content {
    flex: 1;
    background: var(--page-bg);
}

.ljmu-main-content-container {
    padding-top: 24px;
    padding-left: 82px;
    padding-right: 82px;
}

.ljmu-breadcrumb {
    display: none;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .ljmu-breadcrumb {
        display: block;
    }
}

.ljmu-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--text-colour);
}

.ljmu-breadcrumb-item a {
    color: var(--text-colour);
    text-decoration: underline;
}

.ljmu-breadcrumb-item a:hover {
    color: var(--hover-colour);
}

.ljmu-breadcrumb-item + .ljmu-breadcrumb-item:not([hidden])::before {
    content: "/";
    padding-right: 8px;
}

.ljmu-breadcrumb-item.active:last-child {
    font-weight: 600;
}

/* ========================================
   HEADER
======================================== */

.ljmu-header {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 80px;
    flex-shrink: 0;
    background-color: var(--header-bg);
    border-bottom: 2px solid var(--border-colour);
    color: #fff;
}

.ljmu-header__logo {
    width: 60px;
    height: 60px;
    margin-left: 1%;
}

.ljmu-header__icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.ljmu-header i {
    font-size: 32px;
}

.ljmu-user-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.header-divider {
    width: 1px;
    align-self: stretch;
    display: block;
    background: #FFFFFF;
}

#login-usericon,
#logout-usericon {
    display: none;
}

#header-usericon {
    display: block;
}

#username {
    display: block;
}

/* ========================================
   DESKTOP NAVIGATION
======================================== */

.ljmu-nav__items {
    display: flex;
    gap: 25px;
    padding-right: 15px;
}

.ljmu-nav__icon {
    display: none;
}

.ljmu-nav__toggle {
    display: none;
    color: #fff;
}

.menu-item {
    color: #fff;
}

.menu-text {
    display: none;
}

.mobile-menu-icon {
    display: none !important;
}

.login-button {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

#ljmu-nav__home-button {
    display: none;
    align-items: center;
}

#ljmu-nav__theme-button {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* ========================================
   SIDEBAR / NAVIGATION PANEL
======================================== */

.ljmu-navigation {
    width: 271px;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
}

.ljmu-navigation-title {
    display: none;
    color: var(--sidebar-text);
}

.ljmu-tilegroups-nav {
    order: 1;
}

.ljmu-favourites-nav {
    order: 2;
}

.ljmu-download-app {
    order: 3;
}

.ljmu-welcome-banner {
    display: none;
}

.ljmu-sidebar-divider {
    margin: 0 30px 0 24px;
    border-top: 1px solid var(--sidebar-text);
}

/* ========================================
   TILE GROUP NAVIGATION
======================================== */

.ljmu-groups {
    display: flex;
    flex-direction: column;
    margin-top: 23px;
}

.ljmu-group-item {
    display: flex;
    align-items: center;
    height: 48px;
    padding-left: 24px;
    color: var(--sidebar-text);
    transition: background 0.2s ease, color 0.2s ease;
}

    .ljmu-group-item.selected {
        color: var(--sidebar-text-hover);
    }

    .ljmu-group-item:hover {
        background: var(--hover-colour);
        color: var(--sidebar-text-hover);
    }

.group-main {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.group-name {
    font-size: 20px;
}

.group-description {
    display: none;
}

.group-icon {
    margin-left: auto;
    margin-right: 27px;
}

/* ========================================
   TILE GRID
======================================== */

.ljmu-tile-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    row-gap: 20px;
    column-gap: 71px;
    margin-bottom: 30px;
}

.tile-wrapper {
    position: relative;
}

/* ========================================
   TILE CARDS
======================================== */

.ljmu-card {
    position: relative;
    width: 100%;
    height: 125px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    color: var(--text-colour);
    transition: all 0.3s ease;
}

    .ljmu-card::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 8px;
        height: 4px;
        border-radius: 999px;
        background: var(--text-colour);
    }

    .ljmu-card:hover {
        border-color: var(--tile-hover);
        background: var(--accent-colour);
        color: var(--hover-text-colour);
    }

        .ljmu-card:hover::after {
            background: #fff;
            box-shadow: 0 0 8px 0 var(--navigation-glow-colour), 0 0 8px 0 var(--navigation-glow-colour), 0 0 20px 0 var(--navigation-glow-colour);
        }

        .ljmu-card:hover .tile-name {
            text-decoration: underline;
        }

        .ljmu-card:hover .tile-heart-btn {
            transform: scale(1.1);
        }

/* ========================================
   TILE CONTENT / ACCESSIBILITY
======================================== */

.ljmu-tile-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 10px;
    padding: 10px;
    color: inherit;
}

.ljmu-tile-item:hover{
    background: var(--accent-colour);
}

    .ljmu-tile-item span {
        display: block;
        max-height: 20px;
        overflow: hidden;
    }

    .tile-desc{
        font-size: 15px;
    }

    .ljmu-tile-item p {
        padding-top: 5px;
    }

    .ljmu-tile-item:focus-visible {
        border: 2px solid;
        border-color: var(--tile-hover);
        background: var(--accent-colour);
        color: var(--hover-text-colour);
    }

        .ljmu-tile-item:focus-visible .tile-name {
            text-decoration: underline;
        }

.ljmu-icon-heart {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
}

.tile-heart-btn {
    position: absolute;
    top: 3px;
    right: 10px;
    z-index: 2;
    cursor: pointer;
    font-size: 24px;
    color: var(--sidebar-text);
    -webkit-text-stroke: 1px #000;
    transition: 0.3s ease;
}

/* ========================================
   FAVOURITES
======================================== */

.favourited {
    color: var(--heart-colour);
}

#favourite-placeholder,
.ljmu-favourited-tile-wrapper,
.ljmu-favourite-title {
    padding: 5px 30px 5px 24px;
}

.ljmu-favourites {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Desktop: let favourites fill the space down to the download-app divider */
@media (min-width: 769px) {
    .ljmu-favourites-nav {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }

    .ljmu-favourites {
        flex: 1 1 0;
        min-height: 200px;
        max-height: none;
    }
}

    /* Favourites scrollbar */
    .ljmu-favourites::-webkit-scrollbar {
        width: 6px;
    }

    .ljmu-favourites::-webkit-scrollbar-track {
        background: var(--sidebar-bg);
    }

    .ljmu-favourites::-webkit-scrollbar-thumb {
        background: var(--hover-colour);
        border-radius: 6px;
    }

/* Favourite tile */
.ljmu-favourited-tile {
    width: 100%;
    justify-content: center;
    color: var(--text-colour);
}

.ljmu-favourited-tile-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 11px;
    transition: background 0.3s ease;
}

    .ljmu-favourited-tile-wrapper:hover {
        background: #3b3b3b;
    }

/* Favourite content */
.ljmu-favourites-nameicon {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--sidebar-text);
}

.ljmu-favourites-description {
    display: none;
}

.ljmu-favourites-name {
    display: block;
    width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ljmu-favourite-title {
    display: block;
    padding-top: 20px;
    font-size: 20px;
    font-weight: 600;
}

/* Favourite controls */
.favourite-heart {
    position: absolute;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
}

    .favourite-heart:hover {
        right: 23px;
        font-size: 23px;
    }

#favourite-placeholder {
    color: var(--sidebar-text);
}

.tile-sidebar-icon {
    width: 20px;
}

/* ========================================
   DOWNLOAD APP
======================================== */

.ljmu-download-app {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: auto 30px 35px 24px;
    border-top: 1px solid var(--sidebar-text);
}

.ljmu-download-app-title {
    padding-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--sidebar-text);
}

/* ========================================
   FOOTER
======================================== */

.ljmu-footer {
    display: flex;
    align-items: center;
    height: 48px;
    background: var(--header-bg);
    border-top: 2px solid #fff;
}

    .ljmu-footer span {
        color: #fff;
    }

/* ========================================
   ANIMATIONS
======================================== */

.favourites-highlight {
    animation: favouritesFlash 0.8s ease;
}

@keyframes favouritesFlash {
    0% {
        background: transparent;
    }

    50% {
        background: #3b3b3b;
    }

    100% {
        background: transparent;
    }
}

/* ========================================
   FAVOURITE TOAST (Mobile)
======================================== */

.ljmu-favourite-toast {
    position: fixed;
    left: 50%;
    bottom: 100px;
    transform: translate(-50%, 20px);
    max-width: 90%;
    padding: 20px 20px;
    background: var(--hover-colour);
    color: var(--sidebar-text-hover);
    font-size: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 2000;
}

    .ljmu-favourite-toast.show {
        opacity: 1;
        transform: translate(-50%, 0);
        visibility: visible;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
    }

/* ========================================
   MOBILE RESPONSIVE
======================================== */

@media (max-width: 768px) {

    /* ----------------------------------------
       Mobile Layout
    ---------------------------------------- */

    .selected {
        font-weight: 100;
    }

    .halo-chat-bot .chat-holder {
        display: none;
        z-index: 1000 !important;
    }

    .app-layout {
        display: flex;
    }

    .main-content {
        display: none;
    }

    .ljmu-navigation {
        width: 100%;
        min-height: 100%;
        padding: 12px 30px 12px 24px;
        background: var(--mobile-bg);
    }

    .ljmu-main-content-container {
        padding-inline: 3%;
    }

    /* ----------------------------------------
       Mobile Navigation Order
    ---------------------------------------- */

    .ljmu-tilegroups-nav {
        order: 2;
    }

    .ljmu-favourites-nav {
        order: 1;
        margin: 0;
    }

    .ljmu-download-app {
        display: none;
    }

    /* ----------------------------------------
       Mobile Header
    ---------------------------------------- */

    .ljmu-header__title {
        font-size: 28px;
    }

    .ljmu-header i {
        margin-left: 0;
        padding-right: 0;
    }

    #ljmu-nav__home-button {
        display: flex;
    }

    .ljmu-welcome-banner,
    .ljmu-navigation-title {
        display: block;
    }

    .ljmu-navigation-title {
        margin-bottom: 12px;
        color: var(--text-colour);
        font-size: 24px;
        font-weight: 600;
    }

    .header-divider {
        display: none;
    }

    .ljmu-user-info {
        width: 100%;
    }

    .desktop-icon,#username,.header-divider{
        display:none !important;
    }

    .mobile-menu-icon{
        display:block !important;
    }

    /* ----------------------------------------
       Mobile Favourites
    ---------------------------------------- */

    #favourite-placeholder {
        font-size: 16px;
        color: var(--text-colour);
    }

    .ljmu-favourite-title {
        padding-top: 0;
    }

    .ljmu-favourites {
        gap: 15px;
        max-height: 210px;
        margin: 0 0 12px;
    }

    .ljmu-favourited-tile {
        flex-direction: column;
    }

    .ljmu-favourited-tile-wrapper {
        padding-bottom: 13px;
    }

        .ljmu-favourited-tile-wrapper::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 6px;
            height: 2px;
            border-radius: 999px;
            background: #fff;
            box-shadow: 0 0 8px 0 var(--navigation-glow-colour), 0 0 8px 0 var(--navigation-glow-colour), 0 0 20px 0 var(--navigation-glow-colour);
        }

    .ljmu-favourites-nameicon {
        flex-direction: row;
        font-size: 16px;
        color: var(--sidebar-mobile-text);
    }

    .ljmu-favourites-name {
        margin-left: 10px;
        font-weight: 600;
    }

    .ljmu-favourites-description {
        display: -webkit-box;
        margin-top: 2px;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
    }

    .favourite-heart {
        top: 3px;
        right: 0;
    }

    #favourite-placeholder,
    .ljmu-favourited-tile-wrapper,
    .ljmu-favourite-title {
        padding-left: 0;
        padding-right: 0;
    }

    .favourite-heart:hover {
        right: 0px;
        font-size: 23px;
    }

    /* ----------------------------------------
       Mobile Tile Groups
    ---------------------------------------- */

    .ljmu-groups {
        gap: 24px;
        margin-bottom: 24px;
    }

    .ljmu-group-item {
        justify-content: center;
        width: 100%;
        height: 90px;
        background: var(--accent-colour);
        border: 2px solid #fff;
        border-radius: 6px;
        box-shadow: 0 0 10px 0 var(--navigation-glow-colour);
    }

        .ljmu-group-item.selected {
            color: var(--sidebar-mobile-text-hover);
        }

    .group-main {
        align-items: flex-start;
    }

    .group-name {
        font-size: 24px;
        font-weight: 700;
    }

    .group-description {
        display: block;
        font-size: 13px;
    }

    .group-icon {
        margin-right: 20px;
    }

    .ljmu-sidebar-divider {
        display: none;
    }


    /* ----------------------------------------
       Mobile Tiles
    ---------------------------------------- */

    .ljmu-tile-items {
        grid-template-columns: repeat( auto-fit, minmax(min(100%, 300px), 1fr) );
    }

    #group-name{
        font-size: 23px;
        padding-left: 10px;
        font-weight: 600;
    }

    .ljmu-card{
        height: 100%;
    }

        .ljmu-card::after {
            background: #fff;
            border-color: var(--navigation-glow-colour);
            height: 2px;
            box-shadow: 0 0 8px 0 var(--navigation-glow-colour), 0 0 8px 0 var(--navigation-glow-colour), 0 0 20px 0 var(--navigation-glow-colour);
        }

    .ljmu-tile-item {
        display: grid;
        grid-template-columns: 32px 1fr 40px;
        grid-template-areas:
            "icon title title"
            "desc desc desc"
            "line line line";
        gap: 4px 12px;
        align-items: center;
        padding: 16px;
    }

     
    .ljmu-icon-heart {
        grid-area: icon;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 24px;
    }

    .tile-name{
        font-size: 16px;
        font-weight: 600;
        align-items: center;
    }

     .tile-desc {
        font-size: 13px;
        overflow: hidden;
    }
     
    .tile-heart-btn {
        grid-area: heart;
        position: static; /* remove absolute positioning */
        justify-self: end;
        align-self: start;
        font-size: 28px;
    }

     
    .ljmu-tile-item::after {
        content: "";
        grid-area: line;
        display: block;
        height: 4px;
        width: 100%;
        background: #fff;
        border-radius: 2px;
        margin-top: 8px;
    }


    /* ----------------------------------------
       Mobile Slide-Out Navigation
    ---------------------------------------- */

    .ljmu-nav__toggle {
        display: block;
    }

    .ljmu-nav {
        position: fixed;
        top: 0;
        right: -300px;
        z-index: 1000;
        width: 200px;
        height: 100vh;
        background: var(--accent-colour);
        transition: right 0.3s ease-in-out;
    }

        .ljmu-nav.open {
            right: 0;
        }

    /* Navigation overlay */
    .ljmu-nav-overlay {
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

        .ljmu-nav-overlay.open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

    /* Navigation icon / profile area */
    .ljmu-nav__icon {
        display: flex;
        flex-direction: column;
        max-height: 300px;
        padding-bottom: 10px;
        font-size: 32px;
        background: var(--hover-colour);
        border-bottom: 1px solid #fff;
    }

        .ljmu-nav__icon img {
            width: 130px;
            height: 130px;
            padding: 10px 20px 20px;
        }

        .ljmu-nav__icon span {
            padding-left: 20px;
        }

    .ljmu-nav__top {
        display: flex;
    }

    /* Navigation items */
    .ljmu-nav__items {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-top: 20px;
        padding-right: 0;
    }

    .menu-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        gap: 20px;
        padding: 6px 0 6px 20px;
        text-align: left;
    }

        .menu-item:hover {
            background: rgba(55, 208, 200, 0.15);
        }

        .menu-item .menu-icon,
        .menu-item .mobile-menu-icon {
            width: 32px;
            text-align: center;
            flex-shrink: 0;
        }

    .menu-text {
        display: inline;
    }

    .login-button {
        flex-direction: row;
        justify-content: flex-start;
    }

    /* Close menu button */
    #closeMenu {
        display: flex;
        width: fit-content;
        margin-left: auto;
        color: #fff;
        font-size: 16px;
    }
}

/* In-app theme toggle (shown only when ViewBag.isApp) */
.ljmu-breadcrumb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ljmu-breadcrumb-row .ljmu-breadcrumb {
    margin-bottom: 0;
}

.ljmu-app-theme__button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--text-colour);
    border-radius: 4px;
    background: transparent;
    color: var(--text-colour);
}

