﻿:root {
    --header-height: 56px;
    --menu-max-height: 70vh;
    --menu-side-width: 100px;
    --brand-color: #32CD32;
    --bg-light: #f8f9fa;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, sans-serif;
    height: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

    body.menu-open {
        overflow: hidden;
    }

/* Sticky header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.site-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    flex: 1;
}

/* Hamburger */
.menu-toggle {
    width: 28px;
    height: 20px;
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

    .menu-toggle span {
        position: absolute;
        height: 3px;
        background: var(--brand-color);
        border-radius: 2px;
        width: 100%;
        transition: all 0.3s ease;
        left: 0;
    }

        .menu-toggle span:nth-child(1) {
            top: 0;
        }

        .menu-toggle span:nth-child(2) {
            top: 8px;
        }

        .menu-toggle span:nth-child(3) {
            top: 16px;
        }

body.menu-open .menu-toggle span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

/* Menu Overlay */
#menuOverlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    max-height: var(--menu-max-height);
    background: #fff;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
}

    #menuOverlay.show {
        transform: translateY(0);
    }

.menu-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* Left: TreeView */
.tree-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
}

/* Right: Side panel */
.menu-side-panel {
    width: var(--menu-side-width);
    background: #fff;
    border-left: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    flex-shrink: 0;
}

    .menu-side-panel a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #333;
        font-size: 0.85rem;
        margin: 0.75rem 0;
    }

        .menu-side-panel a:hover {
            color: var(--brand-color);
        }

    .menu-side-panel img {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
    }

/* Main layout */
main {
    padding: 1rem;
    padding-top: calc(var(--header-height) + 1rem);
}

/* Task title for main page */
.tasktittle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: grey;
    border: 1px solid limegreen;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.30);
    font-family: sans-serif;
}

    .tasktittle img {
        height: 32px;
        width: 32px;
        margin-right: 10px;
    }


/* FrameMain for main page */
iframe#frameMain {
    width: 100%;
    height: 70vh;
    border: none;
}
