/**
 * OSMDentis — Schedule page
 * Two-column calendar grid, modal, filters, day tabs.
 *
 * events-common.css is enqueued as a dependency via OSM_PAGE_CSS_IMPORTS
 * (includes/page-styles.php) — do not @import it here, or it bypasses the
 * filemtime() cache-buster.
 */

.osm-sch {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
}

.osm-sch__controls {
  display: flex; gap: 12px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.osm-sch__tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.osm-sch__tab {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 12px;
  cursor: pointer;
  transition: all .18s ease;
}
.osm-sch__tab:hover { color: rgba(255,255,255,0.85); }
.osm-sch__tab.is-active {
  background: #669bbc; color: #fff; border-color: #669bbc;
}
.osm-sch__filters { display: flex; gap: 6px; }
.osm-sch__filter {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.osm-sch__filter.is-active {
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}
.osm-sch__filter-dot { width: 7px; height: 7px; border-radius: 50%; }
.osm-sch__filter-dot--all { background: linear-gradient(135deg,#669bbc 0,#669bbc 50%,#a885c8 50%,#a885c8 100%); }
.osm-sch__filter-dot--ws { background: #669bbc; }
.osm-sch__filter-dot--cf { background: #a885c8; }

.osm-sch-day { display: none; }
.osm-sch-day.is-active { display: block; }

/* Calendar grid */
.osm-sch-cal {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.osm-sch-cal__head {
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500; text-align: center;
}
.osm-sch-cal__head:first-child { border-left: none; background: transparent; }
.osm-sch-cal__head--ws { color: #7eb3d4; }
.osm-sch-cal__head--cf { color: #c5a9db; }

.osm-sch-cal__body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  position: relative;
}
.osm-sch-cal__time-col {
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.osm-sch-cal__hour {
  padding: 4px 10px 0 0;
  text-align: right;
  font-size: 10px; letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.40);
  border-top: 1px dashed rgba(255,255,255,0.05);
  position: relative;
}
.osm-sch-cal__hour:first-child { border-top: none; }
.osm-sch-cal__hour::after {
  content: '';
  position: absolute;
  left: 50%; right: 0;
  top: 40px;
  height: 1px;
  background: rgba(255,255,255,0.025);
}
.osm-sch-cal__col {
  position: relative;
  border-left: 1px solid rgba(255,255,255,0.06);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 39px,
    rgba(255,255,255,0.025) 39px, rgba(255,255,255,0.025) 40px,
    transparent 40px, transparent 79px,
    rgba(255,255,255,0.05) 79px, rgba(255,255,255,0.05) 80px
  );
  transition: opacity .25s ease, width .25s ease;
}

.osm-sch-block {
  position: absolute;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.osm-sch-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
  filter: brightness(1.1);
  z-index: 10;
}
.osm-sch-block--workshop {
  background: linear-gradient(135deg, rgba(102,155,188,0.28), rgba(102,155,188,0.12));
  border: 1px solid rgba(102,155,188,0.5);
  border-left: 3px solid #669bbc;
  color: #d1e3ef;
}
.osm-sch-block--conference {
  background: linear-gradient(135deg, rgba(168,133,200,0.28), rgba(168,133,200,0.12));
  border: 1px solid rgba(168,133,200,0.5);
  border-left: 3px solid #a885c8;
  color: #e1d4ec;
}
.osm-sch-block__time {
  font-size: 10px; letter-spacing: .06em;
  opacity: .78;
  font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
}
.osm-sch-block__title {
  font-size: 12px; font-weight: 500;
  color: #fff; line-height: 1.3;
  letter-spacing: -0.005em;
}
.osm-sch-block__speaker {
  font-size: 10px; opacity: .82;
  margin-top: 4px; color: #fff;
}

/* Filter: hide one column entirely */
.osm-sch.is-filter-ws .osm-sch-cal { grid-template-columns: 60px 1fr; }
.osm-sch.is-filter-ws .osm-sch-cal__body { grid-template-columns: 60px 1fr; }
.osm-sch.is-filter-ws .osm-sch-cal__head--cf,
.osm-sch.is-filter-ws .osm-sch-cal__col--cf { display: none; }

.osm-sch.is-filter-cf .osm-sch-cal { grid-template-columns: 60px 1fr; }
.osm-sch.is-filter-cf .osm-sch-cal__body { grid-template-columns: 60px 1fr; }
.osm-sch.is-filter-cf .osm-sch-cal__head--ws,
.osm-sch.is-filter-cf .osm-sch-cal__col--ws { display: none; }

/* Legend */
.osm-sch-legend {
  display: flex; gap: 16px; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,0.40);
  align-items: center;
  margin: 24px 4px 0;
}
.osm-sch-legend__item { display: inline-flex; align-items: center; gap: 7px; }
.osm-sch-legend__dot { width: 10px; height: 10px; border-radius: 3px; }
.osm-sch-legend__dot--ws { background: #669bbc; }
.osm-sch-legend__dot--cf { background: #a885c8; }
.osm-sch-legend__note { color: rgba(255,255,255,0.28); font-size: 10px; margin-left: auto; }

/* Mobile — horizontal scroll */
@media (max-width: 820px) {
  .osm-sch-cal {
    overflow-x: auto;
    overflow-y: hidden;
    grid-template-columns: 50px minmax(260px, 1fr) minmax(260px, 1fr);
    min-width: 100%;
  }
  .osm-sch-cal__body { grid-template-columns: 50px minmax(260px, 1fr) minmax(260px, 1fr); }
  .osm-sch-cal__head { padding: 10px 8px; font-size: 10px; }
  .osm-sch-cal__hour { font-size: 9px; }
  .osm-sch-block__title { font-size: 11px; }
  .osm-sch-block__speaker { font-size: 9px; }
}

/* ─── Modal ─── */
.osm-sch-modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(10,10,14,0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  padding: 20px;
}
.osm-sch-modal.is-open { display: flex; }
.osm-sch-modal__dialog {
  position: relative;
  width: 100%; max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1a1a1f 0%, #141418 100%);
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid #669bbc;
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.25),
    0 20px 48px rgba(0,0,0,0.5);
  animation: osm-modal-in .25s ease-out;
}
.osm-sch-modal.is-conference .osm-sch-modal__dialog { border-left-color: #a885c8; }
@keyframes osm-modal-in {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.osm-sch-modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.osm-sch-modal__close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.osm-sch-modal__eyebrow {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: #7eb3d4;
  margin-bottom: 8px;
}
.osm-sch-modal.is-conference .osm-sch-modal__eyebrow { color: #c5a9db; }
.osm-sch-modal__title {
  font-size: 20px; font-weight: 500;
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 14px;
  padding-right: 32px;
}
.osm-sch-modal__meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,0.60);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.osm-sch-modal__speakers {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px;
}
.osm-sch-modal__speaker {
  display: flex; align-items: center; gap: 10px;
}
.osm-sch-modal__speaker-img {
  width: 44px; height: 44px;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, #669bbc 0%, #2d5873 100%);
}
.osm-sch-modal__speaker-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 18%;
}
.osm-sch-modal__speaker-info { line-height: 1.3; }
.osm-sch-modal__speaker-name { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.95); }
.osm-sch-modal__speaker-role { font-size: 11px; color: rgba(255,255,255,0.60); }
.osm-sch-modal__desc {
  font-size: 13px; color: rgba(255,255,255,0.60);
  line-height: 1.55;
  margin: 0 0 18px;
}
.osm-sch-modal__footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.osm-sch-modal__price {
  font-size: 16px; font-weight: 500; color: rgba(255,255,255,0.95);
}
.osm-sch-modal__free {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .06em;
  color: #c5a9db;
  background: rgba(168,133,200,0.1);
  border: 1px solid rgba(168,133,200,0.3);
  padding: 4px 10px; border-radius: 100px;
}
.osm-sch-modal__cta {
  background: #669bbc; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 500;
  padding: 9px 18px; border-radius: 8px;
}
.osm-sch-modal__cta:hover { background: #5688a3; color: #fff; }
.osm-sch-modal__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px; color: #7eb3d4;
  text-decoration: none;
}

body.osm-modal-open { overflow: hidden; }
