/* === PAGE LAYOUT === */
.appointments-full-bg {
  min-height: 100vh;
  background: transparent;
}

.appointments-page {
  background: transparent;
  color: #1f1a17;
  width: 100%;
  margin: 0 auto;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow-x: hidden;
}

main.appointments-page {
  flex: 1;
}

/* === INTRO SECTION === */
.intro {
  text-align: center;
  margin-bottom: 40px;
}

.intro h1 {
  font-size: 2.3rem;
  color: #1f1a17;
}

.intro p {
  color: #4a403a;
}

/* === SERVICES GRID === */
.appointments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  justify-items: center;
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  box-sizing: border-box;
}

.grid-intro {
  grid-column: 1 / -1;
  text-align: center;
  color: #4a403a;
  font-size: 1rem;
  margin-bottom: 10px;
}

.service-card {
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 12px 30px rgba(31, 26, 23, 0.15);
  border: 1px solid rgba(31, 26, 23, 0.1);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(31, 26, 23, 0.2);
}

.service-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fff;
  display: block;
}

.card-content {
  padding: 22px;
  text-align: center;
}

.card-content h2 {
  color: #1f1a17;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.card-content p {
  color: #4a403a;
}

.card-content p.duration {
  font-weight: bold;
  color: var(--clinic-gold-deep);
  margin-bottom: 10px;
}

.service-card[role="button"] {
  cursor: pointer;
  position: relative;
  outline: none;
}

.service-card[role="button"]:focus {
  box-shadow: 0 0 0 3px rgba(200, 164, 90, 0.4);
}

.service-card[role="button"]::after {
  content: "Book this service";
  position: absolute;
  inset: auto 20px 20px 20px;
  background-color: rgba(31, 26, 23, 0.9);
  color: #fff;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform: translateY(10px);
  opacity: 0;
}

.service-card[role="button"]:hover::after,
.service-card[role="button"]:focus::after {
  opacity: 1;
  transform: translateY(0);
}

/* === BOOKING FORM === */
.booking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 16, 13, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3000;
}

.booking-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.booking-modal {
  width: min(1100px, 95vw);
  max-height: 95vh;
  background: #ffffff;
  color: #1f1a17;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(31, 26, 23, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.booking-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: none;
  background: transparent;
  font-size: 28px;
  color: #1f1a17;
  cursor: pointer;
  padding: 0;
}

.booking-modal__header {
  padding: 40px 40px 20px;
  border-bottom: 1px solid var(--clinic-border);
}

.booking-modal__header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--clinic-gold-deep);
  margin-bottom: 0.4rem;
}

.booking-modal__header h3 {
  color: #1f1a17;
  margin-bottom: 6px;
}

.booking-modal__header .selected-service {
  color: #4a403a;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.booking-modal__body {
  display: flex;
  gap: 30px;
  padding: 30px 40px 20px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.booking-feedback {
  margin: 16px 40px 30px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f6efe6;
  border: 1px solid rgba(185, 146, 84, 0.3);
  color: #3a312b;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: 0 10px 25px rgba(31, 26, 23, 0.08);
}

.booking-feedback:empty {
  display: none;
}

.booking-feedback::before {
  content: "✓";
  color: var(--clinic-gold-deep);
  font-weight: 700;
  margin-top: 1px;
}

.booking-feedback.error {
  background: #fdeceb;
  border-color: #f1b0ac;
  color: #7a2d2a;
}

.booking-feedback.error::before {
  content: "!";
  color: #b3312b;
}

.booking-steps {
  flex: 2 1 60%;
}

.booking-summary {
  flex: 1 1 40%;
  background: var(--clinic-cream);
  border: 1px solid var(--clinic-border);
  border-radius: 16px;
  padding: 24px;
  height: fit-content;
}

.booking-summary h4 {
  margin-bottom: 6px;
  color: #1f1a17;
}

.summary-block {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--clinic-border);
  font-size: 0.95rem;
}

.summary-block.total {
  border-bottom: none;
  font-size: 1.05rem;
  font-weight: 600;
}

.booking-step {
  display: none;
}

.booking-step.active {
  display: block;
}

.booking-step h4 {
  margin-bottom: 10px;
  color: #1f1a17;
}

.calendar-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

#bookingDate,
.flatpickr-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--clinic-border);
  font-size: 1rem;
  margin-bottom: 16px;
}

.flatpickr-input {
  background: #fff;
  cursor: pointer;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.time-slot {
  border: 1px solid var(--clinic-border);
  background: #fff;
  color: #1f1a17;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.time-slot:hover {
  border-color: var(--clinic-gold-deep);
  box-shadow: 0 6px 14px rgba(31, 26, 23, 0.12);
}

.time-slot:active {
  transform: translateY(1px);
}

.time-slot.active {
  background: linear-gradient(120deg, var(--clinic-gold), var(--clinic-gold-deep));
  border-color: var(--clinic-gold-deep);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 26, 23, 0.18);
}

.time-slot:disabled {
  background: #f3efe9;
  color: #9a8f86;
  cursor: not-allowed;
  box-shadow: none;
}

.property-details-card {
  margin-top: 24px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--clinic-border);
  padding: 20px;
}

.property-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.property-details-grid .full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--clinic-border);
}

.addon-grid {
  display: grid;
  gap: 20px;
  margin-top: 10px;
}

.addon-category {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--clinic-border);
}

.addon-category h5 {
  margin-bottom: 12px;
  color: #1f1a17;
}

.addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(42, 36, 32, 0.08);
}

.addon-item:last-child {
  border-bottom: none;
}

.addon-price {
  font-weight: 600;
  color: var(--clinic-gold-deep);
}

.addon-qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  border: 1px solid var(--clinic-border);
  background: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.addon-qty {
  width: 60px;
  text-align: center;
  border: 1px solid var(--clinic-border);
  border-radius: 8px;
  padding: 4px 6px;
}

.payment-options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.payment-options label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--clinic-border);
  background: #fff;
}

.square-payment-panel {
  margin-top: 16px;
  background: var(--clinic-cream);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--clinic-border);
}

.square-pay-btn {
  margin-top: 12px;
  width: 100%;
  border-radius: 999px;
}

.booking-modal__footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 40px 30px;
  border-top: 1px solid var(--clinic-border);
}

.btn-outline {
  border: 1px solid var(--clinic-border);
  background: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(120deg, var(--clinic-gold), var(--clinic-gold-deep));
  border: none;
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

@media (max-width: 900px) {
  .booking-modal__body {
    flex-direction: column;
  }
}
