/* Protótipo mobile-first: o ecrã é o site. Topo = obrigatório (nome, área);
   fundo = barra "＋ Adicionar…" | "Criar site →"; extras em painéis (bottom sheets).
   Usa os tokens de site.css (--es-*) e os componentes de wizard.css (.pv, .wz-form, .wz-log…). */
.prototipo .wz-top { padding: .6rem 0; }
.prototipo .wz-trust { font-size: .75rem; }
.prototipo .wz { padding: 0 0 6rem; }
.wz-com-barra .wz { padding-bottom: 7rem; }

/* topo */
.wz-box { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--es-linha); box-shadow: 0 12px 30px -18px rgba(17,24,39,.35); padding: .9rem 1rem 1rem; }
.wz-box .wz-q { font-size: 1.45rem; margin-bottom: .7rem; }
.wz-head { display: flex; align-items: flex-start; gap: .4rem; }
.wz-head .wz-back { padding: .15rem .3rem 0 0; font-size: 1.2rem; }
.wz-row { display: flex; gap: .5rem; align-items: stretch; }
.wz-row .btn { flex: 0 0 auto; border-radius: .75rem; padding-left: 1.1rem; padding-right: 1.1rem; }
.wz-row .btn:disabled { opacity: .35; }
.wz-big { font-family: var(--es-fonte); font-weight: 800; letter-spacing: -.03em; font-size: 1.4rem; }
.wz-box .wz-micro { text-align: left; margin-top: .6rem; }
.wz-box .wz-micro i { color: #d97706; }

/* contexto para quem chega a frio */
.wz-tagline { font-size: .85rem; color: var(--es-cinza); margin: 0 0 .3rem; }
.wz-link { background: none; border: 0; padding: 0; color: var(--es-azul); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.wz-sheet .wz-passos { margin: .8rem 0 1rem; }

/* resumo compacto depois da área */
.wz-box:has(.wz-mini.on) { padding: .6rem 1rem; }
.wz-mini.on { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.wz-mini > i { color: #16a34a; }
.wz-mini > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--es-cinza); }
.wz-mini strong { color: var(--es-tinta); }
.wz-editar { background: none; border: 0; color: var(--es-azul); font-weight: 600; font-size: .85rem; white-space: nowrap; }

/* o site */
.wz-site { position: relative; padding-top: 1rem; }
.wz-site .wz-device { position: absolute; right: 1rem; top: 1rem; z-index: 2; }
.prototipo .wz-preview.is-mobile { max-width: 390px; }
.pv-galeria { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: 0 1rem; }
.pv-galeria span { aspect-ratio: 4/3; border-radius: .5rem; background: #e5e7eb center/cover no-repeat; }

/* barra de ações no fundo do telemóvel */
.wz-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; gap: .5rem; padding: .7rem .8rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--es-linha); box-shadow: 0 -10px 30px -18px rgba(17,24,39,.4); }
.wz-bar[hidden] { display: none; }
.wz-bar button { flex: 1; border-radius: 99px; padding: .85rem .6rem; font-weight: 700; font-size: .95rem; white-space: nowrap; }
.wz-bar-add { background: #fff; border: 1.5px solid var(--es-linha); color: var(--es-tinta); }
.wz-bar-add[hidden] { display: none; }
.wz-bar-add i { color: var(--es-azul); }
.wz-bar-go { background: var(--es-azul); border: 0; color: #fff; box-shadow: 0 8px 18px -8px rgba(37,99,235,.7); }
.wz-bar.so-criar .wz-bar-go { flex: 1 1 100%; }

/* painéis (bottom sheets) */
.wz-sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(11,19,36,.45); animation: wzFade .2s ease; }
.wz-sheet-bg[hidden] { display: none; }
.wz-sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 1.3rem 1.3rem 0 0; padding: 1.4rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px -20px rgba(0,0,0,.4); animation: wzSobe .28s cubic-bezier(.2,.8,.2,1); }
.wz-sheet[hidden] { display: none; }
.wz-sheet::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 99px; background: #d1d5db; }
.wz-sheet h3 { font-family: var(--es-fonte); font-weight: 800; letter-spacing: -.03em; font-size: 1.5rem; margin: .2rem 0 .3rem; }
.wz-sheet h3 i { color: var(--es-azul); font-size: 1.2rem; }
.wz-sheet > p { color: var(--es-cinza); font-size: .92rem; margin-bottom: .9rem; }
.wz-sheet .wz-form { border: 0; box-shadow: none; padding: 0; }
.wz-sheet .wz-ok { margin-bottom: .4rem; }
.wz-sheet-full { min-height: 55vh; }
.wz-sheet .wz-erro { margin-top: .4rem; font-size: .85rem; }
@keyframes wzSobe { from { transform: translateY(100%); } to { transform: none; } }
@keyframes wzFade { from { opacity: 0; } to { opacity: 1; } }
.wz-sheet-aberto { overflow: hidden; }

.wz-upload { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 2px dashed #93c5fd; border-radius: .9rem; padding: 1.2rem; color: var(--es-azul-esc); font-weight: 700; background: var(--es-azul-claro); cursor: pointer; }
.wz-upload i { font-size: 1.4rem; }
.wz-sug { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.wz-sug button { background: #fff; border: 1.5px solid var(--es-linha); border-radius: 99px; padding: .35rem .8rem; font-size: .85rem; font-weight: 500; }
.wz-sug button:disabled { background: var(--es-azul-claro); border-color: #93c5fd; color: var(--es-azul-esc); }
.wz-spin-i { display: inline-block; color: var(--es-azul); animation: wzPulse 1.2s infinite; }
.wz-sheet .wz-log { margin: .8rem 0 0; font-size: .95rem; }

/* telemóvel: mantém sempre a moldura de telemóvel, com margem para se ver o aparelho */
@media (max-width: 767px) {
  .wz-site { padding: 1rem 1rem 0; }
  .wz-site .wz-device { display: none; }
  .prototipo .is-mobile .pv-blocos { display: grid; }
  .prototipo .is-mobile .pv-feats { display: flex; }
  .prototipo .pv-footer { display: block; }
}

/* no telemóvel/tablet o invólucro da coluna não existe para o layout (a caixa fica sticky no ecrã) */
.wz-esq { display: contents; }

/* tablet: coluna estreita ao centro */
@media (min-width: 768px) and (max-width: 991px) {
  .wz-box { max-width: 480px; margin: 1rem auto 0; border: 1px solid var(--es-linha); border-radius: 1.2rem; top: .8rem; }
  .wz-site { max-width: 960px; margin: 0 auto; padding-top: 1.4rem; }
  .wz-bar, .wz-sheet { max-width: 480px; margin: 0 auto; }
  .wz-bar { bottom: 1rem; border: 1px solid var(--es-linha); border-radius: 99px; }
}

/* computador: duas colunas — perguntas e ações à esquerda, o site à direita */
@media (min-width: 992px) {
  .prototipo .wz { display: grid; grid-template-columns: minmax(380px, 440px) 1fr; gap: 3rem; align-items: start; max-width: 1320px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
  .wz-esq { display: block; position: sticky; top: 1.5rem; }
  .wz-box { position: static; border: 1px solid var(--es-linha); border-radius: 1.2rem; padding: 1.4rem; box-shadow: 0 20px 40px -28px rgba(17,24,39,.35); }
  .wz-box .wz-q { font-size: 1.9rem; }
  .wz-tagline { font-size: .95rem; }
  .wz-bar { position: static; margin-top: 1rem; border: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
  .wz-site { padding-top: 0; }
  .wz-site .wz-device { top: -.5rem; right: 0; }
  .wz-sheet { max-width: 480px; left: 50%; right: auto; transform: translateX(-50%); bottom: 2rem; border-radius: 1.3rem; animation: wzFade .2s ease; }
}
