/**
 * schedule.css — 행사 일정 페이지 전용 스타일
 * 【수정 방법】 타입별 색상은 .type-* 클래스와 .legend-dot-* 클래스를 함께 수정하세요.
 */

/* ── 요약 배너 ── */
.sched-summary-section {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-8) 0;
}
.sched-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.sched-summary-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sched-summary-icon { font-size: 1.6rem; flex-shrink: 0; }
.sched-summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.sched-summary-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

/* ── 전체 일정표 테이블 ── */
.sched-table-section { background: var(--color-background); }

.sched-table th:first-child { background: var(--color-primary-dark); width: 130px; }
.sched-table th { text-align: center; }

.sched-time-cell {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  white-space: nowrap;
  background: var(--color-primary-light);
}
.sched-content-cell {
  font-size: 0.88rem;
  color: var(--color-text-dark);
  padding: 0.85rem 1rem !important;
  vertical-align: middle;
}
.sched-cell-icon { margin-right: 0.3rem; }
.sched-empty { color: var(--color-text-light); }

/* 타입별 행 배경 (어두운 배경 위에서 WCAG AA 보장) */
.sched-content-cell.type-break    { background: var(--color-background); color: var(--color-text-light); }
.sched-content-cell.type-ceremony { background: rgba(255,213,79,0.08); }
.sched-content-cell.type-special  { background: rgba(255,143,0,0.08); }
.sched-content-cell.type-consult  { background: rgba(76,175,80,0.08); }
.sched-content-cell.type-event    { background: var(--color-primary-light); }

/* ── 타임라인 ── */
.sched-timeline-section { background: var(--color-surface); }

.sched-day-tabs {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}
.sched-day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: var(--space-4) var(--space-8);
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}
.sched-day-tab:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.sched-day-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #000;   /* 시안(#00d4ff) 배경 위에서 WCAG AA 통과 */
  box-shadow: var(--shadow-md);
}
.sched-tab-num {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.75;
}
.sched-day-tab.active .sched-tab-num { opacity: 1; color: rgba(0,0,0,0.65); }
.sched-tab-date { font-size: 1rem; font-weight: 800; }

.sched-timeline-wrap {
  max-width: 760px;
  margin-inline: auto;
}
.sched-timeline {
  display: flex;
  flex-direction: column;
}

/* 타임라인 아이템 */
.sched-tl-item {
  display: grid;
  grid-template-columns: 120px 48px 1fr;
  gap: 0;
  min-height: 72px;
}

/* 시간 열 */
.sched-tl-time {
  display: flex;
  align-items: flex-start;
  padding-top: 18px;
  padding-right: var(--space-4);
  text-align: right;
  justify-content: flex-end;
}
.sched-tl-time-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-light);
  white-space: nowrap;
  line-height: 1.4;
}

/* 커넥터 열 (도트 + 라인) */
.sched-tl-connector {
  position: relative;       /* 라인 absolute 기준점 */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sched-tl-dot {
  width: 36px; height: 36px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;               /* 라인 위에 렌더링 */
  margin-top: 10px;
}
.sched-tl-line {
  position: absolute;
  /* 도트 하단(margin-top 10 + dot 36 + 여백 4) ~ 아이템 하단 */
  top: 50px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-border) 100%);
}
.sched-tl-item:last-child .sched-tl-line { display: none; }

/* 본문 열 */
.sched-tl-body {
  padding: 12px 0 32px var(--space-4);
  border-left: none;
}
.sched-tl-item:last-child .sched-tl-body { padding-bottom: 4px; }
.sched-tl-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}
.sched-tl-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* 타입별 dot 색상 */
.sched-tl-item.type-ceremony .sched-tl-dot { border-color: var(--color-accent); }
.sched-tl-item.type-ceremony .sched-tl-badge { background: var(--color-accent-light); color: var(--color-accent-dark); }
.sched-tl-item.type-special  .sched-tl-dot { border-color: var(--color-accent); }
.sched-tl-item.type-special  .sched-tl-badge { background: var(--color-accent-light); color: var(--color-accent-dark); }
.sched-tl-item.type-consult  .sched-tl-dot { border-color: var(--color-success); }
.sched-tl-item.type-consult  .sched-tl-badge { background: var(--color-success-light); color: var(--color-success); }
.sched-tl-item.type-break    .sched-tl-title { color: var(--color-text-light); }
.sched-tl-item.type-event    .sched-tl-dot { border-color: var(--color-primary); background: var(--color-primary-light); }

/* ── 범례 ── */
.legend-section { background: var(--color-background); padding-top: 0; }
.legend-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-mid);
  margin-bottom: var(--space-4);
}
.legend-grid {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.82rem;
  color: var(--color-text-mid);
}
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot-open     { background: var(--color-border-strong); }
.legend-dot-ceremony { background: var(--color-accent); }
.legend-dot-main     { background: var(--color-primary); }
.legend-dot-break    { background: var(--color-text-light); }
.legend-dot-consult  { background: var(--color-success); }
.legend-dot-special  { background: #FF8F00; }
.legend-dot-event    { background: var(--color-primary-dark); }

/* ── 유의사항 ── */
.notice-section { background: var(--color-surface); }
.notice-box {
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  max-width: 760px;
  margin-inline: auto;
}
.notice-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.notice-list li {
  font-size: 0.88rem;
  color: var(--color-text-dark);
  line-height: 1.7;
  padding-left: 1.2rem;
  position: relative;
}
.notice-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 900;
}
.notice-list strong { color: var(--color-primary); }
.notice-list a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.notice-list a:hover { text-decoration: underline; }

/* ── 반응형 ── */
@media (max-width: 768px) {
  .sched-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .sched-tl-item { grid-template-columns: 90px 40px 1fr; }
  .sched-tl-time-text { font-size: 0.72rem; }
  .notice-box { padding: var(--space-5); }
}
@media (max-width: 540px) {
  .sched-summary-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .sched-day-tab { padding: var(--space-3) var(--space-5); }
  .sched-tl-item { grid-template-columns: 80px 36px 1fr; }
  .sched-tl-dot { width: 28px; height: 28px; font-size: 0.7rem; }
  .legend-grid { gap: var(--space-3); }
  .table-wrapper { font-size: 0.82rem; }
}
