/* Online booking modal (js/booking-modal.js). Replaces the HouseCall Pro widget. */
html.chs-booking-open, html.chs-booking-open body { overflow: hidden; }

.chs-booking {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: rgba(0, 20, 52, 0.62);
  font-family: 'Poppins', sans-serif;
}
.chs-booking.is-open { display: flex; }

.chs-booking-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.chs-booking-top {
  padding: 1.1rem 1.5rem 0;
  flex-shrink: 0;
}
.chs-booking-body {
  padding: 1rem 1.5rem 1.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chs-booking-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: #888;
  cursor: pointer;
}
.chs-booking-close:hover { background: #f5f8ff; color: #002969; }

.chs-booking-progress {
  display: flex;
  gap: 0.4rem;
  margin: 0 2.5rem 0.25rem 0;
}
.chs-booking-progress span {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #e3e9f5;
}
.chs-booking-progress span.is-done { background: #ea0000; }
.chs-booking-progress-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
  margin-top: 0.5rem;
}

.chs-booking-step { display: none; }
.chs-booking-step.is-active { display: block; }
.chs-booking h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #002969;
  line-height: 1.3;
  text-transform: none;
  margin: 0 0 0.4rem;
}
.chs-booking-sub {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.chs-booking-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ea0000;
  margin: 1.1rem 0 0.5rem;
}
.chs-booking-group-title:first-of-type { margin-top: 0; }

/* Service list */
.chs-booking-service {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid #dde3ee;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.chs-booking-service:hover, .chs-booking-service:focus-visible { border-color: #ea0000; outline: none; }
.chs-booking-service-text { flex: 1; min-width: 0; }
.chs-booking-service-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #002969;
  margin-bottom: 0.2rem;
}
.chs-booking-service-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.45;
}
.chs-booking-service-price {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #002969;
}

/* Form fields */
.chs-booking-field { margin-bottom: 0.85rem; }
.chs-booking-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #002969;
  margin-bottom: 0.35rem;
}
.chs-booking-field input, .chs-booking-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #dde3ee;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  box-sizing: border-box;
}
.chs-booking-field textarea { min-height: 84px; resize: vertical; }
.chs-booking-field input:focus, .chs-booking-field textarea:focus { outline: none; border-color: #002969; }
.chs-booking-row { display: flex; gap: 0.6rem; }
.chs-booking-row .chs-booking-field { flex: 1; min-width: 0; }
.chs-booking-row .chs-booking-field.is-small { flex: 0 0 5.5rem; }
.chs-booking-section-label {
  font-size: 0.85rem;
  color: #444;
  margin: 0.4rem 0 0.75rem;
}

.chs-booking-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.chs-booking-pill {
  display: inline-block;
  border: 2px solid #ea0000;
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #002969;
}

/* Buttons */
.chs-booking-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #ea0000;
  color: #fff !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none !important;
}
.chs-booking-primary:hover { background: #cd0000; }
.chs-booking-primary:disabled { opacity: 0.55; cursor: default; }
.chs-booking-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 0.75rem;
  color: #888;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.chs-booking-back:hover { color: #002969; }
.chs-booking-error {
  display: none;
  background: #fff1f1;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: #b00000;
  line-height: 1.5;
}
.chs-booking-error.is-visible { display: block; }
.chs-booking-error a, .chs-booking-note a, .chs-booking-status a { color: #ea0000; font-weight: 600; }
.chs-booking-note {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.5;
  margin: 0.75rem 0 0;
  text-align: center;
}

/* Time slots (same pattern as the ad page booking forms) */
.chs-booking-days {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
}
.chs-booking-day {
  flex: 0 0 auto;
  background: #f5f8ff;
  border: 1.5px solid #dde3ee;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #002969;
  cursor: pointer;
  white-space: nowrap;
}
.chs-booking-day.is-active { background: #002969; border-color: #002969; color: #fff; }
.chs-booking-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.chs-booking-slot {
  background: #fff;
  border: 1.5px solid #dde3ee;
  border-radius: 8px;
  padding: 0.6rem 0.4rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #002969;
  cursor: pointer;
}
.chs-booking-slot:hover, .chs-booking-slot:focus-visible { border-color: #ea0000; outline: none; }
.chs-booking-status {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: #666;
  text-align: center;
  padding: 1rem 0;
  line-height: 1.6;
}
.chs-booking-skeleton {
  height: 2.6rem;
  border-radius: 8px;
  background: #eef1f7;
  animation: chs-booking-pulse 1.1s ease-in-out infinite;
}
.chs-booking-skeleton.is-tab { height: 2.1rem; width: 5.5rem; border-radius: 50px; flex: 0 0 auto; }
@keyframes chs-booking-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Success */
.chs-booking-success { text-align: center; padding-top: 0.5rem; }
.chs-booking-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: #ea0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chs-booking-success .chs-booking-picked { justify-content: center; }

@media (max-width: 600px) {
  .chs-booking { padding: 0; align-items: stretch; }
  .chs-booking-card { max-width: none; border-radius: 0; height: 100%; }
  .chs-booking-top { padding: 1rem 1rem 0; }
  .chs-booking-body { padding: 1rem 1rem 1.5rem; }
  .chs-booking-row { flex-wrap: wrap; }
  .chs-booking-row .chs-booking-field { flex: 1 1 100%; }
  .chs-booking-row .chs-booking-field.is-small { flex: 1 1 calc(50% - 0.3rem); }
}
