/*
  error.css — 404 and 403 error page styles.
  Extends base.html, uses site CSS variables.
*/

.error-page {
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.error-card {
    text-align: center;
    max-width: 460px;
    width: 100%;
}

/* ── Staggered entrance ─────────────────────────────── */
.error-icon-wrap,
.error-code,
.error-title,
.error-desc,
.error-actions {
    opacity: 0;
    animation: errFadeUp 0.5s ease forwards;
}
.error-icon-wrap { animation-delay: 0.05s; }
.error-code      { animation-delay: 0.15s; }
.error-title     { animation-delay: 0.22s; }
.error-desc      { animation-delay: 0.30s; }
.error-actions   { animation-delay: 0.38s; }

@keyframes errFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Icon ───────────────────────────────────────────── */
.error-icon-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.08);
    border: 1.5px solid rgba(13, 110, 253, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    position: relative;
    animation: errFadeUp 0.5s ease 0.05s forwards, errFloat 4s ease-in-out 0.6s infinite;
}

/* Expanding pulse ring */
.error-icon-wrap::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1.5px solid rgba(13, 110, 253, 0.18);
    animation: errRing 4s ease-in-out 0.6s infinite;
}

.error-icon {
    font-size: 2.2rem;
    color: #0d6efd;
}

@keyframes errFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-9px); }
}

@keyframes errRing {
    0%, 100% { transform: scale(1);    opacity: 0.8; }
    50%       { transform: scale(1.12); opacity: 0.3; }
}

/* ── Big code ───────────────────────────────────────── */
.error-code {
    font-size: clamp(4.5rem, 14vw, 7.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(13, 110, 253, 0.10);
    margin-bottom: 0.25rem;
    user-select: none;
}

body.dark-mode .error-code,
[data-theme="forest"] .error-code,
[data-theme="midnight"] .error-code,
[data-theme="slate"] .error-code {
    color: rgba(13, 110, 253, 0.18);
}

/* ── Text ───────────────────────────────────────────── */
.error-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.6rem;
}

.error-desc {
    font-size: 0.93rem;
    color: var(--subtle-text-color);
    max-width: 340px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* ── Actions ────────────────────────────────────────── */
.error-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
}
