/* ── PALLETS STYLES: SCHEDULE ── build 1001 */

.sch-module {
  display: flex; flex-direction: column; height: 100%;
  background: var(--ws-bg); color: var(--text-on-ws);
  position: relative; overflow: hidden;
}

/* Header */
.sch-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1.5rem; border-bottom: 1px solid var(--ws-border);
  flex-shrink: 0; background: var(--ws-surface);
}
.sch-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  color: var(--text-on-ws);
}
.sch-subtitle { font-size: 11px; color: var(--text-on-ws-2); margin-top: 2px; }
.sch-header-right { display: flex; gap: 0.5rem; }

/* Body — horizontal scroll strip board + right pool */
.sch-body {
  display: flex; flex: 1; overflow: hidden;
}

/* Strip board — horizontal scroll */
.sch-strip-board {
  flex: 1; overflow-x: auto; overflow-y: hidden;
  display: flex; align-items: stretch;
  padding: 1rem; gap: 0.75rem;
  min-width: 0;
}

/* Unscheduled pool — right side */
.sch-unscheduled-pool {
  width: 200px; flex-shrink: 0;
  border-left: 1px solid var(--ws-border);
  display: flex; flex-direction: column;
  background: var(--ws-surface);
}
.sch-pool-header {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-on-ws-2);
  padding: 0.75rem 1rem 0.5rem; border-bottom: 1px solid var(--ws-border);
  flex-shrink: 0;
}
.sch-pool-scenes {
  flex: 1; overflow-y: auto; padding: 0.5rem;
  display: flex; flex-direction: column; gap: 0.375rem;
}
.sch-pool-empty {
  font-size: 11px; color: var(--text-on-ws-2);
  font-style: italic; padding: 0.75rem 0.5rem;
}

/* Day column */
.sch-day-col {
  width: 180px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--ws-surface); border: 1px solid var(--ws-border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: border-color var(--transition-fast);
}
.sch-day-col.drag-over { border-color: var(--accent); }

.sch-day-header {
  padding: 0.75rem; border-bottom: 1px solid var(--ws-border);
  cursor: pointer; background: var(--ws-bg);
  transition: background var(--transition-fast);
}
.sch-day-header:hover { background: rgba(240,95,0,0.04); }
.sch-day-number {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-text);
}
.sch-day-date { font-size: 12px; font-weight: 600; color: var(--text-on-ws); margin-top: 1px; }
.sch-day-call { font-size: 11px; color: var(--text-on-ws-2); margin-top: 1px; }
.sch-day-pages {
  font-size: 10px; font-weight: 700; color: var(--text-on-ws-2);
  margin-top: 0.375rem;
}

.sch-day-scenes {
  flex: 1; overflow-y: auto;
  padding: 0.375rem; display: flex; flex-direction: column; gap: 0.25rem;
  min-height: 80px;
}
.sch-drop-hint {
  font-size: 11px; color: var(--text-on-ws-2); font-style: italic;
  padding: 0.75rem 0.5rem; text-align: center;
}

/* Scene strips */
.sch-scene-strip, .sch-pool-strip {
  display: flex; border-radius: var(--radius-sm);
  border: 1px solid var(--ws-border); background: var(--ws-bg);
  overflow: hidden; cursor: grab; position: relative;
  transition: box-shadow var(--transition-fast), opacity var(--transition-fast);
}
.sch-scene-strip:active, .sch-pool-strip:active { cursor: grabbing; }
.sch-scene-strip.dragging, .sch-pool-strip.dragging {
  opacity: 0.5; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sch-strip-accent { width: 3px; flex-shrink: 0; }
.sch-strip-body { padding: 0.375rem 0.5rem; flex: 1; min-width: 0; }
.sch-strip-top {
  display: flex; align-items: baseline; gap: 0.375rem;
}
.sch-strip-num {
  font-size: 11px; font-weight: 700; color: var(--text-on-ws);
}
.sch-strip-intext { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; }
.sch-strip-pages { font-size: 9px; color: var(--text-on-ws-2); margin-left: auto; }
.sch-strip-location {
  font-size: 10px; color: var(--text-on-ws-2); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sch-strip-remove {
  position: absolute; top: 2px; right: 2px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text-on-ws-2); padding: 0; line-height: 1;
  opacity: 0; transition: opacity var(--transition-fast);
}
.sch-scene-strip:hover .sch-strip-remove { opacity: 1; }

/* Empty state */
.sch-empty {
  font-size: 13px; color: var(--text-on-ws-2); text-align: center;
  padding: 3rem 2rem; width: 100%;
}

/* Day detail panel — dark modal, slides in from right */
.sch-day-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 340px;
  background: var(--shell-bg); color: var(--text-on-shell);
  border-left: 1px solid rgba(255,255,255,0.08);
  transform: translateX(100%); transition: transform 0.2s ease;
  z-index: 200; display: flex; flex-direction: column; overflow: hidden;
}
.sch-day-panel.open { transform: translateX(0); }

.sch-day-panel-backdrop {
  position: absolute; inset: 0; z-index: 199;
  display: none;
}
.sch-day-panel-backdrop.open { display: block; }

.sch-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sch-panel-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  color: var(--text-on-shell);
}
.sch-panel-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text-on-shell-2); padding: 0; line-height: 1;
}
.sch-panel-close:hover { color: var(--text-on-shell); }

.sch-panel-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }

.sch-panel-section { margin-bottom: 1.25rem; }
.sch-panel-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(245,239,230,0.45);
  margin-bottom: 0.375rem;
}
.sch-panel-input {
  width: 100%; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm);
  color: var(--text-on-shell); font-family: var(--font-ui); font-size: 13px;
  padding: 0.5rem 0.75rem; color-scheme: dark;
}
.sch-panel-input:focus { outline: none; border-color: var(--accent); }
.sch-panel-textarea {
  width: 100%; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm);
  color: var(--text-on-shell); font-family: var(--font-ui); font-size: 13px;
  padding: 0.5rem 0.75rem; min-height: 72px; resize: vertical;
}
.sch-panel-textarea:focus { outline: none; border-color: var(--accent); }

.sch-panel-scene-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 12px; color: var(--text-on-shell);
}
.sch-panel-scene-loc { flex: 1; color: rgba(245,239,230,0.55); font-size: 11px; }

/* Call times list */
.sch-call-list { display: flex; flex-direction: column; gap: 0.375rem; }
.sch-call-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.5rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
}
.sch-call-row.has-call { background: rgba(240,95,0,0.08); }
.sch-call-name { font-size: 12px; font-weight: 600; color: var(--text-on-shell); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-call-role { font-size: 10px; color: rgba(245,239,230,0.45); white-space: nowrap; }
.sch-call-input {
  width: 80px; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); color: var(--text-on-shell);
  font-family: var(--font-ui); font-size: 11px; padding: 3px 6px;
  color-scheme: dark; text-align: center;
}

.sch-panel-danger { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); }

/* Buttons */
.sch-btn {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 0.5rem 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid var(--ws-border); background: var(--ws-surface);
  color: var(--text-on-ws); cursor: pointer;
  transition: all var(--transition-fast);
}
.sch-btn.accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.sch-btn.accent:hover { background: #d45200; border-color: #d45200; }
.sch-btn.danger {
  background: none; border-color: rgba(192,57,43,0.3); color: #c0392b;
  width: 100%;
}
.sch-btn.danger:hover { background: rgba(192,57,43,0.08); }
