/*
 * Sanum: piezas de interfaz compartidas por el panel de administración y el del médico.
 * CSS plano (el tema de Vite no se recompila en producción). Cargado por PanelsRenderHook::HEAD_END.
 */

/* ── Avisos (x-sanum.notice) ─────────────────────────────────────────── */
.sn-notice {
    --sn-accent: #0369a1;
    --sn-tile: #e0f2fe;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 1rem 0.8rem 0.85rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    color: #475569;
    font-size: 0.8125rem;
    line-height: 1.5;
}
.sn-notice--info { --sn-accent: #0369a1; --sn-tile: #e0f2fe; }
.sn-notice--privacy { --sn-accent: #4f46e5; --sn-tile: #eef2ff; }
.sn-notice--warning { --sn-accent: #b45309; --sn-tile: #fef3c7; }
.sn-notice--danger { --sn-accent: #b91c1c; --sn-tile: #fee2e2; }
.sn-notice--success { --sn-accent: #0f766e; --sn-tile: #ccfbf1; }
.sn-notice--neutral { --sn-accent: #475569; --sn-tile: #f1f5f9; }

.sn-notice__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: var(--sn-tile);
    color: var(--sn-accent);
}
.sn-notice__icon svg { width: 1.125rem; height: 1.125rem; }
.sn-notice__content { flex: 1 1 auto; min-width: 0; align-self: center; }
.sn-notice__title { margin: 0; color: #0f172a; font-weight: 600; font-size: 0.875rem; line-height: 1.4; }
.sn-notice__text { margin: 0; }
.sn-notice__title + .sn-notice__text { margin-top: 0.125rem; }
.sn-notice__text strong, .sn-notice__text b { color: #1e293b; font-weight: 600; }
.sn-notice__text a { color: var(--sn-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sn-notice__actions { flex: none; display: flex; align-items: center; gap: 0.5rem; align-self: center; margin-left: auto; }

.sn-notice--compact { padding: 0.6rem 0.8rem 0.6rem 0.7rem; gap: 0.6rem; box-shadow: none; }
.sn-notice--compact .sn-notice__icon { width: 1.625rem; height: 1.625rem; border-radius: 0.4rem; }
.sn-notice--compact .sn-notice__icon svg { width: 0.95rem; height: 0.95rem; }

/* Botón de acción del aviso, sobrio y del mismo alto en todos lados. */
.sn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.125rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sn-btn svg { width: 1rem; height: 1rem; flex: none; }
.sn-btn:disabled { opacity: 0.6; cursor: wait; }
.sn-btn--primary { background: #0f766e; color: #fff; }
.sn-btn--primary:hover { background: #115e59; }
.sn-btn--ghost { background: #fff; color: #334155; border-color: #cbd5e1; }
.sn-btn--ghost:hover { background: #f8fafc; border-color: #94a3b8; }

@media (max-width: 640px) {
    .sn-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); }
    .sn-notice__actions { grid-column: 1 / -1; width: 100%; margin-left: 0; }
    .sn-notice__actions .sn-btn { flex: 1 1 auto; }
}

html.dark .sn-notice {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #a1a1aa;
    box-shadow: none;
}
html.dark .sn-notice--info { --sn-accent: #38bdf8; --sn-tile: rgba(56, 189, 248, 0.12); }
html.dark .sn-notice--privacy { --sn-accent: #a5b4fc; --sn-tile: rgba(129, 140, 248, 0.14); }
html.dark .sn-notice--warning { --sn-accent: #fbbf24; --sn-tile: rgba(251, 191, 36, 0.12); }
html.dark .sn-notice--danger { --sn-accent: #f87171; --sn-tile: rgba(248, 113, 113, 0.12); }
html.dark .sn-notice--success { --sn-accent: #2dd4bf; --sn-tile: rgba(45, 212, 191, 0.12); }
html.dark .sn-notice--neutral { --sn-accent: #a1a1aa; --sn-tile: rgba(255, 255, 255, 0.06); }
html.dark .sn-notice__title, html.dark .sn-notice__text strong, html.dark .sn-notice__text b { color: #f4f4f5; }
html.dark .sn-btn--primary { background: #14b8a6; color: #042f2e; }
html.dark .sn-btn--primary:hover { background: #2dd4bf; }
html.dark .sn-btn--ghost { background: transparent; color: #e4e4e7; border-color: rgba(255, 255, 255, 0.18); }
html.dark .sn-btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* ── Ícono pequeño en línea (reemplaza emojis en etiquetas y botones) ─── */
.sn-i { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; flex: none; }

/* ── Barra superior: el contador de notificaciones no pisa "Ayuda paso a paso" ── */
.sanum-tour-btn { margin-left: 0.875rem; }
@media (max-width: 640px) { .sanum-tour-btn { margin-left: 1.35rem !important; } }

/* Punto de estado (reemplaza 🟢 ⚫ en etiquetas) */
.sn-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 9999px; margin-right: 0.35rem; vertical-align: 0.05em; flex: none; }

/* ── Botón principal: el tema apuntaba a clases de Filament 3 (fi-btn-color-primary) y en Filament 4
      los botones quedaban verde agua con texto oscuro. Un solo verde para toda la acción principal. ── */
.fi-btn.fi-color-primary {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
}
.fi-btn.fi-color-primary:hover { background-color: #115e59 !important; border-color: #115e59 !important; }
.fi-btn.fi-color-primary .fi-icon, .fi-btn.fi-color-primary svg { color: #ffffff !important; }
.fi-btn.fi-color-primary:disabled, .fi-btn.fi-color-primary[disabled] { opacity: 0.65; }
html.dark .fi-btn.fi-color-primary { background-color: #14b8a6 !important; border-color: #14b8a6 !important; color: #042f2e !important; }
html.dark .fi-btn.fi-color-primary:hover { background-color: #2dd4bf !important; border-color: #2dd4bf !important; }
html.dark .fi-btn.fi-color-primary .fi-icon, html.dark .fi-btn.fi-color-primary svg { color: #042f2e !important; }

/* ── Menú lateral: que los nombres entren enteros ── */
.fi-sidebar-item-btn, .fi-sidebar-item-button { padding-left: 0.625rem !important; padding-right: 0.4rem !important; }

/* ── Agenda: "Hoy" deshabilitado (ya estás en hoy) no debe parecer un botón roto ── */
.fc .fc-today-button:disabled { background: #ffffff !important; border-color: #e2e8f0 !important; color: #94a3b8 !important; opacity: 1 !important; box-shadow: none !important; }
html.dark .fc .fc-today-button:disabled { background: transparent !important; border-color: #3f3f46 !important; color: #71717a !important; }

/* ── Escritorio en celular: tarjetas de a dos, no una debajo de otra ── */
@media (max-width: 639.98px) {
    .fi-wi-stats-overview .fi-section-content.fi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.6rem !important; }
    .fi-wi-stats-overview .fi-wi-stats-overview-stat { padding: 0.85rem !important; }
    .fi-wi-stats-overview .fi-wi-stats-overview-stat-value { font-size: 1.35rem !important; line-height: 1.2 !important; }
    .fi-wi-stats-overview .fi-wi-stats-overview-stat-description { font-size: 0.72rem !important; }
}

/* ── Tablas: el tema sumaba relleno a la celda y Filament otro al contenido (filas de ~110 px). ── */
.fi-ta-cell { padding: 0.3rem 0.4rem !important; }
.fi-ta-header-cell { padding: 0.7rem 0.75rem !important; }

/* Agenda en celular: el encabezado va en columna y el ancho mínimo del título no debe volverse alto. */
@media (max-width: 767.98px) { .sanum-agenda-header__info { flex: 0 0 auto !important; } }

/* Sin franjas de color a la izquierda (pedido del dueño 18/11): notificaciones con borde parejo. */
.fi-notification { border-left: 1px solid #e2e8f0 !important; }
html.dark .fi-notification { border-left: 1px solid rgba(255, 255, 255, 0.1) !important; }

/* ── Agenda (día/semana): turnos legibles para cualquier edad ── */
.fc .fc-timegrid-slot { height: 2.15rem !important; }
.fc .fc-timegrid-slot-label { font-size: 0.75rem !important; color: #64748b !important; }
.fc .fc-v-event { padding: 0.15rem 0.4rem !important; }
.fc .fc-v-event:hover { transform: none !important; filter: brightness(1.06); }
.sanum-ev { display: flex; flex-direction: column; gap: 0; min-width: 0; color: #fff; line-height: 1.2; }
.sanum-ev__line { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.sanum-ev__time { flex: none; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sanum-ev__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; }
.sanum-ev__pro { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; opacity: 0.9; }
.sanum-pro-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 0.75rem; padding: 0.55rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 0.65rem; background: #fff; font-size: 0.8125rem; color: #334155; }
.sanum-pro-legend__title { font-weight: 700; color: #475569; margin-right: 0.25rem; }
.sanum-pro-legend__item { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.sanum-pro-legend__item i { width: 0.7rem; height: 0.7rem; border-radius: 0.2rem; flex: none; }
html.dark .sanum-pro-legend { background: #18181b; border-color: #27272a; color: #d4d4d8; }
html.dark .sanum-pro-legend__title { color: #a1a1aa; }
