/* ============================================
   Booking Form Flow — Light Theme Styles
   ============================================ */

/* ---------- Page Background ---------- */
.booking-page {
  background: #f0f0f3;
  min-height: 100vh;
  padding: 24px 16px 48px;
}

@media (min-width: 640px) {
  .booking-page {
    padding: 40px 24px 64px;
  }
}

/* ---------- Cards ---------- */
.booking-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}

.booking-card + .booking-card {
  margin-top: 20px;
}

/* ---------- Branding Card ---------- */
.branding-card {
  text-align: center;
  padding: 36px 24px 28px;
}

.branding-card__logo {
  max-height: 80px;
  width: auto;
  margin: 0 auto 16px;
  display: block;
}

.branding-card__name {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1f36;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.branding-card__name span {
  color: #f59e0b;
}

.branding-card__subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 20px;
  line-height: 1.5;
}

.branding-card__contact {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #475569;
}

.branding-card__contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  text-decoration: none;
  transition: color 0.2s;
}

.branding-card__contact a:hover {
  color: #1a1f36;
}

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

/* ---------- Form Card ---------- */
.form-card {
  padding: 32px 24px 36px;
}

@media (min-width: 640px) {
  .form-card {
    padding: 36px 32px 40px;
  }
}

.form-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1f36;
  margin: 0 0 4px;
}

.form-card__subtitle {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0 0 28px;
}

/* ---------- Form Fields ---------- */
.bf-field {
  margin-bottom: 20px;
}

.bf-field__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1f36;
  margin-bottom: 6px;
}

.bf-field__label .required {
  color: #ef4444;
  margin-left: 2px;
}

.bf-field__hint {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
}

.bf-field__input,
.bf-field__select,
.bf-field__textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #1a1f36;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.bf-field__input::placeholder,
.bf-field__textarea::placeholder {
  color: #94a3b8;
}

.bf-field__input:focus,
.bf-field__select:focus,
.bf-field__textarea:focus {
  border-color: #1a1f36;
  box-shadow: 0 0 0 3px rgba(26, 31, 54, 0.08);
}

.bf-field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.47 5.47a.75.75 0 0 1 1.06 0L8 7.94l2.47-2.47a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.bf-field__textarea {
  resize: vertical;
  min-height: 80px;
}

/* ---------- Calendar ---------- */
.bf-calendar {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  user-select: none;
}

.bf-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.bf-calendar__month {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1f36;
}

.bf-calendar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bf-calendar__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  transition: background 0.15s, color 0.15s;
}

.bf-calendar__nav-btn:hover {
  background: #e2e8f0;
  color: #1a1f36;
}

.bf-calendar__nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bf-calendar__nav-btn svg {
  width: 18px;
  height: 18px;
}

.bf-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 12px;
  gap: 2px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.bf-calendar__weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 0;
}

.bf-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 12px 12px;
  gap: 4px;
}

.bf-calendar__day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1f36;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  position: relative;
}

.bf-calendar__day:hover:not(.is-disabled):not(.is-empty):not(.is-selected) {
  background: #f1f5f9;
}

.bf-calendar__day.is-today:not(.is-selected) {
  font-weight: 700;
  color: #1a1f36;
  background: #f1f5f9;
}

.bf-calendar__day.is-selected {
  background: #1a1f36;
  color: #ffffff;
  font-weight: 600;
  transform: scale(1.05);
}

.bf-calendar__day.is-disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  text-decoration: line-through;
}

.bf-calendar__day.is-empty {
  cursor: default;
}

.bf-calendar__day.is-fully-booked {
  color: #cbd5e1;
  cursor: not-allowed;
  position: relative;
}

.bf-calendar__day.is-fully-booked::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #ef4444;
  border-radius: 50%;
}

/* ---------- Time Slots ---------- */
.bf-timeslots {
  margin-top: 12px;
}

.bf-timeslots__prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: #ef4444;
  background: #fef2f2;
  border-radius: 10px;
}

.bf-timeslots__prompt.is-neutral {
  color: #64748b;
  background: #f8fafc;
}

.bf-timeslots__prompt svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.bf-timeslots__hint {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 6px;
}

.bf-timeslots__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bf-timeslots__btn {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1f36;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.bf-timeslots__btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.bf-timeslots__btn.is-selected {
  background: #1a1f36;
  color: #ffffff;
  border-color: #1a1f36;
}

/* ---------- Terms Checkbox ---------- */
.bf-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.bf-terms__checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #1a1f36;
  cursor: pointer;
}

.bf-terms__label {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

.bf-terms__label a {
  color: #1a1f36;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bf-terms__label a:hover {
  color: #f59e0b;
}

/* ---------- Submit Button ---------- */
.bf-submit {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: #1a1f36;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.bf-submit:hover:not(:disabled) {
  background: #2d3352;
  box-shadow: 0 4px 14px rgba(26, 31, 54, 0.25);
}

.bf-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.bf-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* ---------- Loading Spinner ---------- */
.bf-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bf-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* ---------- Messages ---------- */
.bf-message {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}

.bf-message.is-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  display: block;
}

.bf-message.is-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  display: block;
}

/* ---------- Skeleton / Loading States ---------- */
.bf-timeslots__loading {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}

.bf-timeslots__loading-pill {
  width: 70px;
  height: 40px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: bf-shimmer 1.5s ease-in-out infinite;
  border-radius: 10px;
}

@keyframes bf-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Override global dark theme for booking page ---------- */
.booking-page,
.booking-page *,
.booking-page *::before,
.booking-page *::after {
  box-sizing: border-box;
}

/* Override theme's dark bg */
body.page-template-default .booking-page,
body.home .booking-page {
  background: #f0f0f3;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .branding-card {
    padding: 28px 20px 24px;
  }

  .branding-card__name {
    font-size: 1.5rem;
  }

  .form-card {
    padding: 24px 18px 28px;
  }

  .form-card__title {
    font-size: 1.2rem;
  }

  .bf-calendar__day {
    height: 36px;
    font-size: 0.8125rem;
  }

  .bf-timeslots__btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }
}

/* ---------- Dynamic Service-Specific Field ---------- */
.bf-dynamic-field {
  animation: bf-field-slide-in 0.3s ease-out;
  border-left: 3px solid #f59e0b;
  padding-left: 16px;
  margin-left: 0;
}

@keyframes bf-field-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bf-dynamic-field .bf-field__label {
  color: #1a1f36;
  font-weight: 600;
}

.bf-dynamic-field .bf-field__hint {
  color: #f59e0b;
  font-size: 0.8rem;
  font-style: italic;
}

/* ============================================
   Completed Jobs Gallery — Light Theme
   ============================================ */

/* ---------- Section ---------- */
.gallery-section {
  background: #f0f0f3;
  padding: 0 16px 48px;
}

@media (min-width: 640px) {
  .gallery-section {
    padding: 0 24px 64px;
  }
}

/* ---------- Header Card ---------- */
.gallery-header-card {
  margin-bottom: 0;
}

.gallery-header {
  text-align: center;
  padding: 32px 24px 28px;
}

.gallery-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  color: #ffffff;
  margin: 0 auto 14px;
}

.gallery-header__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a1f36;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.gallery-header__subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ---------- Grid Card ---------- */
.gallery-grid-card {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 1px solid #e5e7eb;
}

.gallery-header-card {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 3px;
}

@media (min-width: 420px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Grid Item ---------- */
.gallery-grid__item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #e5e7eb;
}

.gallery-grid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-grid__item:hover .gallery-grid__img {
  transform: scale(1.08);
}

.gallery-grid__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 46, 0);
  color: rgba(255, 255, 255, 0);
  transition: all 0.3s ease;
}

.gallery-grid__item:hover .gallery-grid__overlay {
  background: rgba(26, 26, 46, 0.35);
  color: rgba(255, 255, 255, 1);
}

/* ---------- View All ---------- */
.gallery-view-all {
  text-align: center;
  padding: 20px 24px 24px;
  border-top: 1px solid #f1f3f5;
}

.gallery-view-all__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f3460;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  transition: all 0.2s ease;
}

.gallery-view-all__btn:hover {
  background: #0f3460;
  color: #ffffff;
  border-color: #0f3460;
}

/* ---------- Lightbox ---------- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s ease;
}

.gallery-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 36px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
  z-index: 10;
}

.gallery-lightbox__close:hover {
  opacity: 1;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
}

.gallery-lightbox__nav:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox__prev { left: 16px; }
.gallery-lightbox__next { right: 16px; }

.gallery-lightbox__caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  text-align: center;
  max-width: 80%;
  margin: 0;
}
