/* ── MainLayout ── */

/* Skip navigation link (accessibility) */
.skip-link {
    position: absolute;
    left: -999rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--rz-primary);
    color: var(--rz-on-primary);
    text-decoration: none;
    border-radius: 0 0 0.25rem 0;
    font-weight: 500;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

.layout-root {
    position: relative;
}

.app-home-link {
    text-decoration: none;
    color: inherit;
}

.flex-spacer {
    flex-grow: 1;
}

.user-menu-container {
    position: relative;
}

.user-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.user-menu-card {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 1000;
    min-width: 15rem;
    max-width: calc(100vw - 1rem);
    padding: 0;
}

.user-menu-section {
    border-bottom: 1px solid var(--rz-base-300);
}

.user-menu-section-clickable {
    border-bottom: 1px solid var(--rz-base-300);
    cursor: pointer;
}

.user-menu-version {
    text-align: center;
}

.desktop-sidebar {
    position: relative;
    z-index: 2;
    transition: width 0.2s ease;
}

.desktop-sidebar .rz-panel-menu .rz-navigation-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-shortcut-container {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    text-align: center;
}

.mobile-sidebar {
    position: absolute;
    z-index: 100;
}

.mobile-sidebar-overlay {
    position: absolute;
    z-index: 99;
}

/* Connection-lost dialog — mask fully opaque, card opaque with explicit background */
.connection-lost-mask {
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.connection-lost-card {
    max-width: 28rem;
    text-align: center;
    padding: 2rem;
    background-color: var(--rz-base-background-color);
    opacity: 1;
}

.connection-lost-icon {
    font-size: 3rem;
    color: var(--rz-danger);
}

.connection-lost-mask .rz-card {
    background-color: #0A0A0A !important;
}

.header-bar {
    width: 100%;
}

.app-title {
    cursor: pointer;
}

.header-icon {
    font-size: 1.125rem;
}

.display-name {
    margin: 0 0.25rem;
}

.theme-switch-readonly {
    pointer-events: none;
}

/* ── Notification grids ── */
.notification-grid .rz-data-row:hover > td {
    background-color: var(--rz-base-200);
    cursor: pointer;
}

.notification-grid .rz-datatable-loading {
    background-color: transparent;
}

/* ── GlobalSearch animations ── */
@keyframes searchFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.search-history-item:hover {
    background: var(--rz-base-200);
}
