/* ============================================================
   Rumi — Global CSS reset y utilidades base
   Tailwind gestiona el sistema de diseño; aquí solo lo
   imprescindible que Tailwind no puede cubrir por sí solo.
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #F4F1DE; /* surface — Fondo Cálido */
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #3D405B; /* teal — texto principal */
}

/* ── Accesibilidad: foco global visible ──────────────────── */
:focus-visible {
    outline: 2px solid #E07A5F;
    outline-offset: 2px;
}

/* ── Scrollbar discreta (webkit) ─────────────────────────── */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #9E9E9E;
    border-radius: 99px;
}

/* ── Blazor: error boundary ──────────────────────────────── */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    font-size: 0.875rem;
}

.blazor-error-boundary::after {
    content: "Se ha producido un error en la aplicación.";
}

/* ── Blazor: error UI flotante ───────────────────────────── */
#blazor-error-ui {
    color-scheme: light only;
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.15);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Feed de swipe: animaciones de tarjeta ───────────────── */
@keyframes swipe-exit-left {
    to { transform: translateX(-130%) rotate(-22deg); opacity: 0; }
}

@keyframes swipe-exit-right {
    to { transform: translateX(130%) rotate(22deg); opacity: 0; }
}

@keyframes card-enter {
    from { transform: scale(0.93) translateY(12px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.swipe-exit-left  { animation: swipe-exit-left  0.28s ease-in  forwards; pointer-events: none; }
.swipe-exit-right { animation: swipe-exit-right 0.28s ease-in  forwards; pointer-events: none; }
.card-enter       { animation: card-enter        0.22s ease-out both; }

/* ── Formularios: estados de validación de Blazor ────────── */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
