:root {
  --slot-past: #d9d9d9;
  --slot-future-a: #b8d2db;
  --slot-future-b: #9fc2cd;

  --text-main: #111111;
  --text-sub: #333333;
  --time-text: rgba(255, 255, 255, 0.88);

  --line-color: rgba(255, 255, 255, 0.85);

  --booking-bg: #efb7b7;
  --booking-text: #e54b4b;
  --booking-border: rgba(229, 75, 75, 0.08);

  --board-gap: 14px;
  --slot-height: 72px;
  --slot-time-width: 92px;
}

.schedule-board-block {
  margin-top: 8px;
}

.schedule-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--board-gap);
  align-items: start;
}

.schedule-board-block {
  margin-top: 8px;
  position: relative;
}

.schedule-board-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(1px);
}

.schedule-board-loading-text {
  padding: 12px 18px;
  font-size: 16px;
  color: #355c9a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(53, 92, 154, 0.12);
}

.schedule-board-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.schedule-board-empty-card {
  width: 100%;
  text-align: center;
  padding: 28px 20px;
  font-size: 28px;
  line-height: 1.4;
  font-weight: 600;
  color: #2e63c6;
  background: #dfeeff;
  border: 1px solid rgba(46, 99, 198, 0.08);
}

@media (max-width: 640px) {
  .schedule-board-empty-card {
    font-size: 22px;
    padding: 24px 16px;
  }
}

.day-column {
  background: #ffffff;
  border: 1px solid #d7e4eb;
  border-radius: 16px;
  overflow: hidden;
}

.day-header {
  background: #ffffff;
  border-bottom: 1px solid #d7e4eb;
  padding: 10px 16px 12px;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.day-title {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.day-subtitle {
  font-size: 16px;
  line-height: 1.2;
  color: var(--text-sub);
  white-space: nowrap;
}

.day-grid {
  position: relative;
}

.hidden {
  display: none !important;
}

.time-slot {
  position: relative;
  height: var(--slot-height);
  display: flex;
  border-top: 1px solid var(--line-color);
}

.time-slot:first-child {
  border-top: none;
}

.slot-time {
  width: var(--slot-time-width);
  flex: 0 0 var(--slot-time-width);
  padding: 12px 0 0 16px;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  color: var(--time-text);
  z-index: 2;
  transition: opacity 120ms ease;
}

.slot-time-hidden .slot-time {
  opacity: 0;
}

.slot-body {
  flex: 1;
  min-width: 0;
}

.slot-past {
  background: var(--slot-past);
}

.slot-future-a {
  background: var(--slot-future-a);
}

.slot-future-b {
  background: var(--slot-future-b);
}

/* overlay layer */
.booking-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.booking-item {
  position: absolute;
  left: 0;
  right: 0;
  min-height: 32px;
  background: var(--booking-bg);
  border-top: 1px solid var(--booking-border);
  border-bottom: 1px solid var(--booking-border);
  border-left: none;
  border-right: none;
  border-radius: 0;
  display: flex;
  align-items: flex-start;
  padding-left: 16px;
  padding-top: 8px;
  overflow: hidden;
  pointer-events: auto;
}

.booking-item-label {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--booking-text);
  white-space: nowrap;
}

.board-cancel-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 44px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.74);
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 28px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(120, 34, 34, 0.12);
  transition:
    left 160ms ease,
    right 160ms ease,
    width 160ms ease,
    height 160ms ease,
    border-radius 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.board-cancel-btn.confirming {
  left: 10px;
  right: 10px;
  width: auto;
  height: 42px;
  min-width: 0;
  border-radius: 10px;
  background-color: #dc2626;
  background-image: linear-gradient(#991b1b, #991b1b);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #fff;
  font-size: 15px;
  line-height: 42px;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22);
  animation: board-cancel-confirm-countdown 4s linear forwards;
}

.board-cancel-btn.is-loading {
  left: 10px;
  right: 10px;
  width: auto;
  height: 42px;
  min-width: 0;
  border-radius: 10px;
  background-color: #dc2626;
  color: #fff;
  font-size: 15px;
  line-height: 42px;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22);
}

.board-cancel-btn:disabled {
  min-width: 96px;
  cursor: not-allowed;
  opacity: 0.86;
}

@keyframes board-cancel-confirm-countdown {
  to {
    background-size: 0% 100%;
  }
}

@media (max-width: 900px) {
  .schedule-board {
    gap: 9px;
  }

  .day-title {
    font-size: 28px;
  }

  .day-subtitle {
    font-size: 14px;
  }

  .slot-time {
    width: 76px;
    flex-basis: 76px;
    padding-left: 12px;
    font-size: 18px;
  }

  .booking-item-label {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .demo-page {
    padding: 20px 8px 32px;
  }

  .schedule-board {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .day-header {
    min-height: 76px;
    padding: 8px 10px 10px;
  }

  .day-title-wrap {
    gap: 8px;
  }

  .day-title {
    font-size: 24px;
  }

  .day-subtitle {
    font-size: 12px;
  }

  .slot-time {
    width: 64px;
    flex-basis: 64px;
    padding-top: 10px;
    padding-left: 10px;
    font-size: 16px;
  }

  .booking-item {
    padding-left: 10px;
    padding-top: 6px;
  }

 .booking-item-label {
    font-size: 15px;
    line-height: 1.2;
    white-space: normal;
    word-break: keep-all;
}

  .board-cancel-btn {
    top: 6px;
    right: 6px;
    min-width: 38px;
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 24px;
  }

  .board-cancel-btn.confirming {
    left: 6px;
    right: 6px;
    width: auto;
    height: 36px;
    min-width: 0;
    border-radius: 9px;
    font-size: 13px;
    line-height: 36px;
  }

  .board-cancel-btn.is-loading {
    left: 6px;
    right: 6px;
    width: auto;
    height: 36px;
    min-width: 0;
    border-radius: 9px;
    font-size: 13px;
    line-height: 36px;
  }

  :root {
    --slot-height: 64px;
  }
}
