/*
 * orpetveit.no – Cassiopeia custom styling
 * Left-sidebar tree menu, clean minimal appearance
 */

/* ── Hide empty top nav bar ─────────────────────────────────── */
.container-nav {
    display: none;
}

/* ── Header ─────────────────────────────────────────────────── */
.container-header {
    background: #ffffff;
    padding: 0.75rem 0 0.5rem 0;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.container-topbar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.2rem 1rem;
}

.navbar-brand .brand-logo {
    text-decoration: none;
}

.navbar-brand .brand-logo span {
    color: #333333;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ── Sidebar column ──────────────────────────────────────────── */
.grid-sidebar-left {
    background-color: #f6f6f6;
    border-right: 1px solid #d8d8d8;
    padding: 0;
}

/* Strip Bootstrap card chrome */
.grid-sidebar-left .card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.grid-sidebar-left .card-body {
    padding: 0;
}

/* Hide module title (card-header) in sidebar */
.grid-sidebar-left .card-header {
    display: none;
}

/* ── Main menu list (J5 classes) ─────────────────────────────── */
.grid-sidebar-left .mod-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Top-level items ─────────────────────────────────────────── */
.grid-sidebar-left .mod-menu > .nav-item > a,
.grid-sidebar-left .mod-menu > .nav-item > span {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #e4e4e4;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.grid-sidebar-left .mod-menu > .nav-item > a:hover {
    background: #e8e8e8;
    color: #337ab7;
    border-left-color: #337ab7;
    text-decoration: none;
}

.grid-sidebar-left .mod-menu > .nav-item.active > a,
.grid-sidebar-left .mod-menu > .nav-item.current > a {
    color: #337ab7;
    background: #e8f0f8;
    border-left-color: #337ab7;
}

/* ── Sub-menu (mod-menu__sub) ────────────────────────────────── */
.grid-sidebar-left .mod-menu__sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.grid-sidebar-left .mod-menu__sub .nav-item > a,
.grid-sidebar-left .mod-menu__sub .nav-item > span {
    display: block;
    padding: 0.32rem 1rem 0.32rem 1.75rem;
    color: #555;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 400;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #ebebeb;
    transition: background 0.12s, color 0.12s;
}

.grid-sidebar-left .mod-menu__sub .nav-item > a:hover {
    background: #e8e8e8;
    color: #337ab7;
    text-decoration: none;
}

.grid-sidebar-left .mod-menu__sub .nav-item.active > a,
.grid-sidebar-left .mod-menu__sub .nav-item.current > a {
    color: #337ab7;
    background: #e8f0f8;
    border-left-color: #337ab7;
}

/* ── Third level ─────────────────────────────────────────────── */
.grid-sidebar-left .mod-menu__sub .mod-menu__sub .nav-item > a {
    padding-left: 2.5rem;
    font-size: 0.82rem;
    color: #666;
}

/* ── Fourth level ────────────────────────────────────────────── */
.grid-sidebar-left .mod-menu__sub .mod-menu__sub .mod-menu__sub .nav-item > a {
    padding-left: 3.25rem;
}

/* ── Sidebar minimum height ─────────────────────────────────── */
.grid-sidebar-left {
    min-height: 60vh;
}

/* ── Main content padding ────────────────────────────────────── */
.grid-content {
    padding: 0 1rem 1rem 1.5rem;
}

/* ── Breadcrumbs ─────────────────────────────────────────────── */
.container-breadcrumbs .mod-breadcrumbs {
    font-size: 0.85rem;
    background: transparent;
    padding: 0.4rem 0;
    margin-bottom: 0.5rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
.container-footer {
    background: #f0f0f0;
    border-top: 1px solid #ddd;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    color: #777;
}

/* ── Link colours ────────────────────────────────────────────── */
.grid-content a {
    color: #337ab7;
}
.grid-content a:hover {
    color: #23527c;
}

/* ── Override Cassiopeia's teal/green accent colour ──────────── */
:root {
    --cassiopeia-color-primary: #337ab7;
    --bs-link-color: #337ab7;
    --bs-link-hover-color: #23527c;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .grid-sidebar-left {
        border-right: none;
        border-bottom: 2px solid #d8d8d8;
        min-height: unset;
    }
    .grid-content {
        padding: 0.5rem;
    }
}
