/* Calendar */
.calendar-list { 
  display:flex; 
  flex-direction:column; 
  gap:0.5rem; 
  font-family: system-ui, -apple-system, sans-serif;
  max-height: 28rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.calendar-list::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}
.calendar-item {
  display:flex; align-items:flex-start; gap:0.75rem;
  background:rgba(255,255,255,0.05); border-radius:0.75rem; padding:0.75rem;
  border-left:3px solid rgba(168,85,247,0.6);
  transition: background 0.2s;
}
.calendar-item:hover { background:rgba(255,255,255,0.08); }
.calendar-item.past { border-left-color: rgba(56,189,248,0.6); }
.calendar-item.past .calendar-day,
.calendar-item.past .calendar-hour,
.calendar-item.past .calendar-all-day { color: #7dd3fc; font-family: system-ui, -apple-system, sans-serif; }
.calendar-item.today { border-left-color: rgba(168,85,247,0.6); }
.calendar-item.today .calendar-day,
.calendar-item.today .calendar-hour,
.calendar-item.today .calendar-all-day { color: #c4b5fd; font-family: system-ui, -apple-system, sans-serif; }
.calendar-item.soon { border-left-color: rgba(251,191,36,0.6); }
.calendar-item.soon .calendar-day,
.calendar-item.soon .calendar-hour,
.calendar-item.soon .calendar-all-day { color: #fcd34d; font-family: system-ui, -apple-system, sans-serif; }
.calendar-item.future { border-left-color: rgba(239,68,68,0.6); }
.calendar-item.future .calendar-day,
.calendar-item.future .calendar-hour,
.calendar-item.future .calendar-all-day { color: #fda4af; font-family: system-ui, -apple-system, sans-serif; }
.calendar-time {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-width:3.5rem; text-align:center; flex-shrink:0;
}
.calendar-day { font-size:0.625rem; color:rgba(255,255,255,0.5); text-transform:uppercase; font-weight:700; }
.calendar-hour { font-size:0.875rem; font-weight:700; color:#c4b5fd; font-variant-numeric:tabular-nums; }
.calendar-all-day { font-size:0.625rem; color:rgba(168,85,247,0.8); text-transform:uppercase; font-weight:600; }
.calendar-body { flex:1; min-width:0; }
.calendar-title { font-size:0.875rem; font-weight:600; color:#fff; line-height:1.3; }
.calendar-desc { font-size:0.75rem; color:rgba(255,255,255,0.6); margin-top:0.25rem; line-height:1.4; }
.calendar-desc:empty { display:none; }
.calendar-location { display:flex; align-items:center; gap:0.375rem; font-size:0.75rem; color:rgba(255,255,255,0.5); margin-top:0.25rem; }
.calendar-location i { color:#7dd3fc; font-size:0.625rem; }

/* EJP */
.ejp-status { font-size:1.5rem; font-weight:700; text-align:center; line-height:1.2; }
.ejp-label { font-size:0.75rem; color:rgba(255,255,255,0.5); text-align:center; margin-top:0.5rem; }
.ejp-status.ejp-yes { color:#fda4af; }
.ejp-status.ejp-no { color:#6ee7b7; }
.ejp-status.ejp-off { color:rgba(255,255,255,0.4); }

/* Holidays */
.holiday-row { display:flex; align-items:center; gap:0.75rem; }
.holiday-flag { font-size:1.25rem; }

/* Tabac badge */
.tabac-badge {
  display:inline-flex; align-items:center;
  background:rgba(244,63,94,0.15); color:#fda4af;
  border:1px solid rgba(244,63,94,0.3);
  border-radius:9999px; padding:0.125rem 0.5rem;
  font-size:0.75rem; font-weight:600;
  margin-left:0.5rem;
}

/* Theme light overrides */
body.theme-light .calendar-item { background: rgba(0,0,0,0.06); border-left-color: transparent; }
body.theme-light .calendar-item:hover { background: rgba(0,0,0,0.09); }
body.theme-light .calendar-item.past { border-left-color: rgba(14,165,233,0.8); }
body.theme-light .calendar-item.past .calendar-day,
body.theme-light .calendar-item.past .calendar-hour,
body.theme-light .calendar-item.past .calendar-all-day { color: #0369a1; }
body.theme-light .calendar-item.today { border-left-color: rgba(126,34,206,0.7); }
body.theme-light .calendar-item.today .calendar-day,
body.theme-light .calendar-item.today .calendar-hour,
body.theme-light .calendar-item.today .calendar-all-day { color: #6b21a8; }
body.theme-light .calendar-item.soon { border-left-color: rgba(202,138,4,0.8); }
body.theme-light .calendar-item.soon .calendar-day,
body.theme-light .calendar-item.soon .calendar-hour,
body.theme-light .calendar-item.soon .calendar-all-day { color: #a16207; }
body.theme-light .calendar-item.future { border-left-color: rgba(225,29,72,0.7); }
body.theme-light .calendar-item.future .calendar-day,
body.theme-light .calendar-item.future .calendar-hour,
body.theme-light .calendar-item.future .calendar-all-day { color: #be123c; }
body.theme-light .calendar-day { color: rgba(0,0,0,0.65); }
body.theme-light .calendar-title { color: #0f172a; }
body.theme-light .calendar-desc { color: rgba(0,0,0,0.65); }
body.theme-light .calendar-location { color: rgba(0,0,0,0.65); }
body.theme-light .calendar-location i { color: #0369a1; }
body.theme-light .ejp-label { color: rgba(0,0,0,0.65); }
body.theme-light .ejp-status.ejp-yes { color: #be123c; }
body.theme-light .ejp-status.ejp-no { color: #047857; }
body.theme-light .ejp-status.ejp-off { color: rgba(0,0,0,0.55); }
body.theme-light .holiday-row { color: #0f172a; }
body.theme-light .tabac-badge {
  background: rgba(244,63,94,0.1);
  border-color: rgba(244,63,94,0.25);
  color: #9f1239;
}

/* EJP history modal */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  padding: 1rem;
}
.modal-content {
  position: relative; width: 100%; max-width: 28rem; max-height: 80vh;
  background: rgba(15,23,42,0.95); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem; padding: 1.25rem; overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: transparent; border: none;
  color: rgba(255,255,255,0.6); font-size: 1.5rem;
  line-height: 1; cursor: pointer;
}
.modal-title {
  font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; color: #fff;
}
.modal-title i { color: #fcd34d; margin-right: 0.5rem; }
.modal-loader { display: flex; justify-content: center; padding: 2rem; }
.modal-empty { text-align: center; color: rgba(255,255,255,0.5); padding: 2rem 0; }
.modal-summary { text-align: center; font-size: 0.875rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.modal-list { display: flex; flex-direction: column; gap: 0.5rem; }
.modal-day {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.05); border-radius: 0.5rem;
  padding: 0.625rem 0.875rem; font-size: 0.875rem; color: #fff;
}
.modal-day i { color: #fcd34d; }

body.theme-light .modal { background: rgba(0,0,0,0.5); }
body.theme-light .modal-content { background: #fff; border-color: rgba(0,0,0,0.1); }
body.theme-light .modal-title { color: #0f172a; }
body.theme-light .modal-close { color: rgba(0,0,0,0.5); }
body.theme-light .modal-empty { color: rgba(0,0,0,0.6); }
body.theme-light .modal-summary { color: rgba(0,0,0,0.6); }
body.theme-light .modal-day { background: rgba(0,0,0,0.06); color: #0f172a; }
