/* Pagination must not be overridden by card or responsive display rules. */
[hidden] { display: none !important; }
.ux-pager {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: auto;
  margin: 18px 0 8px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid #dce7e7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.ux-pager-count { margin: 0; font-size: 13px; color: #52657c; line-height: 1.5; }
.ux-pager-controls { display: flex; align-items: center; gap: 10px; }
.ux-pager .ux-page-button { min-height: 44px; min-width: 88px; font-size: 14px; }
.ux-pager .ux-page-button:disabled { cursor: default; opacity: .45; transform: none; }
.ux-pager .ux-page-button:focus-visible { outline: 3px solid #0d9488; outline-offset: 3px; }
[data-filter-group] [data-search] { scroll-margin-top: 90px; }
.editor-toolbar {
  position: sticky;
  top: var(--ux-header-offset, 82px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  margin: 12px 0 18px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dce7e7;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(30, 58, 95, .08);
}
.editor-toolbar > .btn { width: auto; min-height: 44px; flex: 0 1 auto; }
.editor-toolbar > [data-form-error] { flex: 1 1 180px; margin: 0; font-size: 13px; }
.editor-toolbar > [data-form-error]:empty { display: none; }
.ime-open .editor-toolbar { position: static; }
@media (max-width: 380px) {
  .ux-pager { flex-direction: column; align-items: stretch; }
  .ux-pager-controls { justify-content: space-between; }
}
.calendar-view-switch { margin: 14px 0; }
.calendar-view-switch [aria-pressed="true"] { background:#0d9488;color:#fff;border-color:#0d9488; }
.schedule-month-view [data-agenda-day], .schedule-month-view > .ux-pager, .schedule-month-view > [data-filter-empty] { display:none !important; }
.calendar-month-controls { display:flex;gap:10px;align-items:center;justify-content:space-between; }
.calendar-month-controls .field { min-width:0;margin:0;flex:1; }
.calendar-month-controls .btn { min-width:44px;font-size:24px; }
.month-grid { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px; }
.month-weekday { text-align:center;font-size:12px;font-weight:700;padding:10px 0;color:#52657c; }
.month-cell { min-width:0;min-height:106px;border:1px solid #dde8e8;border-radius:9px;background:#fff;overflow:hidden; }
.month-cell.outside { background:#f4f7f8;border-color:transparent; }
.month-cell.today { border-color:#0d9488;background:#f0fdfa; }
.month-cell.selected { outline:2px solid #0d9488;outline-offset:-2px; }
.month-day { width:100%;min-height:44px;border:0;background:transparent;color:#1e3a5f;cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2px;padding:5px; }
.day-count { font-size:10px;color:#0d9488; }
.month-cell-events .calendar-event { font-size:10px;padding:4px;margin:2px;width:calc(100% - 4px);border-radius:4px;min-height:40px; }
.month-cell-events .calendar-event small { display:none; }
.calendar-event { display:flex;flex-direction:column;gap:4px;border:1px solid #b9dedb;background:#edf9f6;color:#1e3a5f;border-radius:12px;text-align:left;padding:12px;cursor:pointer;overflow-wrap:anywhere;width:100%;margin-bottom:10px; }
.calendar-event.cancelled { background:#fff7ed;border-color:#f4d5af; }
.calendar-event.makeup { background:#eef3ff;border-color:#cbd9f5; }
.calendar-event small { color:#52657c; }
.month-more { border:0;background:transparent;color:#0d9488;font-size:11px;min-height:30px;width:100%;cursor:pointer; }
.calendar-day-detail { margin-top:20px; }
.month-day:focus-visible,.calendar-event:focus-visible { outline:3px solid #d97706;outline-offset:-3px; }
@media(max-width:600px){ .month-cell { min-height:62px; } .month-day { flex-direction:column;justify-content:center;min-height:60px; } .month-cell-events { display:none; } .month-grid { gap:3px; } .month-calendar { padding:12px; } }

/* Keep the month board in the first desktop viewport; secondary filters stay discoverable. */
.agenda-filters { padding:16px; }
.agenda-filters > .search { margin-top:0; }
.agenda-filters > .actions { margin-top:12px; }
.schedule-filter-details { margin-top:10px; }
.schedule-filter-details > summary { cursor:pointer;min-height:44px;align-content:center;font-weight:600;color:#087f78; }
.schedule-filter-details > summary:focus-visible { outline:3px solid #d97706;outline-offset:3px; }
.schedule-filter-details .field { margin:6px 0; }
[data-active-schedule-filters] { font-size:12px;color:#52657c; }
@media(min-width:1000px) {
 main[data-screen="schedule"] { max-width:1360px;padding:20px 32px 120px; }
 main[data-screen="schedule"] > .demo { margin-bottom:12px; }
 main[data-screen="schedule"] .heading { margin:14px 0 10px; }
 main[data-screen="schedule"] .calendar-view-switch { margin:10px 0; }
 .agenda-filters { display:grid;grid-template-columns:minmax(260px,1fr) auto auto;align-items:center;gap:12px;padding:12px 16px; }
 .agenda-filters > .actions { margin:0; }
 .schedule-filter-details { margin:0; }
 .schedule-filter-details[open] { grid-column:1/-1;grid-row:2; }
 .schedule-filter-details .material-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .month-calendar { padding:18px; }
 .calendar-month-controls { max-width:520px; }
 .month-cell { min-height:112px; }
 .month-cell-events .calendar-event { font-size:12px;padding:5px 8px;min-height:44px; }
 .month-cell-events .calendar-event small { display:block;font-size:10px; }
 .calendar-day-detail { border-top:1px solid #dce7e7;padding-top:14px; }
}

@media(min-width:1000px){body:has(main[data-screen="schedule"]) .top {padding-left:max(32px,calc((100vw - 1296px)/2));padding-right:max(32px,calc((100vw - 1296px)/2));}}

/* Keep search clearing reachable by touch without resetting other filters. */
.ux-search-field { position:relative;min-width:0;width:100%; }
.ux-search-field > input.search { width:100%;padding-right:52px;box-sizing:border-box; }
.ux-search-clear { position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:#52657c;font-size:24px;cursor:pointer; }
.ux-search-clear:hover { background:#e6f5f2; }
.ux-search-clear:focus-visible { outline:3px solid #0d9488;outline-offset:-3px; }
.agenda-filters > .ux-search-field > .search { margin-top:0; }

.language-setting{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 18px;font-weight:600}.language-switch{display:flex;align-items:center;gap:10px;font-size:13px}.language-switch [role=switch]{min-height:32px;height:32px;width:58px;border:0;border-radius:20px;background:#64748b;padding:4px;position:relative;cursor:pointer}.language-switch [role=switch]>span{display:block;width:24px;height:24px;border-radius:50%;background:#fff;transition:transform .18s}.language-switch [aria-checked=true]{background:#0d9488}.language-switch [aria-checked=true]>span{transform:translateX(26px)}.language-switch [role=switch]:focus-visible{outline:3px solid #d97706;outline-offset:4px}@media(prefers-reduced-motion:reduce){.language-switch [role=switch]>span{transition:none}}
