﻿/* ========================================
   FONTS
======================================== */

@font-face {
    font-family: 'Roboto';
    src: url('/webfonts/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
}

/* ========================================
   THEME VARIABLES
======================================== */

/* Dark Theme (Default) */
:root {
    --header-bg: #011A42;
    --header-footer-colour: #FFFFFF;
    --sidebar-bg: #000000;
    --sidebar-text: #FFFFFF;
    --sidebar-text-hover: #FFFFFF;
    --sidebar-mobile-text: #FFFFFF;
    --navigation-glow-colour: #FFFFFF;
    --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;
    --header-footer-colour: #2DD5C4;
    --sidebar-bg: #000000;
    --sidebar-mobile: #E5F3F3;
    --sidebar-text: #FFFFFF;
    --sidebar-mobile-text: #011A42;
    --sidebar-text-hover: #011A42;
    --navigation-glow-colour: #011A42;
    --page-bg: #E5F3F3;
    --text-colour: #011A42;
    --tile-hover: #2DD5C4;
    --hover-text-colour: #011A42;
    --accent-colour: #011A42;
    --border-colour: #FFFFFF;
    --hover-colour: #2DD5C4;
}

/* ========================================
   BASE ELEMENTS
======================================== */

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;
}

h4 {
    color: var(--text-colour);
}

/* ========================================
   UTILITIES
======================================== */

.disabled {
    display: none !important;
}

.selected {
    background: var(--hover-colour);
    font-weight: 600;
}

/* ========================================
   LAYOUT
======================================== */

.app-layout {
    flex: 1;
    display: flex;
}

.main-content {
    flex: 1;
    background: var(--page-bg);
}

.ljmu-main-content-container {
    padding-top: 24px;
    padding-left: 82px;
}

/* ========================================
   HEADER
======================================== */

#header-title {
    font-size: 36px;
}

.header-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.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;
}

#header-image {
    width: 60px;
    height: 60px;
    margin-left: 1%;
}

.ljmu-header p {
    color: #fff;
    font-size: 36px;
    font-weight: 400;
}

.ljmu-header i {
    font-size: 32px;
}

.ljmu-nav-items {
    display: flex;
    gap: 25px;
    padding-right: 15px;
}

.login-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#mobile-home-button {
    display: none;
}

#theme-change {
    cursor: pointer;
}

.ljmu-nav-icon {
    display: none;
}

.menu-item {
    color: #FFFFFF;
}

.menu-text {
    display: none;
}

.mobile-menu-toggle {
    display: none;
}

#theme-change {
    display: flex;
    align-items: center;
}

    #theme-change i {
        font-size: 40px;
    }

/* ========================================
   FOOTER
======================================== */

.ljmu-footer {
    display: flex;
    align-items: center;
    height: 48px;
    background-color: var(--header-bg);
    border-top: 2px solid #fff;
}

    .ljmu-footer span {
        color: #fff;
    }

/* ========================================
   SIDEBAR
======================================== */

.ljmu-navigation {
    width: 271px;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
}

.ljmu-navigation-title {
    color: var(--sidebar-text);
    display: none;
}

.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);
}

.ljmu-favourited-tile {
    justify-content: center;
    color: var(--text-colour);
}

/* ========================================
   TILEGROUPS
======================================== */

.ljmu-groups {
    display: flex;
    flex-direction: column;
    margin-top: 23px;
}

.ljmu-group-item {
    display: flex;
    align-items: center;
    height: 48px;
    color: var(--sidebar-text);
    padding-left: 24px;
}

.ljmu-group-item.selected{
    color: var(--hover-text-colour);
}

    .ljmu-group-item:hover {
        background: var(--hover-colour);
        color: var(--hover-text-colour);
    }

.group-name {
    font-size: 20px;
    font-style: normal;
}

.group-icon {
    margin-left: auto;
    margin-right: 27px;
}

/* ========================================
   TILES
======================================== */

.ljmu-tile-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    row-gap: 20px;
    column-gap: 71px;
}

.ljmu-tile-wrapper {
    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-tile-wrapper::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 8px;
        height: 4px;
        border-radius: 999px;
        background: var(--text-colour);
    }

    .ljmu-tile-wrapper:hover {
        border: 2px solid var(--tile-hover);
        background-color: var(--accent-colour);
        color: var(--hover-text-colour);
    }

        .ljmu-tile-wrapper:hover::after {
            background: #9fffee;
            box-shadow: 0 0 6px #9fffee;
        }

        .ljmu-tile-wrapper:hover #tile-name {
            text-decoration: underline;
        }

        .ljmu-tile-wrapper:hover .tile-heart-btn {
            scale: 1.1;
        }

.ljmu-tile-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 10px;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

    .ljmu-tile-item span {
        display: block;
        max-height: 25px;
        overflow: hidden;
    }

    .ljmu-tile-item p {
        padding-top: 5px;
    }

    .ljmu-tile-item span {
        max-height: 25px;
        overflow: hidden;
    }

.ljmu-icon-heart {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
}

.tile-wrapper {
    position: relative;
}

.tile-heart-btn {
    position: absolute;
    top: 3px;
    right: 10px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 2;
    font-size: 24px;
    color: var(--sidebar-text);
    -webkit-text-stroke: 1px #000000;
    transition: 0.3s ease;
}

/* ========================================
   Favourites
======================================== */

.favourited {
    color: #DF1394;
}

.ljmu-favourites-nav {
    margin: 0 30px 0 24px;
}

.ljmu-favourites {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 5px;
    max-height: 200px;
    overflow-y: auto;
}

    .ljmu-favourites::-webkit-scrollbar {
        width: 6px;
    }

    .ljmu-favourites::-webkit-scrollbar-track {
        background: var(--sidebar-bg) !important;
    }

    .ljmu-favourites::-webkit-scrollbar-thumb {
        background: var(--hover-colour) !important;
        border-radius: 6px;
    }

.ljmu-favourites-description {
    display: none;
}

.ljmu-favourites-nameicon {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--sidebar-text)
}

.ljmu-favourited-tile-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 11px;
}

.favourite-heart {
    position: absolute;
    right: 0px;
    font-size: 20px;
    cursor: pointer;
}

#favourite-placeholder {
    color: var(--sidebar-text);
}

.ljmu-favourite-title {
    padding-top: 20px;
    display: block;
    font-size: 20px;
    font-weight: 600;
}

.ljmu-favourites-name {
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 160px;
    display: block;
    overflow: hidden
}

.tile-sidebar-icon {
    width: 20px;
}

/* ========================================
   Download App Section
======================================== */

.ljmu-download-app {
    margin: 0 30px 0 24px;
    border-top: 1px solid var(--sidebar-text);
    margin-top: auto;
}

.ljmu-download-app-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sidebar-text);
}
/* ========================================
   Responsive
======================================== */
@media (max-width: 768px) {
    .app-layout {
        flex: 1;
        display: block;
    }

    .ljmu-navigation {
        min-height: 100%;
        width: 100%;
        background: var(--sidebar-mobile);
    }

    #header-title {
        font-size: 28px;
    }

    .ljmu-tilegroups-nav {
        order: 2;
    }

    .ljmu-favourites-nav {
        order: 1;
    }

    .ljmu-download-app {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        display: none;
    }

    .app-layout {
        display: flex;
    }

    .ljmu-header i {
        padding-right: 0px;
        margin-left: 0px;
    }

    .ljmu-header p {
        font-size: 20px;
    }

    #mobile-home-button {
        display: flex;
    }

    .ljmu-sidebar {
        width: 100%;
    }

    .ljmu-navigation {
        padding: 12px 30px 12px 24px;
    }

    .ljmu-navigation-title {
        color: var(--text-colour);
        font-size: 24px;
    }

    .ljmu-welcome-banner {
        display: block;
    }

    .ljmu-navigation-title {
        display: block;
    }

    /* ========================================
        Responsive Favourites
    ======================================== */

    #favourite-placeholder {
        font-size: 16px;
        color: var(--text-colour);x
    }

    .ljmu-favourites-nav {
        margin: 0 0 0 0;
    }

    .ljmu-favourite-title {
        padding-top: 0px;
    }

    .ljmu-favourites {
        display: flex;
        max-height: 210px;
        overflow-y: auto;
        flex-direction: column;
        margin: 0;
        margin-bottom: 12px;
        gap: 15px;
    }

    .ljmu-favourited-tile-wrapper {
        position: relative;
        padding-bottom: 13px;
    }

        .ljmu-favourited-tile-wrapper::after {
            content: "";
            position: absolute;
            left: 0px;
            right: 0px;
            bottom: 8px;
            height: 2px;
            border-radius: 999px;
            background: var(--navigation-glow-colour);
            box-shadow: 0 0 6px #9fffee;
        }


    .ljmu-favourited-tile {
        flex-direction: column;
    }

    .ljmu-favourites-nameicon {
        display: flex;
        flex-direction: row;
    }

    .ljmu-favourites-name {
        margin-left: 10px;
        font-weight: 600;
    }

    .ljmu-favourites-nameicon {
        font-size: 16px;
        color: var(--sidebar-mobile-text);
    }

    .ljmu-favourites-description {
        margin-top: 2px;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .favourite-heart {
        position: absolute;
        right: 0px;
        top: 3px;
        font-size: 20px;
    }

    /* ========================================
        Responsive TileGroups
    ======================================== */

    .ljmu-groups {
        display: flex;
        flex-direction: column;
        gap: 24px;
        margin-bottom: 24px;
    }

    .ljmu-navigation-title {
        font-size: 24px;
        color: var(--text-colour);
        margin-bottom: 12px;
        font-weight: 600;
    }

    .ljmu-group-item {
        width: 100%;
        height: 90px;
        border-radius: 6px;
        border: 2px solid #FFF;
        background: var(--accent-colour);
        box-shadow: 0 0 10px 0 #2DD5C4;
        color: var(--sidebar-text);
        display: flex;
        align-items: center;
    }

    .group-name {
        font-size: 24px;
        font-style: normal;
        font-weight: 700;
        line-height: normal;
    }

    .group-icon {
        margin-left: auto;
        margin-right: 20px;
    }

    .ljmu-sidebar-divider {
        display: none;
    }

    /* ========================================
        Responsive Tiles
    ======================================== */

    #group-name {
        padding-left: 10px;
        font-weight: 600;
    }

    .ljmu-main-content-container {
        padding-left: 3%;
        padding-right: 3%;
    }

    .ljmu-tile-items {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    }
}

/* ========================================
        Responsive Header Menu
    ======================================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {

    .mobile-menu-toggle {
        display: block;
    }

    .ljmu-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 200px;
        height: 100vh;
        background: var(--accent-colour);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    .ljmu-nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 999;
    }

        .ljmu-nav-overlay.open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

    .ljmu-nav-icon {
        display: flex;
        flex-direction: column;
        font-size: 32px;
        max-height: 300px;
        background: var(--hover-colour);
        border-bottom: 1px solid #FFFFFF;
        padding-bottom: 10px;
    }

        .ljmu-nav-icon img {
            width: 120px;
            height: 120px;
            padding: 20px;
        }

        .ljmu-nav-icon span {
            padding-left: 20px;
        }

    .ljmu-nav.open {
        right: 0;
    }

    .ljmu-nav-items {
        padding-top: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-right: 0px;
    }

    .menu-item {
        display: flex;
        width: 100%;
        align-items: center;
        padding: 6px;
        gap: 20px;
        padding-left: 20px;
        color: #FFFFff;
        text-decoration: none;
    }

        .menu-item:hover {
            background: rgba(55, 208, 200, 0.15);
        }

    .menu-icon {
        width: 40px;
        align-items: center;
        text-align: center;
    }

    .menu-text {
        display: inline;
    }

    .login-button {
        display: flex;
        justify-content: start;
        flex-direction: row;
    }

    #closeMenu {
        background: none;
        border: none;
        width: fit-content;
        margin-left: auto;
        color: #FFFFFF;
        font-size: 16px;
    }
}
