/* ──────────────────────────────────────────────────────────────────────────
   Agendamento de aula experimental de Yoga — estilos do calendário e do modal.

   Carregado pelas 3 variantes da LP (expA, expB, iniv3-exp). Depende do CSS do
   intl-tel-input, que deve vir ANTES deste arquivo:
   https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/css/intlTelInput.css

   Padrão visual herdado do módulo #agd da LP do Alexey (mapa-astral/alexey/v3),
   com a paleta do Clube.
   ────────────────────────────────────────────────────────────────────────── */

.agl, .agl *, .agl-backdrop { box-sizing: border-box; }

:root {
  --agl-rosa: #dc00b4;
  --agl-rosa-esc: #c200a0;
  --agl-roxo: #9c04ce;
  --agl-ink: #2d3051;
  --agl-ink-2: #4d538c;
  --agl-muted: #8a8a9e;
  --agl-line: #e4e2ee;
  --agl-cream: #faf5fc;
  --agl-vermelho: #ff3647;
}

/* ───── Modal do passo 2 (abre ao escolher a data) ───── */
.agl-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 45, 0.62);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.agl-backdrop[hidden] { display: none; }
.agl--modal {
  max-height: 94vh;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.agl--modal .agl__corpo { overflow: auto; flex: 1; padding: 20px 24px 4px; }
.agl--modal .agl__rodape { padding: 16px 24px 20px; }

/* ───── Card de agendamento (embutido no hero) ───── */
.agl {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.agl--inline { margin: 0 auto; max-width: 430px; }

/* Barra roxa do topo, como no módulo do Alexey */
.agl__bar {
  background: linear-gradient(135deg, #2d3051 0%, #4d538c 100%);
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px;
  flex: none;
}
.agl__tit {
  font-size: 1.32rem;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.agl__sub { font-size: 0.88rem; margin: 0; opacity: 0.85; }
.agl__sub b { color: #ff8fe4; font-weight: 700; }
.agl__x {
  margin-left: auto;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.agl__x:hover { background: rgba(255, 255, 255, 0.3); }

.agl__passos {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 14px 24px;
  background: var(--agl-cream);
  border-bottom: 1px solid var(--agl-line);
  flex: none;
}
.agl__passo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--agl-muted);
}
.agl__passo + .agl__passo::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--agl-line);
  margin-right: 2px;
}
.agl__passon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e7e4f0;
  color: var(--agl-muted);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.agl__passo.is-on { color: var(--agl-ink); }
.agl__passo.is-on .agl__passon { background: var(--agl-rosa); color: #fff; }
.agl__passo.is-done .agl__passon { background: #f0d9f5; color: var(--agl-roxo); }

.agl__corpo { padding: 18px 18px 2px; }

/* ───── Seletor de fuso ───── */
.agl__fuso {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--agl-muted);
}
.agl__fuso label { flex: none; font-weight: 600; }
.agl__fuso select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--agl-line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.83rem;
  color: var(--agl-ink);
  background: #fff;
  cursor: pointer;
}
.agl__fuso select:focus-visible { outline: 2px solid var(--agl-rosa); outline-offset: 1px; }

/* ───── Calendário mensal ───── */
.agl__cal {
  border: 1px solid var(--agl-line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px 4px;
}
.agl__mes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--agl-line);
}
.agl__mesnome {
  font-size: 16px;
  font-weight: 700;
  color: var(--agl-ink);
  flex: 1;
  text-align: center;
}
.agl__nav {
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 1px solid var(--agl-line);
  border-radius: 50%;
  background: #fff;
  color: var(--agl-ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s, background 0.16s;
}
.agl__nav:hover:not([disabled]) { border-color: var(--agl-ink-2); background: var(--agl-cream); }
.agl__nav[disabled] { opacity: 0.3; cursor: default; }

.agl__grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.agl__dsem {
  text-align: center;
  font-size: 11px;
  color: var(--agl-muted);
  padding: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.agl__dia {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  font: inherit;
  font-size: 14px;
  color: var(--agl-muted);
  font-variant-numeric: tabular-nums;
  transition: background 0.14s ease;
}
.agl__dia:not(.agl__dia--tem) { text-decoration: line-through; opacity: 0.5; }
.agl__dia--tem {
  color: var(--agl-ink);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  opacity: 1;
}
.agl__dia--tem:hover { background: var(--agl-cream); }
.agl__dia--on,
.agl__dia--on:hover { background: var(--agl-rosa); color: #fff; font-weight: 800; }

/* Horário da aula escolhida */
.agl__horas { margin-top: 10px; }
.agl__horas:empty { display: none; }
.agl__per {
  border: 1px solid var(--agl-line);
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.agl__hora {
  padding: 8px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--agl-rosa);
  border-radius: 999px;
  background: var(--agl-rosa);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.agl__perinfo { font-size: 0.9rem; color: var(--agl-muted); line-height: 1.4; }
.agl__perinfo b { color: var(--agl-ink); display: block; font-weight: 700; }

/* ───── Passo 2 ───── */
.agl__campos { display: flex; flex-direction: column; gap: 18px; }
.agl .ds-field{ position: relative; display: block; }
.agl .ds-field__label{
  position: absolute;
  left: 16px;
  top: -8px;
  z-index: 1;
  padding: 0 6px;
  background: #fff;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  color: var(--agl-ink-2);
  pointer-events: none;
}
.agl .ds-field__input{
  width: 100%;
  border: 1px solid rgba(77, 83, 140, 0.56);
  border-radius: 8px;
  padding: 16px 14px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--agl-ink);
  background: #fff;
  transition: border-color 0.18s ease;
}
.agl .ds-field__input::placeholder{ color: #a6a6b8; }
.agl .ds-field__input:focus{ outline: none; border-color: var(--agl-rosa); }

/* ── Telefone: integração intl-tel-input com o campo DS (igual à LP no ar) ── */
.agl .ds-field--phone .iti{ width: 100%; display: block; }
.agl .ds-field--phone .iti__flag-container{ padding: 1px; }
.agl .ds-field--phone .ds-field__input{ padding-left: 52px; }
.agl .ds-field--phone .iti--separate-dial-code .ds-field__input{ padding-left: 90px; }
.agl .ds-field--phone .iti__selected-flag{ border-radius: 8px 0 0 8px; padding: 0 8px 0 14px; }
.agl .ds-field--phone .iti__country-list{
  z-index: 60;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  font-family: Figtree, system-ui, sans-serif;
  text-align: left;
}

.agl__resumo {
  background: var(--agl-cream);
  border: 1px solid rgba(220, 0, 180, 0.2);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}
.agl__resumo b { color: var(--agl-rosa); }

/* ───── Termos da aula experimental ───── */
.agl__termos {
  margin: 20px 0 0;
  padding: 15px 16px;
  border: 1px solid var(--agl-line);
  border-radius: 12px;
  background: var(--agl-cream);
}
.agl__termos-tit {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--agl-ink-2);
  margin: 0 0 10px;
}
.agl__termos ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.agl__termos li {
  display: flex;
  gap: 9px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #5c5c72;
}
.agl__termos li svg { flex: none; width: 16px; height: 16px; margin-top: 2px; stroke: var(--agl-rosa); }
.agl__termos li b { color: var(--agl-ink); font-weight: 700; }
.agl__aceite {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--agl-line);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--agl-ink);
  cursor: pointer;
}
.agl__aceite input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--agl-rosa);
  cursor: pointer;
}
.agl__aceite b { font-weight: 700; }
.agl__consent { font-size: 0.78rem; color: var(--agl-muted); line-height: 1.55; margin: 12px 0 0; }
.agl__consent a { color: #4c57ba; }
.agl__tzhint { color: var(--agl-muted); font-weight: 500; white-space: nowrap; }
.agl__ok-data .agl__tzhint { display: block; font-size: 0.8rem; margin-top: 2px; }
.agl__erro { color: var(--agl-vermelho); font-size: 0.85rem; margin: 10px 0 0; font-weight: 600; }
.agl__erro[hidden] { display: none; }

.agl__rodape {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--agl-line);
  background: #fff;
  flex: none;
}
.agl__voltar {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--agl-ink-2);
  cursor: pointer;
  padding: 0;
}
.agl__voltar[hidden] { display: none; }
.agl__escolha { flex: 1; min-width: 0; font-size: 0.88rem; color: var(--agl-muted); line-height: 1.4; }
.agl__escolha:empty { display: none; }
.agl__seguir {
  background: var(--agl-rosa);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 24px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s, opacity 0.15s;
}
.agl__seguir:hover:not(:disabled) { background: var(--agl-rosa-esc); }
.agl__seguir:disabled { opacity: 0.45; cursor: default; }

/* ───── Confirmação ───── */
.agl__ok { text-align: center; padding: 38px 26px 34px; }
.agl__ok-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--agl-rosa), var(--agl-roxo));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin: 0 auto 18px;
}
.agl__ok h2 { font-size: 1.5rem; margin: 0 0 10px; font-weight: 800; }
.agl__ok-data {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--agl-rosa);
  margin: 0 0 18px;
}
.agl__ok p { font-size: 0.95rem; color: var(--agl-muted); line-height: 1.6; margin: 0 auto; max-width: 38ch; }

@media (max-width: 560px) {
  .agl__passot { display: none; }
  .agl__tit { font-size: 1.15rem; }
  .agl__corpo { padding: 16px 16px 4px; }
  .agl__bar, .agl__passos, .agl__rodape { padding-left: 16px; padding-right: 16px; }
}

/* ───── Estado sem agenda / carregando ───── */
.agl__vazio {
  padding: 40px 28px;
  text-align: center;
}
.agl__vazio-icon { font-size: 2.2rem; margin-bottom: 14px; }
.agl__vazio h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--agl-ink);
}
.agl__vazio p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--agl-muted);
  margin: 0 auto 20px;
  max-width: 34ch;
}
