/* MedyClin — base compartilhada por todas as telas */
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --violet-50: #f6f3ff;
  --violet-100: #ede8ff;
  --violet-200: #d9cffe;
  --violet-300: #c4b5fd;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;
  --violet-800: #5b21b6;
  --violet-900: #4c1d95;

  --ink: #1e1b2e;
  --ink-2: #4a4560;
  --ink-3: #7a7590;
  --line: #e7e3f0;
  --paper: #fbfaf7;       /* fundo levemente quente, foge do branco "padrão" */
  --white: #ffffff;
  --peach: #ffd9c2;       /* acento pontual */
  --mint: #c9f2df;
  --ok: #138a5b;
  --warn: #b45309;
  --danger: #c2410c;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --shadow-1: 0 1px 2px rgb(30 27 46 / .06), 0 2px 8px rgb(30 27 46 / .05);
  --shadow-2: 0 10px 30px -12px rgb(76 29 149 / .28), 0 2px 6px rgb(30 27 46 / .06);
  --ring: 0 0 0 4px rgb(124 58 237 / .18);

  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--violet-700); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.015em; }
p { margin: 0; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--violet-700);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; color: var(--ink-3); }

/* Botões */
.btn {
  --bg: var(--violet-700); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--violet-800); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 1.06rem; }
.btn-ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--violet-50); box-shadow: inset 0 0 0 1.5px var(--violet-200); }
.btn-light { --bg: #fff; --fg: var(--violet-800); }
.btn-light:hover { background: var(--violet-50); }
.btn-danger { --bg: #fff; --fg: var(--danger); box-shadow: inset 0 0 0 1.5px #f3d2c3; }
.btn-danger:hover { background: #fff4ee; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Campos */
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; }
.field .hint { font-size: .8rem; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 16px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { padding: 14px 16px; min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--violet-500); box-shadow: var(--ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .85rem; min-height: 1.2em; }

/* Cartões, chips, selos */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; background: var(--violet-50); color: var(--violet-800);
  font-size: .85rem; font-weight: 500; border: 1px solid var(--violet-100);
}
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-ok { background: #e3f6ec; color: var(--ok); }
.badge-wait { background: #fff1db; color: var(--warn); }
.badge-violet { background: var(--violet-100); color: var(--violet-800); }
.badge-gray { background: #efeef3; color: var(--ink-2); }
.badge-danger { background: #fdebe3; color: var(--danger); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 99; box-shadow: var(--shadow-2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.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; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.hidden { display: none !important; }

/* Aviso de cookies (assets/js/tracking.js) — só aparece se a medição de anúncios estiver configurada */
.mc-cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin-left: auto;
  display: flex; gap: 14px; align-items: center; padding: 14px 16px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  font-size: 14px; line-height: 1.45;
}
.mc-cookie p { margin: 0; flex: 1; }
.mc-cookie a { color: var(--violet-700); text-decoration: underline; text-underline-offset: 2px; }
.mc-cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mc-cookie button { font: inherit; font-weight: 600; border-radius: 999px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--ink-2); }
.mc-cookie .mc-cookie-ok { background: var(--violet-700); border-color: var(--violet-700); color: var(--white); }
.mc-cookie button:focus-visible { outline: none; box-shadow: var(--ring); }
@media (max-width: 560px) {
  .mc-cookie { flex-direction: column; align-items: stretch; left: 10px; right: 10px; bottom: 10px; }
  .mc-cookie-actions button { flex: 1; }
}

/* Preços: ficam invisíveis até o valor oficial (do painel) chegar, para nunca mostrar um valor desatualizado */
.precos-wait [data-cfg="precoClinico"], .precos-wait [data-cfg="precoEspecialista"], .precos-wait [data-price] { visibility: hidden; }
