/* AgendaClinica - Pagina de agendamento customizada
   Visual elegante, feminino, moderno - construido do zero (nao usa o
   template do Easy!Appointments). Fala com o Easy!Appointments apenas
   via as mesmas rotas que o navegador de um cliente usaria. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --rose: #b76e79;
  --rose-dark: #9c5760;
  --rose-light: #f3dde1;
  --blush: #fdf6f4;
  --cream: #fffaf7;
  --ink: #3a2c2f;
  --muted: #8a7478;
  --border: #f0dde1;
  --success: #6b9b7a;
  --error: #c0555f;
  --shadow: 0 8px 28px rgba(183, 110, 121, 0.14);
  --shadow-lg: 0 20px 50px rgba(183, 110, 121, 0.20);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--blush);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-header {
  background: var(--cream);
  text-align: center;
  padding: 28px 20px 8px;
}
.brand-logo {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  body { background: var(--blush); padding: 24px 0; }
  .container { min-height: calc(100vh - 48px); border-radius: 24px; overflow: hidden; }
}

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(160deg, var(--rose) 0%, var(--rose-dark) 100%);
  color: #fff;
  padding: 44px 28px 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -80px;
  right: -60px;
}
.hero::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  bottom: -50px;
  left: -40px;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin-bottom: 10px;
}
.hero p {
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 34ch;
  margin: 0;
}
.hero-cta {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--rose-dark);
  border: none;
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease;
}
.hero-cta:active { transform: scale(0.97); }

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero-link:active { transform: scale(0.97); }
.hero-link:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- AREA DA CLIENTE ---------- */
.client-gate { padding-top: 10px; text-align: center; }
.client-gate-icon { font-size: 2.4rem; margin-bottom: 6px; }
.client-gate h2 { margin-bottom: 8px; }
.client-gate p { color: var(--muted); font-size: 0.88rem; margin: 0 0 20px; }
.client-gate .field { text-align: left; }

.client-tabs {
  display: flex;
  background: var(--blush);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 20px;
}
.client-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 12px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}
.client-tab.active { background: #fff; color: var(--rose-dark); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }

.client-section-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.appt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.appt-card-date {
  flex-shrink: 0;
  background: var(--rose-light);
  color: var(--rose-dark);
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}
.appt-card-info .name { font-weight: 700; font-size: 0.92rem; }
.appt-card-info .meta { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.client-new-panel { text-align: center; padding: 30px 10px; }
.client-new-panel p { color: var(--muted); margin-bottom: 18px; }
.client-empty { color: var(--muted); font-size: 0.88rem; text-align: center; padding: 20px 10px; }

.client-switch-number { text-align: center; margin-top: 22px; }
.client-switch-number a { color: var(--muted); font-size: 0.8rem; text-decoration: underline; }

.package-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.package-card .name { font-weight: 700; margin-bottom: 6px; }
.package-card .progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 6px;
}
.package-card .progress-fill {
  height: 100%;
  background: var(--rose);
  border-radius: 100px;
}
.package-card .meta { color: var(--muted); font-size: 0.8rem; }
.package-next { color: var(--rose-dark); font-weight: 700; font-size: 0.82rem; margin-top: 10px; }
.package-actions { display: flex; gap: 8px; margin-top: 12px; }
.package-actions .package-book-btn { flex: 1.3; padding: 11px; font-size: 0.85rem; }
.package-request-btn {
  flex: 1;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.package-request-form { margin-top: 10px; display: flex; gap: 8px; }
.package-request-form input[type="date"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--ink);
}
.package-request-form button { flex-shrink: 0; padding: 10px 14px; font-size: 0.82rem; }

.countdown-banner {
  margin-top: 22px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 14px 16px;
}
.countdown-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}
.countdown-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.countdown-box {
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 4px;
  min-width: 56px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.countdown-box span {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown-box label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- PROCEDURES ---------- */
.section { padding: 28px; }
.section-title {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.section-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.category-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rose-dark);
  margin: 22px 0 10px;
}
.category-heading:first-child { margin-top: 0; }

/* ---------- SANFONA DE CATEGORIAS (pagina inicial) ---------- */
.accordion-list { display: block; }
.category-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
}
.category-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.category-accordion-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.category-accordion-count {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.category-accordion-chevron {
  color: var(--rose);
  font-size: 1.4rem;
  transition: transform 0.25s ease;
  line-height: 1;
}
.category-accordion.open .category-accordion-chevron { transform: rotate(90deg); }
.category-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.category-accordion.open .category-accordion-body { max-height: 3000px; }
.category-accordion-body.procedure-list {
  padding: 0 14px 14px;
  margin-bottom: 0;
}
.category-accordion-body .procedure-card {
  box-shadow: none;
}

.procedure-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.procedure-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.procedure-card:hover, .procedure-card:focus-visible {
  box-shadow: var(--shadow);
  border-color: var(--rose-light);
}
.procedure-card .name {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 4px;
}
.procedure-card .meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.procedure-card .price {
  font-weight: 800;
  color: var(--rose-dark);
  white-space: nowrap;
  font-size: 1rem;
}
.provisional-badge {
  display: inline-block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fff4e0;
  color: #9c6b1f;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 700;
}

.promo-badge {
  display: inline-block;
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  background: var(--rose-light);
  color: var(--rose-dark);
  padding: 2px 9px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 700;
}

/* ---------- BOOKING FLOW (full screen overlay) ---------- */
.flow-overlay {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.flow-overlay.open { transform: translateY(0); }

@media (min-width: 480px) {
  .flow-overlay {
    max-width: 480px;
    left: 50%;
    transform: translate(-50%, 100%);
    border-radius: 24px;
    top: 24px;
    bottom: 24px;
    height: auto;
    box-shadow: var(--shadow-lg);
  }
  .flow-overlay.open { transform: translate(-50%, 0); }
}

.flow-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.flow-back {
  border: none;
  background: var(--blush);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--rose-dark);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.flow-title { font-size: 1.15rem; }
.flow-steps {
  display: flex;
  gap: 5px;
  padding: 0 20px;
  margin-top: 12px;
}
.flow-step-dot {
  height: 4px;
  flex: 1;
  border-radius: 4px;
  background: var(--border);
}
.flow-step-dot.active, .flow-step-dot.done { background: var(--rose); }

.flow-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.flow-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
}

.btn-primary {
  width: 100%;
  background: var(--rose);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* Step: choose service (radio cards reuse .procedure-card + selected state) */
.procedure-card.selected {
  border-color: var(--rose);
  box-shadow: 0 0 0 2px var(--rose-light);
}

/* Step: calendar */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.calendar-nav button {
  border: none;
  background: var(--blush);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--rose-dark);
  font-size: 1rem;
}
.calendar-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.calendar-month-label { font-size: 1.1rem; }
.calendar-weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.calendar-weekdays span {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 6px;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--ink);
}
.calendar-day:hover:not(:disabled) { background: var(--rose-light); }
.calendar-day.selected { background: var(--rose); color: #fff; font-weight: 700; }
.calendar-day:disabled { color: var(--border); cursor: not-allowed; }
.calendar-day.empty { visibility: hidden; }

/* Step: time slots */
.hours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hour-slot {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}
.hour-slot:hover { border-color: var(--rose); }
.hour-slot.selected { background: var(--rose); color: #fff; border-color: var(--rose); }
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 10px;
  font-size: 0.9rem;
}

/* Step: form */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--muted);
}
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-light);
}
.field textarea { resize: vertical; min-height: 70px; }
.field-error {
  color: var(--error);
  font-size: 0.76rem;
  margin-top: 5px;
  display: none;
}
.field.invalid input { border-color: var(--error); }
.field.invalid .field-error { display: block; }

/* Step: confirmation summary */
.summary-card {
  background: var(--blush);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--muted); }
.summary-row .value { font-weight: 700; text-align: right; }

/* Feedback screens (success / error) */
.feedback {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}
.feedback-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #fff;
}
.feedback-icon.success { background: var(--success); }
.feedback-icon.error { background: var(--error); }
.feedback h2 { margin-bottom: 10px; }
.feedback p { color: var(--muted); font-size: 0.9rem; max-width: 30ch; margin: 0 0 24px; }

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- SOBRE A PROFISSIONAL ---------- */
.bio-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.bio-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.bio-text { padding: 16px 20px 20px; }
.bio-name {
  font-weight: 700;
  font-size: 1.1rem;
}
.bio-role {
  color: var(--rose-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
/* ---------- RODAPE ESCURO: SOBRE + REDES SOCIAIS (largura total, fora do card) ---------- */
.site-footer {
  background: var(--ink);
  width: 100%;
  margin-top: 48px;
}
.site-footer-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 20px 18px;
}
.site-footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 72px;
}
.site-footer-col { flex: 1 1 240px; }
.site-footer-col-social { flex: 0 1 170px; }
.footer-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 10px;
}
.footer-about-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.94rem;
  line-height: 1.6;
}
.social-list { display: flex; flex-direction: column; gap: 8px; }
.social-row {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.social-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.social-row:hover .social-icon, .social-row:active .social-icon {
  background: var(--rose);
  color: #fff;
}
.social-label { display: flex; flex-direction: column; }
.social-handle {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.65);
}
.site-footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 16px 0 10px;
}
.site-footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}
.site-footer-copy {
  margin-top: 4px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.faq-icon {
  flex-shrink: 0;
  color: var(--rose);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.25s ease;
  line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 18px;
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--blush) 37%, var(--border) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--radius-sm);
  height: 64px;
}
@keyframes skeleton {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
