/* ── Global layout tokens: one knob each for site-wide content width and gutter ───── */
:root {
    --page-maxw: 1200px;
    --page-pad: 32px;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Blazor infrastructure (wwwroot/index.html loading UI) ───── */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress-bar {
    position: absolute;
    width: 100%;
    height: 0.15rem;
    inset: 0 0 auto 0;
    margin: 0;
    background-color: #e0e0e0;
    overflow: hidden;
}

.loading-progress-bar-fill {
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    background-color: #1b6ec2;
    transition: width 0.05s ease-in-out;
}

/* ── Base (global tags, all pages) ───────────────────────────── */
html {
    height: 100%;
    width: 100%;
}

body {
    height: 100%;
    width: 100%;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    text-align: center;
}

h1:focus {
    outline: none;
}

a {
    color: #404040;
    text-decoration: none;
}

a:hover {
    color: #0BA5D1;
}

/* ── Buttons & forms (Login, Settings, AdminUsers, Applications, Companies) ─ */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Form validation (EditForm pages: Applications, Settings, AdminUsers, Companies) ─ */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ── Page container & fade-in (used together: MainLayout, Schema, Dashboard, Card component) ─ */
.container {
    padding: 0 15px;
}

.fade-me-in {
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

/* ── Shared card style (border-vapor + text-justify pair: Schema, Card, Dashboard, AppSidebar) ─ */
.text-justify {
    text-align: justify;
}

.border-vapor {
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.176);
    border-width: 1px;
    background-color: rgb(255, 255, 255, 0.3);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    border-radius: 15px;
    padding: 25px;
    min-height: 300px;
    width: auto;
}

/* ── Sidebar layout & chrome (BlupLayout, MainLayout, NeitzkeLayout) ─
   The sidebar floats over the left gutter; it does not push the page. */

.app-sidebar {
    position: fixed;
    width: 270px;
    top: 12px;
    left: 12px;
    height: calc(100vh - 24px);
    z-index: 1040;
    overflow-y: auto;
    border-radius: 12px;
    min-height: 0;
    color: #000;
    background-color: #f6f6f5;
    transition: width 0.2s ease, transform 0.25s ease;
}

.app-sidebar .nav-link,
.app-sidebar .link-body-emphasis {
    color: #000;
    display: flex;
    align-items: center;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.app-sidebar .sidebar-profile {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.375rem !important;
}

.app-sidebar .mt-auto {
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.has-sidebar.sidebar-collapsed .app-sidebar {
    width: 72px;
}

.sidebar-icon {
    display: inline-block;
    width: 24px;
    margin-right: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
}

.sidebar-label {
    font-size: 0.875rem;
    transition: opacity 0.15s ease;
}

.has-sidebar.sidebar-collapsed .sidebar-label {
    display: none;
}

.has-sidebar.sidebar-collapsed .sidebar-icon {
    margin-right: 0;
}

.has-sidebar.sidebar-collapsed .app-sidebar .nav-link,
.has-sidebar.sidebar-collapsed .app-sidebar .link-body-emphasis {
    display: flex;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.has-sidebar.sidebar-collapsed .sidebar-profile {
    min-height: 32px;
}

/* Group labels are hidden when collapsed, so add a little gap between the
   icon groups (Main, Job Hunt, Pages). */
.has-sidebar.sidebar-collapsed .app-sidebar .nav.flex-column {
    margin-top: 0.75rem;
}

/* ── Sidebar controls: hamburger, toggle, backdrop (AppSidebar) ─ */
.sidebar-hamburger {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1031;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #404040;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-hamburger:hover,
.sidebar-hamburger:focus-visible {
    color: #0BA5D1;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1029;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sidebar-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #404040;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    color: #0BA5D1;
}

.has-sidebar.sidebar-collapsed .sidebar-toggle {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

/* ── Sidebar responsive (mobile breakpoint, AppSidebar) ──────── */
@media (max-width: 767.98px) {
    .sidebar-hamburger {
        display: inline-flex;
    }

    .has-sidebar {
        padding-left: 0;
    }

    .has-sidebar.sidebar-collapsed {
        padding-left: 0;
    }

    .app-sidebar {
        width: 72px;
        transform: translateX(calc(-100% - 24px));
    }

    .has-sidebar.sidebar-collapsed .app-sidebar {
        width: 72px;
    }

    .app-sidebar .sidebar-label,
    .app-sidebar .sidebar-profile {
        display: none;
    }

    .app-sidebar .sidebar-icon {
        margin-right: 0;
    }

    .app-sidebar .nav-link,
    .app-sidebar .link-body-emphasis {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .has-sidebar.sidebar-open .app-sidebar {
        transform: translateX(0);
        width: 270px;
    }

    .has-sidebar.sidebar-open .app-sidebar .sidebar-label,
    .has-sidebar.sidebar-open .app-sidebar .sidebar-profile {
        display: revert;
    }

    .has-sidebar.sidebar-open .app-sidebar .sidebar-icon {
        margin-right: 0.375rem;
    }

    .has-sidebar.sidebar-open .app-sidebar .nav-link,
    .has-sidebar.sidebar-open .app-sidebar .link-body-emphasis,
    .has-sidebar.sidebar-open .app-sidebar .mt-auto .nav-link {
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .has-sidebar.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .has-sidebar.sidebar-open .sidebar-hamburger {
        display: none;
    }

    .app-sidebar .sidebar-toggle {
        display: none;
    }

    .app-sidebar .nav {
        margin-top: 0.25rem;
    }
}

/* Native smooth in-page anchor scrolling (socket-free) */
html { scroll-behavior: smooth; }
