.peak-booking-time-row {
  scrollbar-width: thin;
  scrollbar-color: #5D8DBF #E0E5EA;
  padding-bottom: 18px;
}

.peak-booking-time-row::-webkit-scrollbar {
  height: 6px;
}

.peak-booking-time-row::-webkit-scrollbar-track {
  background: #E0E5EA;
  border-radius: 3px;
}

.peak-booking-time-row::-webkit-scrollbar-thumb {
  background: #5D8DBF;
  border-radius: 3px;
}

.peak-booking-time-slot.selected-range {
  background: #002B59;
  border-color: #002B59;
  color: white;
}

.peak-booking-time-slot.open-play {
  border-color: #FF8A65;
  background: rgba(255, 138, 101, 0.1);
}

.peak-booking-time-slot.league {
  border-color: #E879F9;
  background: rgba(232, 121, 249, 0.1);
}

.peak-booking-time-slot.clinic {
  border-color: #4ADE80;
  background: rgba(74, 222, 128, 0.1);
}

.peak-booking-time-slot.private {
  border-color: #F87171;
  background: rgba(248, 113, 113, 0.1);
}

/* When event type slots are selected, use dark text for readability on light backgrounds */
.peak-booking-time-slot.open-play.active,
.peak-booking-time-slot.open-play.selected-range,
.peak-booking-time-slot.league.active,
.peak-booking-time-slot.league.selected-range,
.peak-booking-time-slot.clinic.active,
.peak-booking-time-slot.clinic.selected-range,
.peak-booking-time-slot.private.active,
.peak-booking-time-slot.private.selected-range {
  color: #002B59;
  font-weight: 600;
}

.peak-booking-time-slot.unavailable {
  border-color: #B8C4CE;
  background: #F5F7F9;
  color: #A0AEC0;
}

.peak-booking-time-slot {
  white-space: nowrap;
  flex-shrink: 0;
}

.peak-booking-time-slot sup {
  font-size: 0.65rem;
  font-weight: 400;
}

.peak-booking-timeline-wrapper {
  position: relative;
  margin-bottom: 2.5rem;
  touch-action: none;
}

.peak-booking-timeline {
  height: 10px;
  background: transparent;
  border-radius: 5px;
  display: flex;
  overflow: visible;
  position: relative;
  cursor: pointer;
}

.peak-booking-timeline-segment {
  height: 100%;
  min-width: 8px;
}

.peak-booking-timeline-segment.available {
  background: #5D8DBF;
}

.peak-booking-timeline-segment.unavailable {
  background: #B8C4CE;
}

.peak-booking-timeline-segment.selected {
  background: #FAC850;
}

.peak-booking-timeline-segment.open-play {
  background: #FF8A65;
}

.peak-booking-timeline-segment.league {
  background: #E879F9;
}

.peak-booking-timeline-segment.clinic {
  background: #4ADE80;
}

.peak-booking-timeline-segment.private {
  background: #F87171;
}

.peak-booking-timeline-segment.selected-range {
  box-shadow: none;
}

.peak-booking-timeline-handle {
  position: absolute;
  top: -8px;
  background: #5D8DBF;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: grab;
}

@media (max-width: 480px) {
  .peak-booking-date-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .peak-booking-time-slot {
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
  }
}


/* time selector widget */
[data-peak-module="courts"] {
  background: transparent;
  padding: 0;
  font-family: 'M PLUS Rounded 1c', sans-serif;
}

.peak-booking-step-indicator {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 15;
}

.peak-booking-step-indicator svg {
  display: block;
  width: 222px;
  height: 65px;
}

/* "Legend" pill toggle below step indicator */
.peak-legend-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: #536980;
  user-select: none;
}

.peak-legend-checkbox {
  position: relative;
  width: 36px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: #CBD5E1;
  border-radius: 10px;
  outline: none;
  transition: background 0.2s ease;
}

.peak-legend-checkbox:checked {
  background: #0080FF;
}

.peak-legend-checkbox::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.peak-legend-checkbox:checked::after {
  transform: translateX(16px);
}

/* Legend overlay — top-right of map, shown when toggle is ON */
.peak-booking-legend-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 15;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  padding: 0.4rem 0.5rem;
  max-width: 320px;
}

.peak-booking-legend-overlay.hidden {
  display: none;
}

.peak-booking-map-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.peak-booking-svg-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.peak-booking-svg-wrapper.zoomed {
  touch-action: none;
}

.peak-booking-svg-wrapper:active {
  cursor: grabbing;
}

#peak-booking-facility-map {
  display: block;
  width: 100%;
  height: 100%;
}

.peak-booking-zoom-btn {
  width: 44px;
  height: 44px;
  background: #002B59;
  color: #C3FFF7;
  border: none;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.peak-booking-zoom-btn:hover {
  background: #001A38;
  transform: scale(1.05);
}

.peak-booking-color-btn {
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4);
  background-size: 300% 300%;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.peak-booking-color-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.peak-booking-court-overlay {
  fill: rgba(93, 141, 191, 0.6);
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.5;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
}

.peak-booking-court-overlay.available:hover,
.peak-booking-court-overlay.open-play:hover {
  filter: brightness(1.2);
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
}

.peak-booking-court-overlay.selected {
  fill: rgba(250, 200, 80, 0.85);
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.5;
}

.peak-booking-court-overlay.available {
  fill: rgba(93, 141, 191, 0.7);
}

.peak-booking-court-overlay.unavailable {
  fill: rgba(184, 196, 206, 0.6);
}

.peak-booking-court-overlay.unavailable-simple {
  fill: rgba(255, 255, 255, 0.55);
}

.peak-booking-court-overlay.open-play {
  fill: rgba(253, 165, 78, 0.8);
}

.peak-booking-court-overlay.league {
  fill: rgba(252, 107, 255, 0.8);
}

.peak-booking-court-overlay.clinic {
  fill: rgba(123, 255, 147, 0.8);
}

.peak-booking-court-overlay.private {
  fill: rgba(253, 122, 125, 0.8);
}

/* Day Schedule Panel Styles */
.peak-booking-day-schedule {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 384px;
  max-width: 90%;
  max-height: calc(100% - 2rem);
  background: rgba(0, 43, 89, 0.95);
  border-radius: 12px;
  padding: 0.75rem;
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  overflow: hidden;
  cursor: default;
}

.peak-booking-day-schedule.visible {
  display: flex;
}

.peak-booking-day-schedule.dragging {
  cursor: grabbing;
}

.peak-booking-day-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  cursor: grab;
}

.peak-booking-day-schedule-header:active {
  cursor: grabbing;
}

.peak-booking-day-schedule-title {
  color: #C3FFF7;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.peak-booking-day-schedule-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.peak-booking-day-schedule-close {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.peak-booking-day-schedule-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.peak-booking-day-schedule-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.peak-booking-day-schedule-nav-btn {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
}

.peak-booking-day-schedule-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.peak-booking-day-schedule-slots {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.25rem;
}

.peak-booking-day-schedule-slots::-webkit-scrollbar {
  width: 4px;
}

.peak-booking-day-schedule-slots::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.peak-booking-day-schedule-slots::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.peak-booking-slot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 32px;
  height: 32px;
}

.peak-booking-slot:hover {
  background: rgba(255, 255, 255, 0.1);
}

.peak-booking-slot.current {
  background: rgba(250, 200, 80, 0.2);
  border: 1px solid rgba(250, 200, 80, 0.5);
}

.peak-booking-slot.selected-range {
  background: rgba(93, 141, 191, 0.3);
  border: 1px solid rgba(93, 141, 191, 0.6);
}

.peak-booking-slot-time {
  width: 50px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.peak-booking-slot-time-hour {
  font-size: 0.8rem;
}

.peak-booking-slot-indicator {
  width: 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.peak-booking-slot-indicator.available {
  background: #5D8DBF;
}

.peak-booking-slot-indicator.unavailable {
  background: #B8C4CE;
}

.peak-booking-slot-indicator.open-play {
  background: #FDA54E;
}

.peak-booking-slot-indicator.league {
  background: #FC6BFF;
}

.peak-booking-slot-indicator.clinic {
  background: #7BFF93;
}

.peak-booking-slot-indicator.private {
  background: #FD7A7D;
}

.peak-booking-slot-info {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.peak-booking-slot-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  line-height: 1;
  flex-shrink: 0;
}

.peak-booking-slot-event {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peak-booking-slot-action {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.25rem;
}

.peak-booking-slot-btn {
  padding: 3px 12px 3px 12px;
  background: #0080FF;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.peak-booking-slot-btn:hover {
  background: #0066CC;
  transform: scale(1.02);
}

/* Mobile styles for day schedule panel */
@media (max-width: 768px) {
  .peak-booking-day-schedule {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
  }
}

.peak-booking-slot-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 1024px) {
  .peak-booking-map-wrapper {
    height: 70vh;
    min-height: 70vh;
  }

  .peak-booking-day-schedule {
    width: 340px;
  }
}

@media (max-width: 768px) {
  .peak-booking-step-indicator svg {
    width: 180px;
    height: 53px;
  }

  .peak-booking-zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .peak-booking-map-wrapper {
    height: 75vh;
    min-height: 75vh;
  }

  .peak-booking-day-schedule {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 480px) {
  .peak-booking-step-indicator svg {
    width: 150px;
    height: 44px;
  }

  .peak-legend-toggle-label {
    font-size: 0.7rem;
    margin-top: 0.35rem;
  }

  .peak-legend-checkbox {
    width: 30px;
    height: 17px;
  }

  .peak-legend-checkbox::after {
    width: 13px;
    height: 13px;
  }

  .peak-legend-checkbox:checked::after {
    transform: translateX(13px);
  }

  .peak-booking-legend-overlay {
    padding: 0.3rem 0.4rem;
    gap: 0.25rem 0.5rem;
    max-width: 240px;
  }

  .peak-booking-legend-overlay .peak-booking-legend-item {
    font-size: 0.7rem;
  }

  .peak-booking-legend-overlay .peak-booking-legend-dot {
    width: 10px;
    height: 10px;
  }
}


/* legend widget */
[data-peak-module="legend"] {
  padding: 0.75rem 1rem;
}

.peak-booking-legend-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.peak-booking-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #7A8FA6;
}

.peak-booking-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.peak-booking-legend-dot.available {
  background: #5D8DBF;
}

.peak-booking-legend-dot.unavailable {
  background: #B8C4CE;
}

.peak-booking-legend-dot.selected {
  background: #FAC850;
}

.peak-booking-legend-dot.open-play {
  background: #FF8A65;
}

.peak-booking-legend-dot.league {
  background: #E879F9;
}

.peak-booking-legend-dot.clinic {
  background: #4ADE80;
}

.peak-booking-legend-dot.private {
  background: #F87171;
}

.peak-booking-legend-toggle {
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #94A3B8;
}

@media (max-width: 768px) {
  [data-peak-module="legend"] {
    padding: 0.5rem 0;
  }

  .peak-booking-legend-item {
    font-size: 0.75rem;
  }

  .peak-booking-legend-dot {
    width: 10px;
    height: 10px;
  }
}

/* Court Overview dropdown styles — matches player-count selector */
.peak-overview-dropdown {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid #D0D8E0;
  border-radius: 0.375rem;
  padding: 8px 28px 8px 12px;
  font-size: 0.875rem;
  font-weight: 400;
  color: #002B59;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23536980' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.peak-overview-dropdown:hover {
  border-color: #B0BEC5;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
}

.peak-overview-dropdown:focus {
  border-color: #5D8DBF;
  box-shadow: 0 0 0 2px rgba(93, 141, 191, 0.2);
}

@media (max-width: 480px) {
  .peak-overview-dropdown {
    font-size: 0.8125rem;
    padding: 6px 24px 6px 10px;
  }
}

/* payment module styles */

.peak-booking-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.peak-booking-terms-checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.peak-booking-terms-text {
  font-size: 0.75rem;
  color: #536980;
  line-height: 1.4;
}
