// ============================================================
//  DARK MODE — FullCalendar
//  fullcalendar-modern.css define variables --fc-* en :root;
//  redefinirlas acá (especificidad :root[data-theme] > :root)
//  invierte casi todo el calendario de una. Después van los
//  literales sueltos y los textos que usaban --fc-white sobre
//  fondos de color (que NO deben oscurecerse).
//  Solo pantalla: al imprimir sale siempre el tema claro.
// ============================================================

@media screen {
:root[data-theme="dark"] {
  // Escala INVERTIDA: 50-300 eran superficies claras; 600-800 textos oscuros.
  --fc-white: var(--dm-surface);
  --fc-gray-50: var(--dm-surface-2);
  --fc-gray-100: #2a313c;
  --fc-gray-200: var(--dm-border);
  --fc-gray-300: #3e4756;
  --fc-gray-400: #566073;
  --fc-gray-500: var(--dm-muted);
  --fc-gray-600: #b6c0cd;
  --fc-gray-700: #cfd6e0;
  --fc-gray-800: var(--dm-text);
  --fc-shadow: 0 4px 20px rgba(0, 0, 0, .5);
  --fc-shadow-hover: 0 8px 30px rgba(0, 0, 0, .6);

  // Variables propias de la lib @fullcalendar v6 (CSS inyectado por JS)
  --fc-page-bg-color: var(--dm-bg);
  --fc-border-color: var(--dm-border);
  --fc-neutral-bg-color: var(--dm-surface-2);
  --fc-neutral-text-color: var(--dm-muted);
  --fc-list-event-hover-bg-color: var(--dm-surface-2);
  --fc-today-bg-color: rgba(37, 99, 235, .12);

  // ── Textos que usaban --fc-white sobre fondos de COLOR (siguen blancos) ──
  .fc-toolbar-title { color: #fff !important; }
  .fc-button, .fc-button-group .fc-button { color: #fff !important; }
  .fc-button:hover, .fc-button:focus { color: #fff !important; }
  .fc-day-today .fc-daygrid-day-number { color: #fff !important; }
  .taxes-modal-modern .modal-header { color: #fff !important; }

  // ── Literales claros fuera de variables ──
  .fc-day-other { background: var(--dm-bg) !important; }
  .fc-daygrid-day-number:hover { background: rgba(37, 99, 235, .18) !important; }
  .taxes-calendar-header {
    // shorthand: gradiente #eff6ff→gray-50
    background: var(--dm-surface-2) !important;
    border-bottom-color: var(--dm-border) !important;
  }
  .taxes-modal-modern .modal-body { background: var(--dm-surface) !important; }
  .taxes-modal-modern .modal-footer { background: var(--dm-surface) !important; border-color: var(--dm-border) !important; }
  .taxes-input-modern, .taxes-color-picker {
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
  }
}
} // fin @media screen
