/* =========================================================
   error-states.css
   Shared "proper error state" UI: an icon + title + message +
   retry button block for public-facing sections (fish catalog,
   etc.), plus a small live status pill used in the admin panel.
   Pure presentational CSS — carries no text of its own; all
   copy is injected by error-states.js / admin.js.
   ========================================================= */

.nat-error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 50px 24px;
    margin: 0 auto;
    max-width: 420px;
    color: #5a6b7a;
    opacity: 0;
    transform: translateY(6px);
    animation: nat-error-fade-in 0.35s ease forwards;
}

@keyframes nat-error-fade-in {
    to { opacity: 1; transform: translateY(0); }
}

.nat-error-state__icon {
    font-size: 2.2rem;
    line-height: 1;
}

.nat-error-state__title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #071a2d;
    margin: 0;
}

.nat-error-state__message {
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
    color: #5a6b7a;
}

.nat-error-state__retry {
    margin-top: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--blue-color, #00b4ff);
    border: none;
    padding: 9px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nat-error-state__retry:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 180, 255, 0.35);
}

.nat-error-state__retry:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

/* Severity accents — same red/amber/green scale already used by
   .stock-pill[data-stock] in fish-filters.css, kept consistent. */
.nat-error-state[data-severity="error"] .nat-error-state__icon { color: #ef4444; }
.nat-error-state[data-severity="warning"] .nat-error-state__icon { color: #f59e0b; }
.nat-error-state[data-severity="offline"] .nat-error-state__icon { color: #ef4444; }

@media (prefers-reduced-motion: reduce) {
    .nat-error-state { animation: none; opacity: 1; transform: none; }
    .nat-error-state__retry { transition: none; }
}

/* ---------- Compact inline status pill (admin panel) ---------- */
.nat-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.nat-status-pill[data-state="checking"] { opacity: 0.75; }
.nat-status-pill[data-state="ok"] { border-color: rgba(34, 197, 94, 0.5); }
.nat-status-pill[data-state="degraded"] { border-color: rgba(245, 158, 11, 0.6); }
.nat-status-pill[data-state="down"] { border-color: rgba(239, 68, 68, 0.6); }

@media (max-width: 480px) {
    .nat-error-state { padding: 36px 16px; }
}
