/* ===== AF Booking — Reset de escopo ===== */
.af-booking-wrap *,
.af-client-wrap * {
  box-sizing: border-box;
}

.af-booking-wrap,
.af-client-wrap {
  max-width: 600px;
  margin: 0 auto;
  font-family: inherit;
  color: #1a1a1a;
  line-height: 1.5;
}

/* ===== Steps ===== */
.af-step { display: none; }
.af-step--active { display: block; }

.af-step__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: #111;
}

/* ===== Calendário ===== */
.af-calendar {
  margin-bottom: 1.5rem;
}

.af-calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}

.af-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.af-calendar__weekday {
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 600;
  padding: 4px 0;
}

.af-calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  border: 2px solid transparent;
  background: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  padding: 0;
  line-height: 1;
}

.af-calendar__day:hover:not(.af-calendar__day--disabled) {
  border-color: #2563eb;
  background: #eff6ff;
}

.af-calendar__day--selected {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}

.af-calendar__day--today {
  font-weight: 700;
}

.af-calendar__day--disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Slots ===== */
.af-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 1.5rem;
  min-height: 48px;
}

.af-slot {
  padding: 0.55rem 0.4rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  background: #fff;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  line-height: 1.2;
}

.af-slot:hover:not(.af-slot--unavailable) {
  border-color: #2563eb;
  background: #eff6ff;
}

.af-slot--selected {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
}

.af-slot--unavailable {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ===== Form ===== */
.af-field {
  margin-bottom: 1.25rem;
}

.af-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #374151;
}

.af-field input,
.af-field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.15s;
  appearance: auto;
}

.af-field input:focus,
.af-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.af-form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ===== Resumo ===== */
.af-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.af-summary strong { color: #2563eb; }

/* ===== Data selecionada ===== */
.af-selected-date {
  color: #2563eb;
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ===== Buttons ===== */
.af-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.af-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.af-btn--primary  { background: #2563eb; color: #fff; }
.af-btn--primary:hover:not(:disabled)  { background: #1d4ed8; }

.af-btn--secondary { background: #f1f5f9; color: #374151; }
.af-btn--secondary:hover:not(:disabled) { background: #e2e8f0; }

/* ===== Loading / Spinner ===== */
.af-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.af-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: af-spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes af-spin {
  to { transform: rotate(360deg); }
}

/* ===== Error / Notice ===== */
.af-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin: 0.4rem 0 0;
}

/* ===== PASSO 4: SUCESSO ===== */
.af-success-message {
  padding: 40px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  text-align: center;
  animation: afFadeUp 0.5s ease-out;
}

.af-success-icon {
  font-size: 60px;
  line-height: 1;
  margin-bottom: 20px;
  display: block;
}

/* Botão de pagamento (Verde) */
#af-payment-link {
  background-color: #22c55e !important;
  color: white !important;
  border: none;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  padding: 15px 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: inline-block;
  text-decoration: none;
}

#af-payment-link:hover {
  background-color: #16a34a !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@keyframes afFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsivo (Fim do arquivo) ===== */
@media (max-width: 480px) {
  .af-booking-wrap,
  .af-client-wrap {
    /* Folga de 3rem para evitar o rodapé */
    padding: 0 0.5rem 3rem;
  }

  .af-calendar__day {
    /* Compacta os dias no mobile */
    aspect-ratio: auto;
    height: 38px;
    font-size: 0.8rem;
  }

  .af-calendar__weekday {
    font-size: 0.7rem;
  }

  .af-step__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .af-slots {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  }
}
