/* --------------------------------------------------------------------------
   Error Boundary Fallback
   User-friendly error content shown when a page crashes
   -------------------------------------------------------------------------- */

.hh-error-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 3rem 1.5rem;
    min-height: 50vh;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Icon ── */
.hh-error-fallback-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(var(--hh-primary-rgb), 0.1);
    color: var(--hh-primary);
    margin-bottom: 0.5rem;
}

/* ── Typography ── */
.hh-error-fallback-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--hh-text-primary);
    margin: 0;
    line-height: 1.3;
}

.hh-error-fallback-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--hh-text-secondary);
    margin: 0;
    max-width: 360px;
}

/* ── Action buttons ── */
.hh-error-fallback-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.hh-error-fallback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    min-height: 40px;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition:
        background var(--hh-transition-fast),
        box-shadow var(--hh-transition-fast),
        transform var(--hh-transition-fast);
}

.hh-error-fallback-btn:focus-visible {
    outline: 2px solid var(--hh-primary);
    outline-offset: 2px;
}

.hh-error-fallback-btn:active {
    transform: scale(0.97);
}

/* Primary button — rose */
.hh-error-fallback-btn-primary {
    background: var(--hh-primary);
    color: #fff;
}

.hh-error-fallback-btn-primary:hover {
    background: var(--hh-primary-dark);
    box-shadow: 0 2px 8px rgba(var(--hh-primary-rgb), 0.3);
}

/* Secondary button — subtle outline */
.hh-error-fallback-btn-secondary {
    background: transparent;
    color: var(--hh-text-secondary);
    border: 1px solid var(--hh-glass-border-highlight);
}

.hh-error-fallback-btn-secondary:hover {
    background: rgba(var(--hh-primary-rgb), 0.06);
    color: var(--hh-text-primary);
    border-color: rgba(var(--hh-primary-rgb), 0.2);
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .hh-error-fallback {
        padding: 2rem 1rem;
    }

    .hh-error-fallback-actions {
        flex-direction: column;
        width: 100%;
    }

    .hh-error-fallback-btn {
        width: 100%;
    }
}
