/* book.css – agendamento; usa variáveis do tema (tema.css) */

.hidden {
  display: none !important;
}

.host-flow-notice {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 12px;
}

.host-flow-notice a {
  color: #c2410c;
  font-weight: 600;
}

/* Fluxo anfitrião (?fluxo=anfitriao): descrição do procedimento */
.host-flow-procedure {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1e3a5f;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 12px;
}

.host-flow-procedure-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1e40af;
}

.host-flow-procedure-intro {
  margin: 0 0 0.75rem;
  color: #334155;
}

.host-flow-procedure-steps {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  color: #334155;
}

.host-flow-procedure-steps li {
  margin-bottom: 0.45rem;
}

.host-flow-procedure-steps li:last-child {
  margin-bottom: 0;
}

.host-flow-procedure-foot {
  margin: 0;
  font-size: 0.82rem;
  color: #475569;
}

.host-flow-procedure-foot a {
  color: #1d4ed8;
  font-weight: 600;
}

body {
  min-height: 100vh;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  padding: 1rem 0;
}

.logo {
  display: inline-block;
  text-decoration: none;
}

.logo:hover {
  opacity: 0.9;
}

.logo-img {
  height: 44px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
  vertical-align: middle;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 0;
}

.step {
  width: 100%;
}

.step.hidden {
  display: none !important;
}

.calendar-card,
.form-card,
.done-card {
  background: var(--bg-card);
  border-radius: var(--admin-radius-sm);
  padding: 1.5rem;
  color: var(--text);
  box-shadow: var(--admin-shadow);
  border: 1px solid var(--border);
}


.calendar-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  text-align: center;
  color: var(--text);
}

.appointment-user-wrap {
  margin: 0 0 1rem;
}

.appointment-user-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.appointment-user-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
}

.appointment-user-hint {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lookup-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
}

.lookup-title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e3a5f;
}

.lookup-summary {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.83rem;
  color: #334155;
}

.lookup-results {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lookup-result-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}

.lookup-result-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(230, 30, 77, 0.08);
}

.lookup-result-name {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.lookup-result-meta,
.lookup-result-history {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.nav-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.nav-btn:hover {
  background: var(--border);
}

.month-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.calendar-day.other-month {
  color: var(--text-muted);
}

.calendar-day.weekend {
  opacity: 0.6;
  cursor: default;
}

.calendar-day.no-slots {
  opacity: 0.5;
  cursor: default;
}

.calendar-day.selected {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-color: var(--primary);
}

.calendar-day:not(.weekend):not(.no-slots):hover {
  background: var(--border);
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0;
}

.back-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}

.step-heading {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.step-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.slot-btn:hover {
  background: var(--border);
}

.slot-btn.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.no-slots-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0;
  padding: 0.5rem 0;
}

.next-btn {
  margin-top: 1rem;
}

.next-btn.hidden {
  display: none !important;
}

.book-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0.75rem 0 0.25rem;
  color: var(--text);
}

.book-form label:first-of-type {
  margin-top: 0;
}

.book-form input,
.book-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-card);
  color: var(--text);
}

.book-form input:focus,
.book-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(230, 30, 77, 0.15);
}

.book-form textarea {
  resize: vertical;
  min-height: 60px;
}

.book-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Cloudflare Turnstile (opcional — configurar chaves no admin) */
.turnstile-mount {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.turnstile-mount.hidden {
  display: none !important;
}

.turnstile-mount .cf-turnstile,
.turnstile-mount iframe {
  max-width: 100%;
}

/* CAPTCHA simples (fallback): estilo suave, campo a largura total */
.simple-captcha-wrap {
  margin-top: 1rem;
}

.simple-captcha-wrap.hidden {
  display: none !important;
}

.captcha-card--simple .captcha-card-inner {
  background: linear-gradient(180deg, #f0fdf9 0%, #ecfeff 100%);
  border: 1px solid #99f6e4;
  border-radius: var(--admin-radius-sm);
  padding: 1.15rem 1.25rem;
  margin-top: 0.5rem;
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.08);
}

.captcha-card .captcha-icon {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.65rem;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

.captcha-card .captcha-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #134e4a;
}

.captcha-card .captcha-desc {
  font-size: 0.88rem;
  color: #475569;
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.captcha-card .captcha-question {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.captcha-card .captcha-input {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 1.05rem;
  padding: 0.65rem 0.9rem;
  border: 2px solid #5eead4;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.captcha-card .captcha-input::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
}

.captcha-card .captcha-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

/* Modal de mensagem (centrado) */
.msg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.msg-modal-overlay.hidden {
  display: none !important;
}

.msg-modal-box {
  background: var(--bg-card);
  border-radius: var(--admin-radius-sm);
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--admin-shadow);
  border: 1px solid var(--border);
}

.msg-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.msg-modal-text {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

.msg-modal-ok {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.msg-modal-ok:hover {
  background: var(--primary-hover);
}

.submit-btn {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--primary-hover);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.done-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  text-align: center;
  color: var(--text);
}

.done-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  text-align: center;
}

.done-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.done-actions a {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.done-actions a:hover {
  background: var(--bg);
}

.btn-ical {
  background: var(--bg);
}

.btn-google-oauth {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-google-oauth:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-google {
  border-color: #4299e1;
  color: #2b6cb0;
}

.btn-outlook {
  border-color: #0078d4;
  color: #0078d4;
}

.done-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
  text-align: center;
}

.done-note-spam {
  margin-top: 0.5rem;
}