/* HG Store appointments: picker (product page, account, seller reschedule) and seller lists. Mobile first. */
.hg-booking {
  --hg-booking-accent: var(--hg-primary, #1748a5);
  border: 1px solid #d7dce3;
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 16px;
  min-width: 0;
  max-width: 100%;
  background: #fff;
}
.hg-booking legend { font-weight: 700; padding: 0 4px; }
.hg-booking__tz { margin: 0 0 10px; font-size: .9em; color: #5b6470; }
.hg-booking__days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.hg-booking:not(.hg-booking--js) .hg-booking__days { display: none; }
.hg-booking__day {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid #c9d0da;
  background: #fff;
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  min-height: 40px;
}
.hg-booking__day.is-active { background: var(--hg-booking-accent); border-color: var(--hg-booking-accent); color: #fff; }
.hg-booking__date { margin: 10px 0 6px; font-weight: 600; }
.hg-booking--js .hg-booking__date { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hg-booking__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.hg-booking__slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #c9d0da;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  padding: 6px 4px;
}
.hg-booking__slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hg-booking__slot small { font-size: .75em; color: #5b6470; }
.hg-booking__slot:has(input:checked) { background: var(--hg-booking-accent); border-color: var(--hg-booking-accent); color: #fff; }
.hg-booking__slot:has(input:checked) small { color: #fff; }
.hg-booking__slot:has(input:focus-visible) { outline: 2px solid var(--hg-booking-accent); outline-offset: 2px; }
.hg-booking__more { margin-top: 10px; }
.hg-booking__selected { margin: 10px 0 0; font-weight: 600; min-height: 1.2em; }
.hg-booking--error { border-color: #b32d2e; }
.hg-booking--error .hg-booking__selected { color: #b32d2e; }
.hg-booking__empty { color: #5b6470; }

.hg-booking__hours { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; max-width: 220px; }
.hg-price-unit { font-size: .8em; font-weight: 400; color: #5b6470; }

/* Seller: availability editor (calendar + one line per chosen day) */
.hg-booking-editor[hidden] { display: none; }
.hg-cal { max-width: 360px; margin: 8px 0 14px; }
.hg-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hg-cal__head strong { text-transform: capitalize; }
.hg-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hg-cal__dow { text-align: center; font-size: .8em; color: #5b6470; }
.hg-cal__day {
  aspect-ratio: 1 / 1;
  min-height: 38px;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.hg-cal__day:disabled { opacity: .35; cursor: default; }
.hg-cal__day.is-on { background: var(--hg-primary, #1748a5); border-color: var(--hg-primary, #1748a5); color: #fff; font-weight: 700; }
.hg-booking-days { display: grid; gap: 8px; margin-bottom: 8px; }
.hg-booking-day {
  display: grid;
  grid-template-columns: minmax(130px, 1.4fr) 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
}
.hg-booking-day label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.hg-booking-day__date span { font-weight: 600; }
.hg-booking-day__remove { color: #b32d2e; padding: 8px 0; }
.hg-booking-mode { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.hg-booking-mode legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.hg-booking-more { margin-top: 10px; }
.hg-booking-more summary { cursor: pointer; }
.hg-order-booking { margin-top: 8px; padding: 8px; border-left: 3px solid var(--hg-primary, #1748a5); background: #f6f8fb; }
.hg-orders-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 8px 0 14px; }
.hg-orders-filter label { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 600px) {
  .hg-booking-day { grid-template-columns: 1fr 1fr; }
  .hg-booking-day__date { grid-column: 1 / -1; }
}
.hg-booking-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .85em; background: #eef1f5; }
.hg-booking-status--confirmed { background: #e3f4e8; color: #17622d; }
.hg-booking-status--pending { background: #fff4d6; color: #7a5300; }
.hg-booking-status--cancelled { background: #f3e5e5; color: #8a1f1f; }
.hg-booking-status--conflict { background: #fde2e1; color: #8a1f1f; font-weight: 600; }
.hg-booking-status--completed { background: #e6ecf7; color: #1748a5; }
.hg-booking-change { margin-top: 6px; }
.hg-booking-change summary { cursor: pointer; list-style: none; }
.hg-booking-change[open] { width: 100%; }
.hg-booking-table .hg-booking-change[open] .hg-booking { min-width: min(320px, 80vw); }

/* Customer account */
.hg-booking-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.hg-booking-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid #e0e4ea; border-radius: 10px; }
.hg-booking-card { border: 1px solid #e0e4ea; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.hg-booking-card form { margin: 8px 0 0; }

@media (max-width: 600px) {
  .hg-booking { padding: 12px; }
  .hg-booking__slots { grid-template-columns: repeat(3, 1fr); }
}
