/* The offline indicator (#2860): a header icon + popover, built by
   offline_indicator.js. Tokens only. */

.lx-offline-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lx-offline-indicator[hidden],
.lx-offline-indicator__popover[hidden] {
    display: none;
}

.lx-offline-indicator__button {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    cursor: pointer;
    /* White on the dark header, dark once it goes sticky/light — the same pair
       the notification bell uses. */
    color: var(--color-fg-interactive-inverse, var(--lx-on-brand));
}

.header--sticky .lx-offline-indicator__button {
    color: var(--color-fg-interactive, var(--ss-dark));
}

.lx-offline-indicator__button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* `device` is the quiet state: the connection is fine. */
.lx-offline-indicator[data-state="device"] .lx-offline-indicator__button {
    opacity: 0.7;
}

.lx-offline-indicator__popover {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1080;
    width: 20rem;
    max-width: calc(100vw - 2rem);
    margin-top: 0.4rem;
    padding: 0.75rem 0.9rem;
    background: var(--lx-surface);
    color: var(--ss-dark);
    border: 1px solid var(--lx-border);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: left;
}

/* The offline page has no header: a fixed corner instead. */
.lx-offline-indicator--floating {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1080;
}

.lx-offline-indicator--floating .lx-offline-indicator__button {
    color: var(--ss-dark);
}

.lx-offline-indicator__button i {
    font-size: 1.25rem;
}
