/* Public booking wizard specific styles */

/* Business header */
.booking_business_header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.booking_business_logo {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.booking_business_logo_placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  color: white;
  font-size: var(--text-large);
  font-weight: 600;
  border-radius: 8px;
}

.booking_business_info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.booking_business_name {
  font-size: var(--text-medium);
  font-weight: 600;
  color: var(--color-text);
}

.booking_business_category {
  font-size: var(--text-small);
  color: var(--color-text-light);
}

/* Service cards */
.booking_service_card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-white);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.2s, background-color 0.2s;
  text-align: left;

  &:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
  }

  &.selected {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
  }
}

.booking_service_card_content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Quantity controls */
.booking_quantity_controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.booking_quantity_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  color: var(--color-text);

  &:hover {
    background: var(--color-bg-light);
    border-color: var(--color-primary);
  }

  &:active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
  }

  svg {
    width: 16px;
    height: 16px;
  }
}

.booking_quantity_input {
  width: 40px;
  height: 36px;
  text-align: center;
  font-size: var(--text-normal);
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--color-text);
  -moz-appearance: textfield;

  &::-webkit-outer-spin-button,
  &::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

.booking_service_name {
  font-size: var(--text-normal);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.booking_service_meta {
  display: flex;
  gap: 1rem;
  font-size: var(--text-small);
  color: var(--color-text-light);
}

/* Day groups for slots */
.booking_days {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.booking_day_group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.booking_day_header {
  font-size: var(--text-normal);
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.booking_slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;

  @media (min-width: 400px) {
    grid-template-columns: repeat(4, 1fr);
  }
}

.booking_slot_card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  font-size: var(--text-small);
  font-weight: 500;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;

  &:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
  }

  &.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
  }
}

/* No availability message */
.booking_no_availability {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;

  svg {
    width: 48px;
    height: 48px;
    color: var(--color-muted);
  }

  p {
    font-size: var(--text-normal);
    color: var(--color-text-light);
    margin: 0;
  }
}

/* Review sections */
.booking_review {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.booking_review_section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.booking_review_label {
  font-size: var(--text-x-small);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.booking_review_value {
  font-size: var(--text-normal);
  font-weight: 500;
  color: var(--color-text);
}

.booking_review_subvalue {
  font-size: var(--text-small);
  color: var(--color-text-light);
}

/* Confirmation / Success */
.booking_confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.booking_confirmation_icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-success);
  border-radius: 50%;
  margin-bottom: 1.5rem;

  svg {
    width: 40px;
    height: 40px;
    color: var(--color-success-dark);
  }
}

.booking_confirmation_title {
  font-size: var(--text-large);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.booking_confirmation_subtitle {
  font-size: var(--text-normal);
  color: var(--color-text-light);
  margin: 0 0 2rem;
}

.booking_confirmation_details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-light);
  border-radius: 8px;
  text-align: left;
  margin-bottom: 2rem;
}

.booking_confirmation_row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: var(--text-small);

  .label {
    color: var(--color-text-light);
  }

  .value {
    font-weight: 500;
    color: var(--color-text);
    text-align: right;
  }
}

/* Inactive link state */
.booking_inactive {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

.booking_inactive_icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border-radius: 50%;
  margin-bottom: 1.5rem;

  svg {
    width: 32px;
    height: 32px;
    color: var(--color-muted);
  }
}

/* Phone input */
.booking_phone_input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;

  .wizard_input {
    text-align: left;
  }
}

.booking_phone_prefix {
  display: flex;
  align-items: center;
  padding: 0.875rem 0;
  font-size: 1.25rem;
}

/* Pending status banner */
.booking_pending_notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-state-pending-bg);
  border: 1px solid var(--color-state-pending-border);
  border-radius: 8px;
  margin-bottom: 1rem;

  svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-state-pending-text);
  }

  p {
    font-size: var(--text-small);
    color: var(--color-state-pending-text);
    margin: 0;
  }
}

/* Verification code input */
.booking_code_input {
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  text-align: center;
  font-weight: 600;
}

/* Services list with checkboxes */
.booking_services_list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.booking_service_checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-white);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;

  input[type="checkbox"] {
    display: none;
  }

  &:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
  }

  &:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-bg-light);

    .booking_service_check {
      opacity: 1;
      background: var(--color-primary);
      color: white;
    }
  }
}

.booking_service_checkbox_content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.booking_service_check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  color: transparent;
  opacity: 0.5;
  transition: opacity 0.2s, background 0.2s, color 0.2s;

  svg {
    width: 16px;
    height: 16px;
  }
}

/* Services summary */
.booking_services_summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--color-bg-light);
  border-radius: 8px;
  margin-top: 1rem;
}

.booking_services_summary_label {
  font-size: var(--text-small);
  color: var(--color-text-light);
}

.booking_services_summary_value {
  font-size: var(--text-normal);
  font-weight: 600;
  color: var(--color-text);
}

/* Week group headers */
.booking_week_group {
  margin-bottom: 1.5rem;
}

.booking_week_header {
  font-size: var(--text-medium);
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
}

/* Address selection */
.booking_address_list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1rem;
}

.booking_address_option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-white);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  text-align: left;

  input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: var(--color-primary);
  }

  &:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
  }

  &:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
  }
}

.booking_address_content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.booking_address_line1 {
  font-size: var(--text-normal);
  font-weight: 500;
  color: var(--color-text);
}

.booking_address_line2 {
  font-size: var(--text-small);
  color: var(--color-text-light);
}

.booking_address_primary_badge {
  font-size: var(--text-x-small);
  color: var(--color-primary);
  font-weight: 500;
}

/* New address form */
.booking_new_address_toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  font-size: var(--text-small);
  color: var(--color-text-light);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;

  &:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
  }

  svg {
    width: 18px;
    height: 18px;
  }
}

.booking_address_form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.booking_address_form_row {
  display: flex;
  gap: 0.75rem;
}

.booking_address_form_field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;

  &.small {
    flex: 0 0 100px;
  }

  label {
    font-size: var(--text-x-small);
    color: var(--color-text-light);
  }

  input {
    padding: 0.625rem 0.75rem;
    font-size: var(--text-normal);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg-white);

    &:focus {
      outline: none;
      border-color: var(--color-primary);
    }
  }
}

/* Mapbox suggestions */
.booking_search_wrapper {
  position: relative;
}

.booking_mapbox_suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  z-index: var(--z-popup);
  max-height: 200px;
  overflow-y: auto;

  &.hidden {
    display: none;
  }
}

.booking_suggestion_item {
  padding: 0.75rem 1rem;
  font-size: var(--text-small);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);

  &:last-child {
    border-bottom: none;
  }

  &:hover {
    background: var(--color-bg-light);
  }
}

/* Terms checkbox */
.booking_terms_checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-light);
  border-radius: 8px;
  margin-top: 1rem;
  text-align: left;

  input[type="checkbox"] {
    margin-top: 0.125rem;
    accent-color: var(--color-primary);
  }

  label {
    font-size: var(--text-small);
    color: var(--color-text-light);
    line-height: 1.4;

    a {
      color: var(--color-link);
      text-decoration: underline;
    }
  }
}

/* Wizard timer for resend */
.wizard_timer {
  font-size: var(--text-small);
  color: var(--color-muted);
  margin-left: 0.5rem;
}

/* Multi-service review list */
.booking_review_services {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.booking_review_service_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-small);

  .name {
    color: var(--color-text);
  }

  .meta {
    color: var(--color-text-light);
  }
}

.booking_review_service_total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-weight: 600;

  .label {
    color: var(--color-text-light);
    font-size: var(--text-small);
  }

  .value {
    color: var(--color-text);
  }
}

/* Demo mode banner */
.booking_demo_banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: var(--text-small);
  color: var(--color-primary-dark);

  svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
}

/* Demo success page */
.booking_step_demo_success {
  .demo_success_icon {
    background: var(--color-primary-light);

    svg {
      color: var(--color-primary);
    }
  }
}

.booking_demo_summary {
  width: 100%;
  margin-bottom: 2rem;
}

.booking_demo_summary_title {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

.booking_demo_cta {
  width: 100%;
  padding: 1.5rem;
  background: var(--color-bg-light);
  border-radius: 8px;
  text-align: center;
}

.booking_demo_cta_title {
  font-size: var(--text-medium);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.booking_demo_cta_subtitle {
  font-size: var(--text-small);
  color: var(--color-text-light);
  margin: 0 0 1.5rem;
}

/* Calendar dropdown for success page */
.booking_success_actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.booking_calendar_actions {
  position: relative;
  width: 100%;
}

.booking_add_calendar_btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  svg {
    flex-shrink: 0;
  }
}

.booking_calendar_dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: var(--z-popup);
  overflow: hidden;

  &.hidden {
    display: none;
  }
}

.booking_calendar_option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: var(--text-normal);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.15s;

  &:last-child {
    border-bottom: none;
  }

  &:hover {
    background: var(--color-bg-light);
  }

  svg {
    flex-shrink: 0;
    color: var(--color-text-light);
  }
}
