/**
 * ReportedIP — UM auth-form error UX (login / register / password reset).
 *
 * Standalone stylesheet: it may load without frontend.css when a UM form
 * lives outside the rip-auth-page wrapper, so every var() carries the
 * design-system fallback value.
 */

/* ---------- Error summary above the form ---------- */

.rip-auth-errors {
    display: flex;
    gap: var(--rip-space-3, 0.75rem);
    padding: var(--rip-space-4, 1rem);
    margin: 0 0 var(--rip-space-5, 1.25rem);
    background: var(--rip-danger-bg, rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--rip-radius-lg, 8px);
    color: #991B1B;
    font-size: var(--rip-text-sm, 0.875rem);
    line-height: 1.5;
}

.rip-auth-errors__title {
    margin: 0 0 var(--rip-space-2, 0.5rem);
    font-weight: 600;
}

.rip-auth-errors__list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.rip-auth-errors__list li {
    margin-bottom: var(--rip-space-1, 0.25rem);
}

.rip-auth-errors__list a {
    color: #991B1B;
    text-decoration: underline;
}

.rip-auth-errors__list a:hover {
    color: var(--rip-danger, #EF4444);
}

/* ---------- Field error state ---------- */

.um .um-form input.um-form-field.um-error,
.um .um-form textarea.um-form-field.um-error {
    border: 1px solid var(--rip-danger, #EF4444) !important;
}

.um .um-form input.um-form-field.um-error:focus,
.um .um-form textarea.um-form-field.um-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Per-field error box: align UM's default red tooltip with the design system. */
.um .um-field-error {
    background: var(--rip-danger, #EF4444);
    border-radius: var(--rip-radius-sm, 4px);
    color: #fff;
    font-size: var(--rip-text-sm, 0.875rem);
    line-height: 1.4;
    padding: var(--rip-space-2, 0.5rem) var(--rip-space-3, 0.75rem);
}

/* UM's caret arrow renders as a broken glyph box on top of the flush error
   box — hide it, the box already sits directly under its field. */
.um .um-field-error .um-field-arrow {
    display: none !important;
}

/* Inline notices (e.g. missing GDPR consent) — alert pattern, not UM default. */
.um .um-notice.err {
    background: var(--rip-danger-bg, rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--rip-radius, 6px);
    color: #991B1B;
    padding: var(--rip-space-3, 0.75rem) var(--rip-space-4, 1rem);
}
