/* BOOK1: pop-up de candidatura e agenda (js/forge-pop.js). Tokens próprios com os valores da Forge
   (creme, tinta, rosa de destaque), para funcionar em qualquer página pública sem depender do landing.css. */
.fp-pop,
.fp-back {
  --fp-bg: #f7f4f1;
  --fp-card: #ffffff;
  --fp-ink: #16120e;
  --fp-ink2: #2a221b;
  --fp-soft: #6b6159;
  --fp-line: rgba(22, 18, 14, 0.09);
  --fp-accent: #e0345b;
  --fp-ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--fp-ink);
  -webkit-font-smoothing: antialiased;
}
.fp-pop *,
.fp-back * {
  box-sizing: border-box;
  margin: 0;
}
.fp-lock,
.fp-lock body {
  overflow: hidden;
}

/* ---------- pop-up do topo ---------- */
.fp-pop {
  position: fixed;
  z-index: 2147483000;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  width: min(420px, calc(100vw - 20px));
  transform: translate(-50%, calc(-100% - 24px));
  opacity: 0;
  transition:
    transform 0.6s var(--fp-ease),
    opacity 0.35s ease;
}
.fp-pop.on {
  transform: translate(-50%, 0);
  opacity: 1;
}
.fp-pop-in {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border: 1px solid var(--fp-line);
  border-radius: 26px;
  padding: 18px 18px 10px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 24px 60px -18px rgba(22, 18, 14, 0.35),
    0 6px 18px -8px rgba(22, 18, 14, 0.18);
}
.fp-pop-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.fp-pop-head img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}
.fp-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fp-accent);
}
.fp-pop h2 {
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.fp-pop-sub {
  margin: 12px 0 14px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--fp-soft);
}

/* ---------- botões ---------- */
.fp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--fp-ink2), var(--fp-ink));
  color: #fbf8f5;
  font:
    650 16.5px/1 Inter,
    system-ui,
    sans-serif;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 24px -10px rgba(22, 18, 14, 0.55);
  transition:
    transform 0.2s var(--fp-ease),
    opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.fp-btn:active {
  transform: scale(0.97);
}
.fp-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.fp-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--fp-soft);
  font:
    500 14.5px/1 Inter,
    system-ui,
    sans-serif;
  text-decoration: none;
  border-radius: 999px;
}
.fp-btn-ghost:hover {
  color: var(--fp-ink);
}
.fp-btn:focus-visible,
.fp-btn-ghost:focus-visible,
.fp-day:focus-visible,
.fp-slot:focus-visible,
.fp-nav:focus-visible,
.fp-x:focus-visible,
.fp-link:focus-visible {
  outline: 2px solid var(--fp-accent);
  outline-offset: 2px;
}

/* ---------- agenda ---------- */
.fp-back {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(22, 18, 14, 0);
  transition: background 0.4s ease;
}
.fp-back.on {
  background: rgba(22, 18, 14, 0.42);
}
.fp-sheet {
  position: relative;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--fp-bg);
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.55s var(--fp-ease);
  outline: none;
}
.fp-back.on .fp-sheet {
  transform: none;
}
.fp-grab {
  width: 40px;
  height: 5px;
  border-radius: 9px;
  background: rgba(22, 18, 14, 0.16);
  margin: 0 auto 8px;
}
.fp-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(22, 18, 14, 0.06);
  color: var(--fp-ink);
  font:
    400 24px/1 Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.fp-muted {
  color: var(--fp-soft);
  font-size: 14.5px;
  line-height: 1.5;
}
.fp-meta {
  padding: 6px 2px 16px;
}
.fp-meta img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.fp-meta .fp-muted {
  font-size: 13px;
}
.fp-meta h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 2px 0 10px;
}
.fp-meta ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fp-meta li {
  font-size: 13px;
  font-weight: 550;
  color: var(--fp-ink2);
  background: var(--fp-card);
  border: 1px solid var(--fp-line);
  padding: 7px 11px;
  border-radius: 999px;
}
.fp-picked {
  margin-top: 14px;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.4;
  color: var(--fp-ink);
}
.fp-cal,
.fp-slots,
.fp-form,
.fp-done {
  background: var(--fp-card);
  border: 1px solid var(--fp-line);
  border-radius: 22px;
  padding: 16px;
}
.fp-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.fp-cal-head b {
  font-size: 16px;
  letter-spacing: -0.01em;
}
.fp-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--fp-line);
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--fp-ink);
  cursor: pointer;
  margin-left: 6px;
}
.fp-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.fp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.fp-wd {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fp-soft);
  text-align: center;
  padding: 4px 0 6px;
}
.fp-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 12px;
  background: none;
  font:
    500 15px/1 Inter,
    system-ui,
    sans-serif;
  color: rgba(22, 18, 14, 0.28);
  cursor: default;
  position: relative;
}
.fp-day.on {
  color: var(--fp-ink);
  background: rgba(224, 52, 91, 0.08);
  font-weight: 650;
  cursor: pointer;
}
.fp-day.on:hover {
  background: rgba(224, 52, 91, 0.16);
}
.fp-day.sel {
  background: var(--fp-ink);
  color: #fbf8f5;
}
.fp-day.today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}
.fp-slots {
  margin-top: 10px;
}
.fp-slots > b {
  display: block;
  font-size: 15px;
  margin-bottom: 10px;
}
.fp-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fp-slot {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(22, 18, 14, 0.14);
  background: var(--fp-card);
  font:
    600 15px/1 Inter,
    system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--fp-ink);
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s var(--fp-ease);
}
.fp-slot:hover {
  border-color: var(--fp-ink);
}
.fp-slot:active {
  transform: scale(0.96);
}
.fp-skel {
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f1ece7 0%, #faf8f6 50%, #f1ece7 100%);
  background-size: 200% 100%;
  animation: fp-shimmer 1.2s linear infinite;
}
@keyframes fp-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- formulário ---------- */
.fp-form {
  display: grid;
  gap: 14px;
}
.fp-link {
  justify-self: start;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--fp-soft);
  font:
    550 14px/1 Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.fp-fld {
  display: grid;
  gap: 6px;
}
.fp-fld label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fp-ink2);
}
.fp-fld input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(22, 18, 14, 0.16);
  background: var(--fp-bg);
  font:
    400 16px/1 Inter,
    system-ui,
    sans-serif;
  color: var(--fp-ink);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.fp-fld input:focus {
  border-color: var(--fp-ink);
  box-shadow: 0 0 0 3px rgba(22, 18, 14, 0.08);
  background: var(--fp-card);
}
.fp-fld input[aria-invalid="true"] {
  border-color: var(--fp-accent);
}
.fp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.fp-msg {
  color: #b3203f;
  font-size: 14px;
  line-height: 1.4;
}
.fp-fine {
  font-size: 12.5px;
  color: var(--fp-soft);
  text-align: center;
}
.fp-fine a {
  color: inherit;
  text-decoration: underline;
}
.fp-spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: fp-rot 0.8s linear infinite;
}
@keyframes fp-rot {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- confirmação e falha ---------- */
.fp-done {
  text-align: center;
  padding: 30px 20px 18px;
  margin-top: 26px;
}
.fp-done h3 {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.fp-done .fp-muted {
  margin: 8px auto 20px;
  max-width: 34ch;
}
.fp-when {
  font-weight: 650;
  font-size: 17px;
}
.fp-check {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fp-ink);
  color: #fff;
  font-size: 28px;
  animation: fp-pop 0.6s var(--fp-ease);
}
@keyframes fp-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

/* ---------- computador: janela centrada com duas colunas, como a agenda da Zyra ---------- */
@media (min-width: 760px) {
  .fp-pop {
    top: 18px;
  }
  .fp-back {
    align-items: center;
    padding: 24px;
  }
  .fp-sheet {
    width: min(860px, 100%);
    max-height: min(720px, 92dvh);
    border-radius: 30px;
    padding: 26px;
    transform: translateY(24px) scale(0.98);
    opacity: 0;
    transition:
      transform 0.5s var(--fp-ease),
      opacity 0.3s ease;
    box-shadow: 0 40px 90px -30px rgba(22, 18, 14, 0.5);
  }
  .fp-sheet .fp-x {
    top: 14px;
    right: 14px;
  }
  .fp-sheet.fp-s-pick,
  .fp-sheet.fp-s-form {
    padding-top: 60px;
  }
  .fp-back.on .fp-sheet {
    opacity: 1;
  }
  .fp-grab {
    display: none;
  }
  .fp-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
  }
  .fp-sheet.fp-s-done .fp-body,
  .fp-sheet.fp-s-fail .fp-body {
    display: block;
  }
  .fp-main {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 12px;
    align-items: start;
  }
  .fp-sheet.fp-s-form .fp-main {
    grid-template-columns: 1fr;
  }
  .fp-meta {
    padding-top: 4px;
    border-right: 1px solid var(--fp-line);
    padding-right: 18px;
  }
  .fp-meta ul {
    flex-direction: column;
    align-items: flex-start;
  }
  .fp-slots {
    margin-top: 0;
    max-height: 420px;
    overflow-y: auto;
  }
  .fp-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fp-pop,
  .fp-sheet,
  .fp-back {
    transition: none;
  }
  .fp-check,
  .fp-skel {
    animation: none;
  }
}
