/* =========================================================
   Base layout
   ========================================================= */

html,
body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

body > header {
    flex-shrink: 0;
}

body > .container {
    flex: 1 0 auto;
}

body > footer {
    flex-shrink: 0;
    margin-top: auto;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* =========================================================
   Fullscreen background (auth pages)
   ========================================================= */

body.bg-auth {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
}

    body.bg-auth::before {
        content: "";
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background-image: url("/data/Background.jpg");
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.3;
        z-index: -10;
        pointer-events: none;
    }

    body.bg-auth.het-is-zover::before {
        background-image: url("/data/HetIsZover.jpg");
    }

/* =========================================================
   Welcome highlight fullscreen hover effect
   ========================================================= */

.welcome-highlight {
    position: relative;
    z-index: 10;
    display: inline-block;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    transition: color 0.25s ease, box-shadow 0.25s ease;
}

    .welcome-highlight::before {
        content: "";
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background-image: url("/data/Background.jpg");
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0;
        transition: opacity 0.25s ease;
        z-index: -1;
        pointer-events: none;
    }

    .welcome-highlight.het-is-zover::before {
        background-image: url("/data/HetIsZover.jpg");
        opacity: 0.35;
    }

    .welcome-highlight:hover::before {
        opacity: 0.35;
    }

    .welcome-highlight > * {
        position: relative;
        z-index: 1;
    }

    .welcome-highlight:hover,
    .welcome-highlight:hover .text-muted,
    .welcome-highlight:hover #countdown {
        color: #fff !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }

    .welcome-highlight:hover {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    }

/* =========================================================
   Navigation dropdown hover
   ========================================================= */

/* Zorg dat navbar en dropdown boven main content (o.a. sticky table headers) komen */
.navbar {
    z-index: 1030;
    position: relative;
}

/* Alleen het directe Onderhoud-submenu; anders worden geneste menu's (Hangfire → Email) ook getoond */
.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
}

.nav-item.dropdown .dropdown-toggle::after {
    margin-left: 0.255em;
    vertical-align: 0.255em;
}

/* Hangfire: zelfde kleur en hover als <a class="dropdown-item"> (knop krijgt anders browsertekstkleur) */
.dropdown-menu .dropend > button.dropdown-item {
    width: 100%;
    text-align: left;
    color: var(--bs-dropdown-link-color);
    background-color: transparent;
}

.dropdown-menu .dropend:hover > button.dropdown-item {
    color: var(--bs-dropdown-link-hover-color);
    background-color: var(--bs-dropdown-link-hover-bg);
}

/* Pijltje: Hangfire heeft submenu (rechts, zoals standaard flyout) */
.dropdown-menu .hangfire-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.dropdown-menu .hangfire-submenu-toggle::after {
    content: "";
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.28em 0 0.28em 0.35em;
    border-color: transparent transparent transparent currentColor;
    opacity: 0.75;
}

.dropdown-menu .dropend:hover > button.hangfire-submenu-toggle::after {
    opacity: 1;
}

/* Hangfire → Email: submenu alleen bij hover op dat item (zelfde item-stijl als andere dropdown-items) */
.dropdown-menu .dropend {
    position: relative;
}

.dropdown-menu .dropend > .dropdown-menu {
    display: none;
}

.dropdown-menu .dropend:hover > .dropdown-menu {
    display: block;
    left: 100%;
    top: 0;
    margin-top: 0;
}
