/* 📅 Mi agenda médica del veterinario (public/mis-citas-vet.html), Etapa V3B del rediseño de Veterinarios. Prefijo `mav-`. Usa los tokens de /css/petia-tokens.css; cada var() trae su valor de respaldo.
   Solo muestra lo que el producto ya hace: citas (pendiente/aceptada), aviso de Google Calendar, recordatorios y «Nueva cita» (plan CRM). */

.mav-cuerpo { background: var(--petia-surface, #FCFBFF); color: var(--petia-text, #151A37); }
.mav-cuerpo h1, .mav-cuerpo h2, .mav-cuerpo h3 { font-family: var(--petia-fuente-titulo, 'Poppins', sans-serif); }
#contenido :focus-visible, #panelCita :focus-visible, #modalReagendar :focus-visible, #modalCrearCita :focus-visible { outline: 3px solid var(--petia-primary, #6E49F6); outline-offset: 2px; }
.mav-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ───────────── Encabezado ───────────── */
.mav-ojo { margin: 0 0 6px 0; color: var(--petia-primary-hover, #5A36E0); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mav-h1 { margin: 0; font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; color: var(--petia-text, #151A37); }
.mav-sub { margin: 8px 0 0 0; color: var(--petia-text-muted, #5C6078); font-size: 16px; }
.mav-fecha { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 14px; background: #fff; color: var(--petia-text-muted, #5C6078); font-size: 14px; font-weight: 500; }

/* ───────────── Botones comunes ───────────── */
.mav-boton-linea { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--petia-primary, #6E49F6); border-radius: 12px; background: #fff; color: var(--petia-primary-hover, #5A36E0); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.mav-boton-linea:hover { background: var(--petia-selected, #F7F4FF); }
.mav-boton-primario { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1.5px solid var(--petia-primary, #6E49F6); border-radius: 12px; background: var(--petia-primary, #6E49F6); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.mav-boton-primario:hover { background: var(--petia-primary-hover, #5A36E0); border-color: var(--petia-primary-hover, #5A36E0); }
.mav-panel-titulo { color: var(--petia-primary-hover, #5A36E0); }
.mav-cerrar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--petia-text-muted, #5C6078); font-size: 28px; line-height: 1; cursor: pointer; }
.mav-cerrar:hover { background: var(--petia-selected, #F7F4FF); color: var(--petia-text, #151A37); }

/* ───────────── Avisos (Google Calendar y recordatorios) ───────────── */
.mav-aviso { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 16px 20px; border: 1px solid #D9CCFF; border-radius: 18px; background: var(--petia-surface-tint, #EDE7FF); }
.mav-aviso-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--petia-primary-hover, #5A36E0); }
.mav-aviso-texto { flex: 1 1 260px; min-width: 0; }
.mav-aviso-t { margin: 0; font-size: 15px; font-weight: 700; color: var(--petia-text, #151A37); }
.mav-aviso-d { margin: 2px 0 0 0; font-size: 14px; color: var(--petia-text-muted, #5C6078); }
.mav-recordatorios { margin-bottom: 20px; padding: 16px 20px; border: 1px solid #D9CCFF; border-radius: 18px; background: var(--petia-selected, #F7F4FF); }
.mav-recordatorios-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.mav-recordatorios-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mav-recordatorio { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 12px; background: #fff; }
.mav-recordatorio p { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mav-recordatorio button { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid #B6E3C8; border-radius: 10px; background: #E6F6EC; color: #146C3E; font-size: 13px; font-weight: 700; cursor: pointer; }

/* ───────────── Cuerpo: calendario + lateral ───────────── */
.mav-cuerpo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.mav-calendario { min-width: 0; padding: 20px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 20px; background: #fff; box-shadow: var(--petia-sombra-tarjeta, 0 10px 30px rgba(21, 26, 55, .06)); }
.mav-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mav-barra-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mav-btn-icono, .mav-btn-texto { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 12px; background: #fff; color: var(--petia-text, #151A37); font-weight: 600; cursor: pointer; }
.mav-btn-icono { width: 44px; font-size: 22px; }
.mav-btn-texto { padding: 0 16px; font-size: 14px; }
.mav-btn-icono:hover, .mav-btn-texto:hover { background: var(--petia-selected, #F7F4FF); }
.mav-fecha-input { min-height: 44px; padding: 0 12px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 12px; background: #fff; color: var(--petia-text, #151A37); font-size: 14px; }
.mav-filtro-equipo { flex: 1 1 auto; min-width: 0; }   /* Equipo: el filtro por profesional ocupará este espacio (hoy está oculto) */
.mav-vistas { display: inline-flex; flex-wrap: wrap; padding: 4px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 999px; background: var(--petia-selected, #F7F4FF); }
.mav-vista { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--petia-text-muted, #5C6078); font-size: 14px; font-weight: 600; cursor: pointer; }
.mav-vista[aria-pressed="true"] { background: var(--petia-primary, #6E49F6); color: #fff; }
.mav-rango { margin: 0 0 12px 0; font-family: var(--petia-fuente-titulo, 'Poppins', sans-serif); font-size: 18px; font-weight: 700; color: var(--petia-text, #151A37); }
.mav-tira { display: flex; gap: 4px; margin-bottom: 12px; padding-bottom: 4px; overflow-x: auto; }
.mav-tira button { flex: none; width: 48px; min-height: 52px; padding: 6px 0; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 12px; background: #fff; color: var(--petia-text, #151A37); text-align: center; cursor: pointer; }
.mav-tira button[aria-current="date"] { background: var(--petia-primary, #6E49F6); border-color: var(--petia-primary, #6E49F6); color: #fff; }
.mav-tira-dia { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.mav-tira-num { display: block; font-size: 15px; font-weight: 700; }

/* FullCalendar: tokens y eventos */
#calendarioContenedor { overflow-x: auto; }
@media (max-width: 767px) { .vista-ancha .fc-view-harness { min-width: 720px; } }
.fc { --fc-border-color: var(--petia-border, #E6E2F3); --fc-today-bg-color: #FFF8E6; --fc-now-indicator-color: var(--petia-error, #E5484D); --fc-page-bg-color: #fff; --fc-neutral-bg-color: var(--petia-surface, #FCFBFF); --fc-list-event-hover-bg-color: var(--petia-selected, #F7F4FF); font-family: var(--petia-fuente, 'Inter', sans-serif); }
.fc .fc-toolbar { display: none; }
.fc .fc-col-header-cell { padding: 8px 0; background: var(--petia-surface, #FCFBFF); }
.fc .fc-col-header-cell-cushion { color: var(--petia-text-muted, #5C6078); font-size: 11.5px; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.fc .fc-timegrid-slot-label-cushion, .fc .fc-daygrid-day-number { color: var(--petia-text-muted, #5C6078); font-size: 12px; font-weight: 500; text-decoration: none; }
.fc .fc-timegrid-slot { height: 2.75rem; }
.fc .fc-timegrid-axis-cushion { color: var(--petia-text-muted, #5C6078); font-size: 12px; }
.fc .fc-list-event-title a, .fc .fc-list-event-time { font-size: 13.5px; }
.fc .fc-event { cursor: pointer; border: 0; border-left: 3px solid var(--petia-border, #E6E2F3); border-radius: 8px; padding: 0; font-size: 12px; overflow: hidden; }
.fc .fc-event:focus-visible { outline: 3px solid var(--petia-primary, #6E49F6); outline-offset: 1px; }
.fc .mav-ev-aceptada { background: #E6F6EC; color: #124F2F; border-left-color: var(--petia-success, #2E9E6A); }
.fc .mav-ev-pendiente { background: #FFF1D6; color: #5E3A00; border-left-color: var(--petia-warning, #B7791F); }
.fc .fc-event .fc-event-main { color: inherit; }   /* FullCalendar pinta el texto de un evento en blanco: aquí cada estado trae su propio color */
.fc .mav-ev-google { background: #F3F4F6; color: #374151; border-left-color: #9CA3AF; cursor: default; }
.mav-ev { display: flex; align-items: flex-start; gap: 6px; padding: 4px 6px; min-width: 0; }
.mav-ev-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .75); font-size: 12px; font-weight: 700; }
.mav-ev-texto { min-width: 0; overflow: hidden; line-height: 1.25; }
.mav-ev-hora { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-timeGridWeek-view .mav-ev-avatar { display: none; }   /* en la semana las columnas son angostas: sin inicial */
.mav-ev-nombre { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.mav-ev-motivo { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.fc-daygrid-event .mav-ev { padding: 1px 4px; }
.fc-daygrid-event .mav-ev-avatar, .fc-daygrid-event .mav-ev-motivo { display: none; }

/* ───────────── Lateral ───────────── */
.mav-lateral { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mav-tarjeta { padding: 20px; border: 1px solid var(--petia-border, #E6E2F3); border-radius: 20px; background: #fff; box-shadow: var(--petia-sombra-tarjeta, 0 10px 30px rgba(21, 26, 55, .06)); }
.mav-tarjeta-t { margin: 0 0 14px 0; font-size: 18px; font-weight: 700; }
.mav-tarjeta-t-sec { font-size: 15px; }
.mav-estado { margin: 0; padding: 8px 0; color: var(--petia-text-muted, #5C6078); font-size: 14px; }
.mav-vacio { display: flex; flex-direction: column; gap: 4px; margin: 0; color: var(--petia-text-muted, #5C6078); font-size: 14px; }
.mav-prox { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.mav-prox-cab { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mav-prox-avatar { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--petia-accent-soft, #FFDDE7); font-family: var(--petia-fuente-titulo, 'Poppins', sans-serif); font-size: 30px; font-weight: 700; }
.mav-prox-nombre { margin: 0; overflow-wrap: anywhere; font-size: 20px; font-weight: 700; }
.mav-prox-motivo { margin: 0; overflow-wrap: anywhere; color: var(--petia-text-muted, #5C6078); font-size: 14px; }
.mav-pildora { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.mav-pildora-aceptada { background: #E6F6EC; color: #146C3E; }
.mav-pildora-pendiente { background: #FFF1D6; color: #7A4B00; }
.mav-prox-datos { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mav-prox-datos li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.mav-prox-datos svg { flex: none; margin-top: 1px; color: var(--petia-primary-hover, #5A36E0); }
.mav-prox-datos span { min-width: 0; overflow-wrap: anywhere; }
.mav-acciones { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mav-accion { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--petia-text, #151A37); font-size: 14.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.mav-accion:hover { background: var(--petia-selected, #F7F4FF); }
.mav-accion-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--petia-surface-tint, #EDE7FF); color: var(--petia-primary-hover, #5A36E0); }

/* ───────────── Campos de los diálogos ───────────── */
.campo-agenda { width: 100%; min-height: 44px; padding: .625rem; background: #f9fafb; border: 1px solid #d1d5db; border-radius: .75rem; font-size: .875rem; }
.campo-agenda::placeholder { color: var(--petia-placeholder, #6B6E85); }
.mav-mini { min-height: 44px; padding: 0 8px; }
.campo-agenda:focus { outline: 3px solid var(--petia-primary, #6E49F6); outline-offset: 1px; }
.err-agenda { font-size: .8125rem; color: var(--petia-error-text, #C8242B); margin-top: .25rem; }

/* ───────────── Pantallas medianas y celular ───────────── */
@media (max-width: 1100px) {
    /* una sola columna, en el MISMO orden del documento (el teclado y el lector recorren lo que se ve): calendario, «Próxima cita» y «Acciones rápidas» */
    .mav-cuerpo-grid { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
}
@media (max-width: 767px) {
    .mav-aviso { flex-direction: column; align-items: stretch; gap: 12px; }
    .mav-aviso-ico { width: 40px; height: 40px; }
    .mav-aviso-texto { flex: 0 1 auto; }
    .mav-calendario { padding: 14px; }
    .mav-vistas { width: 100%; justify-content: stretch; }
    .mav-vista { flex: 1 1 0; padding: 0 8px; }
    .mav-prox-cab { flex-direction: row; text-align: left; }
}
@media (forced-colors: active) {
    .mav-vista[aria-pressed="true"], .mav-tira button[aria-current="date"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
@media (prefers-reduced-motion: reduce) { .mav-cuerpo * { transition: none !important; animation: none !important; } }
