/* Shared booking widget — the multi-step "pick a time, then answer a few
   questions" calendar flow. Used standalone on personal-calendar.html and
   as a popup/modal on any offer page (e.g. coaches/index.html). Extracted
   from personal-calendar.html so there is exactly one copy of this CSS,
   regardless of how many pages open the widget. */

.booking-card {
  max-width: 640px;
  margin: var(--spacing-xl) auto 0;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
}

.booking-step[hidden] {
  display: none;
}

.booking-step-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md);
}

/* Step 1: calendar date picker */
.booking-calendar {
  margin-bottom: var(--spacing-lg);
}

.booking-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.booking-calendar-month {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.booking-cal-nav {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.booking-cal-nav:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--bg-glass-hover);
}

.booking-cal-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.booking-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
}

.booking-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.booking-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
}

.booking-cal-day.empty {
  visibility: hidden;
}

.booking-cal-day.available {
  background: var(--bg-glass);
  border-color: var(--border-light);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

.booking-cal-day.available:hover {
  border-color: var(--border-accent);
  background: var(--bg-glass-hover);
}

.booking-cal-day.selected {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #05161c;
  font-weight: 700;
}

.booking-cal-day.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.booking-times[hidden] {
  display: none;
}

.booking-times {
  margin-top: var(--spacing-md);
}

.booking-slots-times {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.booking-slot-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.booking-slot-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.booking-slot-btn.selected {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #05161c;
  font-weight: 600;
}

.booking-recap {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
}

.booking-recap[hidden] {
  display: none;
}

.booking-error {
  color: var(--error);
  font-size: 0.85rem;
  margin: var(--spacing-sm) 0 0;
  text-align: center;
}

.booking-error[hidden] {
  display: none;
}

.booking-recap p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.booking-recap p strong {
  color: var(--text-primary);
}

/* Offer-specific qualifying questions (see OFFER_QUESTIONS in
   booking-widget.js) can render as <select> dropdowns. The site-wide
   .form-group floating-label styling in futuristic-style.css only ever
   accounts for <input>/<textarea> — left unstyled, a <select> falls back to
   the browser's native box (auto width, default chrome), which is why it
   looked out of place and narrower than the fields above it. This brings
   <select> to the same width and underline as the rest of the form.

   Unlike the floating-label inputs above, a select has no separate <label>
   sibling — the placeholder <option>'s text IS the question (e.g. "Current
   situation"), shown muted until a real answer is picked (:invalid, since
   the placeholder option's value is ""), then switches to full-brightness
   text once answered (:valid). A floating label on top of a select would
   just overlap its own always-visible text, unlike an input which starts
   genuinely empty. */
.form-group select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-light);
  padding: var(--spacing-md) 0;
  padding-right: 28px;
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23b0b0b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.form-group select:valid {
  color: var(--text-primary);
}

.form-group select:focus {
  outline: 2px solid transparent;
  border-bottom-color: var(--primary);
}

.form-group select:focus ~ .form-line {
  width: 100%;
}

.form-group select:focus ~ .form-line {
  width: 100%;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Shared centered button row for the details step (Back + Confirm Booking) */
.booking-form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.booking-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: var(--spacing-md) 0;
}

/* Step 3: confirmation */
.booking-confirm {
  text-align: center;
  padding: var(--spacing-md) 0;
}

.booking-confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #05161c;
}

.booking-confirm h3 {
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm);
}

.booking-confirm p {
  color: var(--text-secondary);
  margin: 0 0 var(--spacing-sm);
}

.booking-confirm-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Matches the site-wide 768px breakpoint where .futuristic-form button[type="submit"]
   is forced to width:80% !important — stack + re-center so the two buttons don't
   end up overflowing/off-center in a row at that width. */
@media only screen and (max-width: 768px) {
  .booking-form-actions {
    flex-direction: column-reverse;
  }

  .booking-form-actions .primary-button,
  .booking-form-actions .secondary-button {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    justify-content: center;
  }
}

@media only screen and (max-width: 480px) {
  .booking-card {
    padding: var(--spacing-lg) var(--spacing-md);
  }
}
