/* =====================================================
   Booking Form — booking.css
   Used on: Book-Inspection.php, index.php
   All selectors scoped to #bk-form-wrapper
   ===================================================== */

/* --- Section & wrapper --- */
#bk-booking-section {
  padding: 60px 0;
}

#bk-form-wrapper {
  margin: 0 100px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 50px 60px;
}

/* --- Step Indicator --- */
#bk-steps-indicator {
  display: flex;
  align-items: flex-start;
  margin-bottom: 28px;
}

.bk-step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.bk-step-label {
  margin-top: 6px;
  font-size: 1em;
  font-weight: 500;
  color: #999;
  text-align: center;
  white-space: nowrap;
}

.bk-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  background: #fff;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  cursor: default;
  transition: all 0.25s;
  user-select: none;
}

.bk-step-circle.bk-active {
  border-color: #cc1d1f;
  color: #cc1d1f;
  background: #fff;
}

.bk-step-circle.bk-completed {
  border-color: #cc1d1f;
  background: #cc1d1f;
  color: #fff;
  cursor: pointer;
}

.bk-step-line {
  flex: 1;
  height: 2px;
  background: #dee2e6;
  margin: 0 4px;
  margin-top: 17px;
  transition: background 0.25s;
}

.bk-step-line.bk-completed-line {
  background: #cc1d1f;
}


/* --- Override sections-bg color:#fff cascade inside the form wrapper --- */
#bk-form-wrapper,
#bk-form-wrapper .form-label,
#bk-form-wrapper .form-check-label,
#bk-form-wrapper h4,
#bk-form-wrapper h5,
#bk-form-wrapper p,
#bk-form-wrapper label,
#bk-form-wrapper small {
  color: #333 !important;
}

#bk-form-wrapper .form-label {
  font-size: 1em;
}

#bk-form-wrapper .text-muted,
#bk-form-wrapper .form-check-label.small {
  color: #6c757d !important;
}

#bk-form-wrapper .text-danger {
  color: #dc3545 !important;
}

#bk-form-wrapper a {
  color: #cc1d1f !important;
}

#bk-form-wrapper .bk-summary-price {
  color: #198754 !important;
}

/* --- Step Panels --- */
.bk-step-panel {
  display: none;
}

.bk-step-panel.bk-active {
  display: block;
}

.bk-step-panel h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 14px;
  margin-bottom: 30px;
}

#bk-form-wrapper .mb-3 {
  margin-bottom: 1.25rem !important;
}

#bk-form-wrapper .mb-4 {
  margin-bottom: 1.75rem !important;
}

#bk-form-wrapper .row.g-3 {
  row-gap: 1.25rem !important;
}

/* --- Error states --- */
.bk-field-error {
  border-color: #dc3545 !important;
}

.bk-error-msg {
  color: #dc3545;
  font-size: 0.82rem;
  margin-top: 4px;
  display: none;
}

.bk-error-msg.bk-visible {
  display: block;
}

#bk-global-error {
  margin-bottom: 16px;
}

/* --- Google Places Autocomplete input --- */
#bk-address-input {
  width: 100%;
}

/* --- Address fields (hidden until autocomplete fires) --- */
#bk-address-fields {
  display: none;
  margin-top: 14px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

#bk-address-fields.bk-visible {
  display: block;
}

/* --- Client / Agent sections --- */
.bk-client-section,
.bk-agent-section {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fafbfc;
}

.bk-client-section h5,
.bk-agent-section h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a2e;
}

.bk-client-section h5 i,
.bk-agent-section h5 i {
  color: #cc1d1f;
  margin-right: 6px;
}

/* Client 2 hidden until toggled */
#bk-client2-section {
  display: none;
}

#bk-client2-section.bk-visible {
  display: block;
}

.bk-add-link {
  font-size: 13px;
  color: #cc1d1f;
  text-decoration: none;
  font-weight: 500;
}

.bk-add-link:hover {
  text-decoration: underline;
  color: #a01618;
}

/* --- Calendar: Day Tabs --- */
#bk-day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 #f8f9fa;
}

#bk-day-tabs::-webkit-scrollbar {
  height: 4px;
}

#bk-day-tabs::-webkit-scrollbar-track {
  background: #f8f9fa;
}

#bk-day-tabs::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 2px;
}

.bk-day-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 64px;
  line-height: 1.3;
}

.bk-day-tab:hover {
  border-color: #cc1d1f;
  background: #fff5f5;
}

.bk-day-tab.bk-selected {
  border-color: #cc1d1f;
  background: #cc1d1f;
  color: #fff;
}

.bk-day-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bk-day-date {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

/* --- Calendar: Time Slots --- */
#bk-time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
}

.bk-time-pill {
  padding: 8px 16px;
  border: 2px solid #dee2e6;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  transition: all 0.2s;
}

.bk-time-pill:hover {
  border-color: #cc1d1f;
  color: #cc1d1f;
  background: #fff5f5;
}

.bk-time-pill.bk-selected {
  border-color: #cc1d1f;
  background: #cc1d1f;
  color: #fff;
}

#bk-calendar-note {
  margin-top: 16px;
  font-size: 13px;
  color: #6c757d;
}

#bk-calendar-note a {
  color: #cc1d1f;
}

/* --- Step 4: Summary Card --- */
#bk-summary-card {
  background: #f8f9fa;
  border-left: 4px solid #cc1d1f;
  border-radius: 4px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.bk-summary-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
}

.bk-summary-row:last-child {
  border-bottom: none;
}

.bk-summary-label {
  font-weight: 600;
  min-width: 130px;
  flex-shrink: 0;
  color: #555;
}

.bk-summary-value {
  color: #1a1a2e;
}

.bk-summary-price {
  color: #198754;
  font-weight: 700;
  font-size: 16px;
}

/* --- Navigation Buttons --- */
#bk-form-wrapper .d-flex.justify-content-end,
#bk-form-wrapper .d-flex.justify-content-between,
#bk-form-wrapper .d-flex.justify-content-start {
  justify-content: center !important;
  gap: 16px;
}

.bk-btn-next,
.bk-btn-submit {
  padding: 10px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  background: #cc1d1f;
  color: #fff;
  transition: background 0.2s;
}

.bk-btn-next:hover,
.bk-btn-submit:hover {
  background: #a01618;
}

.bk-btn-next:disabled,
.bk-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bk-btn-back {
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  background: #fff;
  color: #cc1d1f;
  border: 2px solid #cc1d1f;
  cursor: pointer;
  transition: all 0.2s;
}

.bk-btn-back:hover {
  background: #fff5f5;
}

/* Submit spinner */
.bk-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bk-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes bk-spin {
  to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 991px) {
  #bk-form-wrapper {
    margin: 0 20px;
    padding: 36px 32px;
  }

  .bk-step-label {
    font-size: 0.75em;
  }
}

@media (max-width: 767px) {
  #bk-form-wrapper {
    margin: 0;
    padding: 28px 20px;
    border-radius: 0;
    box-shadow: none;
  }

  .bk-step-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  #bk-step-labels {
    font-size: 9px;
  }

  .bk-step-line {
    min-width: 12px;
  }
}

@media (max-width: 480px) {
  #bk-step-labels span:nth-child(2),
  #bk-step-labels span:nth-child(4) {
    display: none;
  }
}
