.booking-form-wrap { margin-top: 32px; }

.booking-form-feedback {
  margin-bottom: 16px;
}

.booking-form-feedback p {
  margin: 0;
}

.booking-form-feedback-success {
  background: var(--green-light);
  border-color: var(--green);
}

.booking-form-feedback-error {
  background: #fff8f1;
  border-color: #e2c08a;
}

.booking-form { display: flex; flex-direction: column; gap: 28px; }

.booking-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: #fafaf8;
}

.booking-fieldset legend {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-dark);
  padding: 0 8px;
}

.booking-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.booking-option-btn {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--sans);
  font-size: 0.95rem;
  min-width: 170px;
  text-align: left;
}

.booking-option-btn:hover { border-color: var(--green); background: var(--green-light); }
.booking-option-btn.selected { border-color: var(--green); background: var(--green); color: #fff; }

.booking-step-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #c8b385;
  background: #fff7df;
  color: #8a5c00;
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 6px;
  cursor: help;
}

.booking-step-info-line {
  margin-top: 10px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
}

.booking-help-icon {
  line-height: 1;
}

.booking-help-tooltip {
  position: absolute;
  top: 26px;
  left: 0;
  width: min(360px, 80vw);
  background: #fff;
  border: 1px solid #d7c49a;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.booking-step-help:hover .booking-help-tooltip,
.booking-step-help:focus-within .booking-help-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.booking-inline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.booking-inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.booking-inline-field select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--sans);
  background: #fff;
}

.booking-inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.booking-inline-checkbox input {
  width: 16px;
  height: 16px;
}

.booking-field-note {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.booking-time-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 12px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.booking-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.legend-open { background: #ffffff; }
.legend-shared { background: #e8f1ff; }
.legend-trail { background: #e9f7ea; }
.legend-first-timer { background: #ffe8f2; }
.legend-closed { background: #d8d8d8; }
.legend-locked { background: #efefef; }

.booking-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.booking-week-label {
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.92rem;
}

.booking-nav-btn {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.86rem;
  transition: all 0.15s;
}

.booking-nav-btn:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.booking-nav-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: #d7d7d7;
  background: #efefef;
}

.booking-nav-btn-text {
  display: none;
}

@media (min-width: 920px) {
  .booking-nav-btn {
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .booking-nav-btn-text {
    display: inline;
    font-weight: 600;
  }
}

.booking-calendar-wrap {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 4px;
}

.booking-calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  min-width: 780px;
  table-layout: fixed;
}

.booking-calendar-hint {
  display: none;
  margin-top: 10px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.booking-ctrl-hint {
  display: block;
}

.booking-calendar th {
  text-align: center;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.booking-calendar th small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.booking-calendar tbody th {
  font-weight: 600;
  color: var(--text-muted);
  width: 58px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.booking-calendar td {
  padding: 0;
}

.booking-calendar-cell {
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--text-muted);
  transition: all 0.15s;
}

.booking-calendar-cell-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-calendar-cell:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.booking-calendar-cell.open {
  background: #fff;
  color: var(--text-muted);
}

.booking-calendar-cell.shared {
  border-color: #aac6ff;
  background: #e8f1ff;
}

.booking-calendar-cell.trail {
  border-color: #8ccf95;
  background: #e9f7ea;
}

.booking-calendar-cell.first-timer {
  border-color: #ebb5cf;
  background: #ffe8f2;
}

.booking-calendar-cell.closed,
.booking-calendar-cell.locked,
.booking-calendar-cell:disabled {
  border-color: #d7d7d7;
  background: #efefef;
  color: #8a8a8a;
  cursor: not-allowed;
}

.booking-calendar-cell.locked.shared {
  border-color: #aac6ff;
  background: #e8f1ff;
}

.booking-calendar-cell.locked.trail {
  border-color: #8ccf95;
  background: #e9f7ea;
}

.booking-calendar-cell.closed {
  background: #d8d8d8;
  color: transparent;
}

.booking-calendar-cell.locked.first-timer,
.booking-calendar-cell.closed.first-timer {
  border-color: #ebb5cf;
  background: #ffe8f2;
  color: #8a5c00;
}

.booking-calendar-cell.selected,
.booking-calendar-cell.selected.shared,
.booking-calendar-cell.selected.trail,
.booking-calendar-cell.selected.first-timer,
.booking-calendar-cell.selected.open {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.booking-calendar-cell.range-selected {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  opacity: 1;
}

.booking-calendar-cell.range-start {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.booking-calendar-cell.selected.locked,
.booking-calendar-cell.selected.closed {
  border-color: #d7d7d7;
  background: #efefef;
  color: #8a8a8a;
}

.booking-calendar-cell.range-selected.closed,
.booking-calendar-cell.range-selected.locked,
.booking-calendar-cell.range-selected:disabled {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

.booking-calendar-cell.range-start.closed,
.booking-calendar-cell.range-start.locked,
.booking-calendar-cell.range-start:disabled {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

.booking-summary {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .booking-fieldset {
    padding: 16px;
  }

  .booking-option-btn {
    min-width: 0;
    flex: 1 1 220px;
  }

  .booking-calendar-nav {
    gap: 8px;
  }

  .booking-nav-btn {
    font-size: 0.82rem;
  }

  .booking-calendar {
    min-width: 100%;
    border-spacing: 3px;
    table-layout: fixed;
  }

  .booking-calendar th {
    font-size: 0.76rem;
  }

  .booking-calendar th small {
    font-size: 0.68rem;
  }

  .booking-calendar tbody th {
    width: 44px;
    font-size: 0.74rem;
  }

  .booking-calendar-cell {
    min-height: 30px;
    height: 30px;
    font-size: 0.66rem;
  }
}

@media (max-width: 640px) {
  .booking-form {
    gap: 20px;
  }

  .booking-fieldset {
    padding: 14px 12px;
  }

  .booking-fieldset legend {
    font-size: 0.92rem;
  }

  .booking-options-grid {
    gap: 8px;
  }

  .booking-option-btn {
    width: 100%;
    flex: 1 1 100%;
    font-size: 0.9rem;
  }

  .booking-time-legend {
    grid-template-columns: 1fr;
    font-size: 0.76rem;
    gap: 6px;
  }

  .booking-legend-item {
    white-space: normal;
  }

  .booking-ctrl-hint {
    display: none;
  }

  .booking-calendar-nav {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 8px;
  }

  .booking-week-label {
    text-align: center;
    font-size: 0.86rem;
  }

  .booking-nav-btn {
    width: 42px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    justify-self: center;
  }

  .booking-calendar-wrap {
    overflow: hidden;
    padding: 3px;
  }

  .booking-calendar {
    min-width: 100%;
    width: 100%;
    table-layout: fixed;
    border-spacing: 2px;
  }

  .booking-calendar tbody th {
    width: 38px;
    font-size: 0.66rem;
  }

  .booking-calendar th {
    font-size: 0.62rem;
  }

  .booking-calendar th small {
    font-size: 0.58rem;
  }

  .booking-calendar-cell {
    min-height: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.6rem;
  }

  .booking-summary {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
}
