/* Bootstrap 5.3.0, vendored (no runtime CDN import): a prerequisite of the Hub CSP (design doc 06 §4.2). */
@import url('../lib/bootstrap/bootstrap.min.css');

:root {
    --lh-header-height: 48px;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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 {
    text-align: center;
    padding: 2rem;
}

/* ---- Shell: slim header + full-width body (design doc 12 §3, §6) ---- */

.lh-header {
    min-height: var(--lh-header-height);
}

.lh-header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    height: var(--lh-header-height);
    padding: 0 0.75rem 0 0.5rem;
    color: #2C2C2C;
}

.lh-header-brand {
    color: #2C2C2C;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lh-header-brand:hover,
.lh-header-brand:focus-visible {
    color: #DC3513;
}

.lh-header-separator {
    color: #97999B;
}

.lh-header-current-app {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lh-header-spacer {
    flex: 1 1 auto;
}

.lh-launcher-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #2C2C2C;
    cursor: pointer;
}

.lh-launcher-button:hover {
    background: rgba(44, 44, 44, 0.08);
}

.lh-launcher-button[aria-expanded="true"] {
    background: rgba(220, 53, 19, 0.12);
    color: #DC3513;
}

.lh-launcher-button:focus-visible,
.lh-launcher-tile:focus-visible,
.lh-launcher-tile--focus,
.lh-skip-link:focus-visible {
    outline: 2px solid #DC3513;
    outline-offset: 2px;
}

/* Transitional "Finding your apps" hint (Home.razor): a static inline replica of the launcher button
   above - same 40px circle and 24px icon - so the sentence shows the very button it names.
   Delete together with the notice. */
.lh-launcher-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(44, 44, 44, 0.35);
    border-radius: 50%;
    color: #2C2C2C;
    vertical-align: middle;
    margin: 0 3px;
}

/* "Skip to content": the first focusable element, visible only while focused. */
.lh-skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    z-index: 1200;
    padding: 0.25rem 0.75rem;
    border: 0;
    background: #2C2C2C;
    color: #ffffff;
}

.lh-skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* Cartridge routes render full-bleed: no padding, the frame fills the height below the header. */
.rz-body.lh-body--flush {
    padding: 0;
    overflow: hidden;
}

.lh-body-cartridge {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--lh-header-height));
    min-height: 0;
}

#lh-main:focus {
    outline: none;
}

/* ---- App launcher (design doc 12 §4.2) ---- */

.lh-launcher {
    position: fixed;
    top: calc(var(--lh-header-height) + 4px);
    left: 8px;
    z-index: 1100;
    width: fit-content;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - var(--lh-header-height) - 16px);
    display: flex;
    flex-direction: column;
    background: var(--rz-base-background-color, #ffffff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    animation: lh-launcher-in 120ms ease-out;
}

@keyframes lh-launcher-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lh-launcher-backdrop {
    position: fixed;
    inset: var(--lh-header-height) 0 0 0;
    z-index: 1090;
    background: transparent;
}

.lh-launcher-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 16px;
    border-bottom: 1px solid #e3e4e5;
}

.lh-launcher-search input {
    flex: 1 1 auto;
}

.lh-launcher-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 0 16px 16px;
}

.lh-launcher-group-heading {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: 8px 0 4px;
    height: 28px;
    background: inherit;
    background-color: var(--rz-base-background-color, #ffffff);
    color: #6b6d70;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lh-launcher-grid {
    display: grid;
    grid-template-columns: repeat(var(--lh-launcher-cols, 2), 112px);
    gap: 8px;
}

.lh-launcher-grid--page {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.lh-launcher-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 112px;
    height: 96px;
    padding: 8px;
    border-radius: 6px;
    color: #2C2C2C;
    text-align: center;
    text-decoration: none;
}

.lh-launcher-grid--page .lh-launcher-tile {
    width: auto;
    height: auto;
    min-height: 96px;
    border: 1px solid #e3e4e5;
}

.lh-launcher-tile:hover {
    background: rgba(44, 44, 44, 0.06);
    color: #2C2C2C;
}

.lh-launcher-tile[aria-current="page"] {
    background: rgba(220, 53, 19, 0.1);
}

.lh-launcher-tile-icon {
    font-size: 32px;
    color: #DC3513;
}

.lh-launcher-tile-title {
    font-size: 0.8125rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lh-launcher-tile-description {
    font-size: 0.75rem;
    color: #6b6d70;
}

.lh-launcher-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0 6px;
    border-radius: 8px;
    background: #fff4f1;
    color: #8a2a0f;
}

.lh-launcher-external {
    position: absolute;
    top: 4px;
    right: 6px;
    color: #97999B;
}

.lh-launcher-empty {
    max-width: 22rem;
    padding: 16px 0 0;
    color: #6b6d70;
}

.lh-launcher-degraded {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 0 0;
    color: #8a2a0f;
}

.lh-launcher-loading {
    padding: 12px 0 0;
    color: #6b6d70;
}

.lh-launcher-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 40px;
    padding: 0 16px;
    border-top: 1px solid #e3e4e5;
    font-size: 0.8125rem;
}

.lh-launcher-copyright {
    color: #6b6d70;
}

@media (max-width: 600px) {
    .lh-launcher {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        border-radius: 0;
    }

    .lh-launcher-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }

    .lh-launcher-tile {
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lh-launcher {
        animation: none;
    }
}

/* Notifications list: clickable rows with a hover highlight, and action buttons that never truncate */
.notifications-grid .rz-data-row {
    cursor: pointer;
}

/* Radzen's striped/selectable row rules (e.g. .rz-grid-table-striped tbody>tr:nth-child(n)>td) out-rank a plain
   hover selector and its theme CSS loads after this file, so the hover background must be forced. */
.notifications-grid tbody > tr.rz-data-row:hover > td {
    background-color: #bdbdbd !important;
}

.notifications-grid .notification-actions .rz-button {
    white-space: nowrap;
    min-width: max-content;
}

/* Delivery status firings table: every row white, including the selected one, whose default dark highlight
   made the first (preselected) row read as different. The selected firing stays distinguishable by its bold text.
   Forced for the same reason as the list grid's hover: Radzen's theme CSS loads after this file. */
.fires-grid tbody > tr.rz-data-row > td {
    background-color: #fff !important;
    cursor: pointer;
}

.fires-grid tbody > tr.rz-data-row:hover > td {
    background-color: #bdbdbd !important;
}

.fires-grid tbody > tr.rz-data-row.rz-state-highlight > td {
    font-weight: 600;
}
