/* 일정 및 체크리스트 페이지 */
@import url('./guide.css');

.schedule-content {
  background: #fff;
  padding: 40px 16px 64px;
}

.schedule-content-inner {
  position: relative;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
}

.schedule-alert {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.schedule-alert--success {
  color: #027a48;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.schedule-floats {
  position: fixed;
  right: max(16px, calc((100vw - var(--content-max-width)) / 2 + 16px));
  top: 200px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.schedule-floats > * {
  pointer-events: auto;
}

.schedule-floats__top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #111;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.schedule-floats__top:hover {
  filter: brightness(1.12);
}

.schedule-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.schedule-title-wrap {
  display: inline-block;
}

.schedule-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #011D20;
}

.schedule-header__right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.schedule-view-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
}

.schedule-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-right: 1px solid #d9d9d9;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.schedule-view-toggle__btn:last-child {
  border-right: none;
}

.schedule-view-toggle__btn:hover {
  color: #0F6055;
  background: #f3faf8;
}

.schedule-view-toggle__btn.is-active {
  color: #fff;
  background: #0F6055;
}

.schedule-view-toggle__btn.is-active:hover {
  color: #fff;
  background: #0c5047;
}

.schedule-grid-section__head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.schedule-view {
  width: 100%;
}

.schedule-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e8e8e8;
  background: #fff;
}

.schedule-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #ececec;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  vertical-align: middle;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.schedule-table thead th {
  background: #f7f7f7;
  color: #333;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  border-bottom: 1px solid #ddd;
}

.schedule-table tbody tr:last-child td {
  border-bottom: none;
}

.schedule-table tbody tr:hover td {
  background: #f9fcfb;
}

.schedule-table th:nth-child(1),
.schedule-table td:nth-child(1) {
  width: 7%;
  text-align: center;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) {
  width: 10%;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
  width: 28%;
}

.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) {
  width: 28%;
}

.schedule-table th:nth-child(5),
.schedule-table td:nth-child(5) {
  width: 17%;
}

.schedule-table th:nth-child(6),
.schedule-table td:nth-child(6) {
  width: 10%;
  text-align: center;
}

.schedule-table__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}

.schedule-table__badge--required {
  background: #c40000;
}

.schedule-table__badge--optional {
  background: #1e6bd8;
}

.schedule-table__badge--onsite {
  background: #111;
}

.schedule-table__type-label {
  font-weight: 800;
}

.schedule-table__type-label--required {
  color: #c40000;
}

.schedule-table__type-label--optional {
  color: #1e6bd8;
}

.schedule-table__type-label--onsite {
  color: #111;
}

.schedule-table__name {
  font-weight: 800;
  color: #111;
}

.schedule-table__desc {
  color: #555;
}

.schedule-table__date {
  color: #1e6bd8;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-table td.schedule-table__link-cell {
  white-space: nowrap;
  text-align: center;
}

.schedule-table__link {
  color: #0F6055;
  font-weight: 800;
  text-decoration: none;
}

.schedule-table__link:hover {
  text-decoration: underline;
}

.schedule-table__dash,
.schedule-table__empty {
  color: #999;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.schedule-legend__item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.schedule-legend__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.schedule-legend__mark--required {
  background: #c40000;
}

.schedule-legend__mark--optional {
  background: #1e6bd8;
  font-size: 11px;
}

.schedule-legend__mark--onsite {
  background: #111;
  font-size: 11px;
}

.schedule-grid {
  --schedule-col-gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--schedule-col-gap);
  row-gap: 20px;
}

.schedule-card {
  position: relative;
  box-sizing: border-box;
  padding: 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.schedule-card--clickable {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schedule-card--clickable:hover {
  border-color: #0F6055;
  box-shadow: 0 2px 10px rgba(15, 96, 85, 0.12);
}

a.schedule-card__link {
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.schedule-card__link:focus-visible {
  outline: 2px solid #0F6055;
  outline-offset: 2px;
}

.schedule-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: var(--schedule-col-gap);
  height: 1px;
  background: #d0d0d0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  display: none;
}

.schedule-card:not(:nth-child(4n))::after {
  display: block;
}

.schedule-card:last-child::after {
  display: none !important;
}

.schedule-card__inner {
  display: flex;
  align-items: center;
  min-height: 104px;
  padding: 18px 12px;
  background: #f5f5f5;
  box-sizing: border-box;
}

.schedule-card__badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0 12px 0 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

.schedule-card__divider {
  flex-shrink: 0;
  align-self: stretch;
  width: 1px;
  min-height: 56px;
  margin: 4px 0;
  background: #ddd;
}

.schedule-card__badge--required {
  background: #c40000;
}

.schedule-card__badge--optional {
  background: #1e6bd8;
}

.schedule-card__badge--onsite {
  background: #111;
}

.schedule-card__content {
  flex: 1;
  min-width: 0;
  padding: 0 12px 0 4px;
}

.schedule-card__name {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111;
  line-height: 1.4;
  margin-bottom: 8px;
}

.schedule-card__desc {
  font-size: 12px;
  color: #555;
  line-height: 1.45;
  margin-bottom: 6px;
}

.schedule-card__date {
  font-size: 12px;
  color: #1e6bd8;
  font-weight: 800;
  line-height: 1.3;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) and (min-width: 768px) {
  .schedule-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .schedule-card::after {
    display: none;
  }

  .schedule-card:not(:nth-child(3n))::after {
    display: block;
  }
}

@media (max-width: 1024px) {
  .schedule-header__right {
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .schedule-content {
    padding: 40px 16px 64px;
  }

  .schedule-grid {
    --schedule-col-gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }

  .schedule-card {
    padding: 8px;
  }

  .schedule-card::after {
    display: none;
  }

  .schedule-card:not(:nth-child(2n))::after {
    display: block;
  }

  .schedule-card__inner {
    min-height: 96px;
    padding: 14px 10px;
  }

  .schedule-card__badge {
    width: 32px;
    height: 32px;
    margin: 0 8px 0 6px;
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .schedule-content {
    padding: 160px 24px 72px;
  }
}
