/* =========================================================
   layout.css
   Page structure: a list of links on the left,
   the page content on the right.
   ========================================================= */

.app-container {
    min-height: 100vh;
}

/* ---------- Sidebar (plain list of links) ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--paper);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 25px 20px 12px;
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px; /* typewriter letters are wide, so a bit smaller than other headings */
    color: var(--blue);
}

.sidebar-nav {
    flex: 1;
    padding: 5px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 5px 20px;
    color: var(--blue);
}

.nav-item:hover {
    color: var(--blue-dark);
}

/* the page you are on: bold, black, not a link */
.nav-item.active {
    color: var(--ink);
    font-weight: bold;
    text-decoration: none;
}

.nav-item.active::before {
    content: ">";
    margin-right: 5px;
}

.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--line);
}

.user-profile {
    cursor: pointer;
}

.user-profile:hover #sidebarName {
    text-decoration: underline;
}

/* the letter avatar is not needed in this design */
.avatar {
    display: none;
}

/* ---------- Main content ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px 45px 60px;
    max-width: calc(1100px + var(--sidebar-width));
}

/* page title with a line under it */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ink);
}

.dashboard-header h1 {
    margin-bottom: 0;
}

/* section heading with a dashed line under it */
.section-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    padding-bottom: 3px;
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--line-dashed);
}

/* ---------- Phones and small screens ---------- */
@media (max-width: 700px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
    }

    .nav-item {
        padding: 4px 10px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }
}
