/* ==========================================================================
   Petba Services & Appointments Stylesheet
   ========================================================================== */

:root {
  --petba-primary: #533AD3;
  --petba-primary-dark: #422fa8;
  --petba-primary-light: #ede9fe;
  --petba-accent: #ef4530;
  --petba-bg-soft: #f8fafc;
  --petba-text-dark: #0f172a;
  --petba-text-muted: #64748b;
  --petba-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --petba-radius: 16px;
}

/* Category Filter Pills */
.petba-category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.petba-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--petba-text-dark);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.petba-category-pill:hover,
.petba-category-pill.active {
  background: linear-gradient(135deg, var(--petba-primary) 0%, var(--petba-primary-dark) 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(83, 58, 211, 0.25);
}

/* Filter Card Header */
.petba-filter-card {
  background: #ffffff;
  border-radius: var(--petba-radius);
  padding: 24px;
  box-shadow: var(--petba-card-shadow);
  border: 1px solid #f1f5f9;
  margin-bottom: 28px;
}

/* Provider Cards */
.petba-service-card {
  background: #ffffff;
  border-radius: var(--petba-radius);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.petba-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.12);
  border-color: #cbd5e1;
}

.petba-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 50px;
  z-index: 2;
}

.petba-card-rating {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ffffff;
  color: #d97706;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.petba-service-card .card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}

.petba-service-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.petba-service-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.petba-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.petba-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--petba-text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.petba-card-meta {
  color: var(--petba-text-muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Vendor-authored rich-text bio (service.description) — arbitrary WYSIWYG markup
   with its own headings/images/paragraphs. Boxed with a border so it reads as a
   distinct sub-section instead of blending into the surrounding "About" card. */
.petba-service-description {
  border: 1px solid #e5e7eb;
  border-radius: var(--petba-radius);
  padding: 20px;
  overflow: hidden; /* clearfix: contain floated images from the vendor's markup */
}

.petba-service-description > :first-child {
  margin-top: 0;
}

.petba-service-description > :last-child {
  margin-bottom: 0;
}

.petba-service-description h1,
.petba-service-description h2,
.petba-service-description h3,
.petba-service-description h4 {
  padding-bottom: 10px;
  margin-top: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.petba-service-description img {
  max-width: 100%;
  max-height: 320px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px;
}

.petba-service-description p {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Service Detail Page */
.petba-detail-hero {
  background: linear-gradient(135deg, var(--petba-primary) 0%, var(--petba-accent) 100%);
  color: #ffffff;
  border-radius: var(--petba-radius);
  padding: 36px;
  margin-bottom: 32px;
  box-shadow: 0 10px 30px rgba(83, 58, 211, 0.25);
}

.petba-detail-hero .hero-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

/* Brand-themed button overrides, scoped to the service pages this stylesheet is loaded on */
#content .petba-detail-hero .btn-warning {
  background-color: var(--petba-accent);
  border-color: var(--petba-accent);
  color: #ffffff;
}

#content .petba-detail-hero .btn-warning:hover {
  background-color: #c73520;
  border-color: #c73520;
  color: #ffffff;
}

#content .btn-primary {
  background-color: var(--petba-primary);
  border-color: var(--petba-primary);
}

#content .btn-primary:hover {
  background-color: var(--petba-primary-dark);
  border-color: var(--petba-primary-dark);
}

.petba-package-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--petba-radius);
  padding: 24px;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.petba-package-card:hover {
  border-color: var(--petba-primary);
  box-shadow: 0 8px 24px rgba(83, 58, 211, 0.12);
}

.petba-package-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--petba-primary-dark);
}

/* Time Slot Picker Grid */
.petba-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.petba-slot-btn {
  padding: 10px 6px;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--petba-text-dark);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.petba-slot-btn:hover:not(.disabled) {
  border-color: var(--petba-primary);
  color: var(--petba-primary-dark);
  background: var(--petba-primary-light);
}

.petba-slot-btn.selected {
  background: var(--petba-primary);
  color: #ffffff;
  border-color: var(--petba-primary-dark);
  box-shadow: 0 4px 10px rgba(83, 58, 211, 0.3);
}

.petba-slot-btn.disabled {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Appointments Dashboard / Bookings List */
.petba-booking-card {
  background: #ffffff;
  border-radius: var(--petba-radius);
  border: 1px solid #e2e8f0;
  padding: 24px;
  margin-bottom: 20px;
  transition: all 0.25s ease;
  box-shadow: var(--petba-card-shadow);
}

.petba-booking-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.petba-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.petba-status-confirmed {
  background: #dcfce7;
  color: #15803d;
}

.petba-status-rescheduled {
  background: #e0f2fe;
  color: #0369a1;
}

.petba-status-completed {
  background: #f1f5f9;
  color: #475569;
}

.petba-status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.petba-ref-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.95rem;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  color: #334155;
}

/* ==========================================================================
   My Appointments — timeline layout (account/booking_list)
   ========================================================================== */
.bk-appt-title { font-family: 'Quicksand', sans-serif; font-weight: 700; color: var(--petba-text-dark); }
.bk-appt-book-btn { background-color: var(--petba-primary) !important; border-color: var(--petba-primary) !important; }
.bk-appt-book-btn:hover { background-color: var(--petba-primary-dark) !important; border-color: var(--petba-primary-dark) !important; }

.bk-appt-filter.bk-appt-filter-active {
  background-color: var(--petba-text-dark) !important;
  border-color: var(--petba-text-dark) !important;
  color: #fff !important;
}

.bk-appt-timeline { position: relative; }
.bk-appt-section { position: relative; margin-bottom: 40px; }
.bk-appt-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--petba-text-muted);
  margin-bottom: 20px;
}
.bk-appt-section-title-active { color: var(--petba-primary); }
.bk-appt-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--petba-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.bk-appt-dot-active { background: var(--petba-primary-light); color: var(--petba-primary); }
.bk-appt-section-past { opacity: .85; }

.bk-appt-list { display: flex; flex-direction: column; gap: 16px; }

.bk-appt-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--petba-radius);
  padding: 20px 24px;
  box-shadow: var(--petba-card-shadow);
  transition: box-shadow .2s;
}
.bk-appt-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,.08); }
.bk-appt-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.bk-appt-card-top h3 { font-family: 'Quicksand', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--petba-text-dark); margin: 0 0 4px; }
.bk-appt-card-top p { font-size: .85rem; color: var(--petba-text-muted); margin: 0; }
.bk-appt-card-top p i { color: var(--petba-text-dark); margin-right: 4px; }

.bk-appt-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  margin-bottom: 16px;
}
.bk-appt-info-item { display: flex; align-items: flex-start; gap: 10px; }
.bk-appt-info-item i { color: #94a3b8; margin-top: 3px; }
.bk-appt-info-main { font-weight: 600; font-size: .9rem; color: var(--petba-text-dark); margin: 0; }
.bk-appt-info-sub { font-size: .82rem; color: var(--petba-text-muted); margin: 0; }

.bk-appt-card-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.bk-appt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.bk-appt-btn-ghost { background: transparent; border-color: #cbd5e1; color: var(--petba-text-dark); }
.bk-appt-btn-ghost:hover { border-color: var(--petba-primary); color: var(--petba-primary); }
.bk-appt-btn-outline { background: transparent; border-color: var(--petba-primary); color: var(--petba-primary); }
.bk-appt-btn-outline:hover { background: var(--petba-primary-light); }
.bk-appt-btn-danger { background: transparent; border-color: #fecaca; color: #dc2626; }
.bk-appt-btn-danger:hover { background: #fee2e2; }
.bk-appt-btn-primary { background: var(--petba-primary); border-color: var(--petba-primary); color: #fff; }
.bk-appt-btn-primary:hover { background: var(--petba-primary-dark); border-color: var(--petba-primary-dark); color: #fff; }

/* ==========================================================================
   Service detail hero (photo variant) + package cards
   ========================================================================== */
.petba-detail-hero-photo {
  background-size: cover;
  background-position: center;
  color: #fff;
}
.petba-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.16);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.petba-hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fbbf24;
  font-weight: 700;
  font-size: .9rem;
}
.petba-package-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--petba-primary-light);
  color: var(--petba-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ==========================================================================
   4-step booking wizard modal (service_info.twig)
   ========================================================================== */
.bk-book-header {
  background: var(--petba-primary);
  color: #fff;
}
.bk-book-progress { width: 100%; height: 4px; background: #f1f5f9; }
.bk-book-progress-bar { height: 100%; background: var(--petba-primary); transition: width .3s ease; }

.bk-book-step-title { font-family: 'Quicksand', sans-serif; font-weight: 700; color: var(--petba-text-dark); margin-bottom: 4px; }
.bk-book-step-sub { color: var(--petba-text-muted); font-size: .9rem; margin-bottom: 16px; }

.bk-package-radio-list { display: flex; flex-direction: column; gap: 12px; }
.bk-package-radio {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all .15s;
}
.bk-package-radio:hover { border-color: var(--petba-primary); background: #f8fafc; }
.bk-package-radio input { width: 20px; height: 20px; accent-color: var(--petba-primary); flex-shrink: 0; }
.bk-package-radio:has(input:checked) { border-color: var(--petba-primary); background: var(--petba-primary-light); }
.bk-package-radio-body { flex-grow: 1; }
.bk-package-radio-name { font-weight: 700; color: var(--petba-text-dark); }
.bk-package-radio-desc { font-size: .82rem; color: var(--petba-text-muted); }
.bk-package-radio-price { font-weight: 800; color: var(--petba-primary-dark); white-space: nowrap; }

.bk-pet-radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.bk-pet-radio {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all .15s;
}
.bk-pet-radio:hover { border-color: var(--petba-primary); background: #f8fafc; }
.bk-pet-radio input { position: absolute; opacity: 0; }
.bk-pet-radio:has(input:checked) { border-color: var(--petba-primary); background: var(--petba-primary-light); }
.bk-pet-radio-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--petba-primary);
  overflow: hidden;
}
.bk-pet-radio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bk-pet-radio-name { font-weight: 700; font-size: .88rem; color: var(--petba-text-dark); }
.bk-pet-radio-breed { font-size: .76rem; color: var(--petba-text-muted); }
.bk-pet-radio-add { border-style: dashed; color: var(--petba-text-muted); }
.bk-pet-radio-add .bk-pet-radio-avatar { background: #f1f5f9; color: var(--petba-text-muted); }

.bk-book-summary { display: flex; flex-direction: column; gap: 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px; }
.bk-book-summary-row { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #e2e8f0; }
.bk-book-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.bk-book-summary-row i { width: 36px; height: 36px; border-radius: 10px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); color: var(--petba-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bk-book-summary-row span { display: block; font-size: .78rem; color: var(--petba-text-muted); }
.bk-book-summary-row strong { display: block; font-size: 1rem; color: var(--petba-text-dark); }
.bk-book-summary-total strong { color: var(--petba-primary-dark); font-size: 1.2rem; }

/* ==========================================================================
   Responsive overrides (this file previously had zero @media rules)
   ========================================================================== */
@media (max-width: 767.98px) {
  /* Service detail hero */
  .petba-detail-hero {
    padding: 22px 18px;
    border-radius: 12px;
  }
  .petba-detail-hero .hero-title {
    font-size: 1.5rem;
  }
  .petba-detail-hero-photo {
    min-height: 200px;
  }

  /* Service/provider grid cards */
  .petba-service-card .card-img-wrap {
    height: 150px;
  }
  .petba-card-body {
    padding: 14px;
  }
  .petba-card-title {
    font-size: 1rem;
  }

  /* Time slot picker: fewer, wider columns so labels don't clip */
  .petba-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
  }

  /* Booking summary / package cards */
  .petba-package-card {
    padding: 16px;
  }
  .bk-appt-info-grid {
    grid-template-columns: 1fr;
  }
  .bk-appt-card {
    padding: 16px;
  }
  .bk-appt-card-actions {
    justify-content: flex-start;
  }
  .bk-appt-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Booking modal (4-step wizard) — keep it usable inside Bootstrap's
   modal-dialog on very narrow phones */
@media (max-width: 575.98px) {
  .modal-dialog:has(.bk-book-header) {
    margin: 0.5rem;
  }
  .bk-pet-radio-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .bk-package-radio {
    flex-wrap: wrap;
  }
  .bk-package-radio-price {
    margin-left: auto;
  }
  .petba-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    max-height: 200px;
  }
}
