/* Offline pill and overlay (public/custom/js/offline.js, views/common/offline.ejs). Loaded by both
   shells, so it carries its own tokens (the organizer-auth.css values) and depends on no framework. */
:root {
    --off-text: #1a1a1a;
    --off-muted: #666666;
    --off-border: #d9d9d9;
    --off-accent: #dc354b;
    --off-accent-dark: #c02a3f;
    --off-success: #1e8e3e;
    --off-radius: 8px;
}

/* ---------- pill ---------- */

.off-pill {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 2100;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Below the AdminLTE navbar on the signed-in pages */
body:not(.oa) .off-pill {
    top: 60px;
}

.off-pill[hidden] {
    display: none;
}

.off-pill.is-offline {
    background: var(--off-accent);
}

.off-pill.is-back {
    background: var(--off-success);
}

/* ---------- overlay ---------- */

.off-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(26, 26, 26, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--off-text);
}

.off-overlay[hidden] {
    display: none;
}

body.off-lock {
    overflow: hidden;
}

.off-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px 24px;
    border-radius: var(--off-radius);
    background: #ffffff;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.off-icon {
    display: block;
    margin-bottom: 16px;
    color: var(--off-accent);
    font-size: 40px;
}

.off-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.off-text {
    margin: 0 0 20px;
    color: var(--off-muted);
    font-size: 15px;
    line-height: 1.4;
}

.off-note {
    margin: 0 0 12px;
    color: var(--off-accent);
    font-size: 14px;
}

.off-note[hidden] {
    display: none;
}

.off-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.off-btn {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--off-border);
    border-radius: var(--off-radius);
    background: #ffffff;
    color: var(--off-text);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.off-btn:hover {
    background: #f5f5f5;
}

.off-btn:focus-visible {
    outline: 2px solid var(--off-text);
    outline-offset: 2px;
}

.off-btn-primary {
    border-color: var(--off-accent);
    background: var(--off-accent);
    color: #ffffff;
}

.off-btn-primary:hover:not(:disabled) {
    background: var(--off-accent-dark);
}

.off-btn-primary:disabled {
    opacity: 0.7;
    cursor: default;
}

@media (min-width: 480px) {
    .off-actions {
        flex-direction: row-reverse;
    }
}
