/* Página "Anunciar" (/anunciar): usa as cores e componentes do style.css (tema claro/escuro, botões,
   badges de tipo, avisos); aqui só o que é desta página. O style.css monta o mapa em grade: desfaz. */
html:has(body.post-page) { height: auto; }
body.post-page { display: block; height: auto; min-height: 100dvh; overflow: auto; }

.pp-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)); padding-top: max(12px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.pp-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pp-map { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.pp-map:hover { background: var(--line); }
.pp-map svg { width: 16px; height: 16px; }

.pp-main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
.pp-main h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.02em; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin: 0 0 8px; }
.pp-main h2 { font-size: 19px; margin: 0 0 6px; }
.pp-lead { margin: 0 0 20px; color: var(--ink-2); font-size: 16px; max-width: 62ch; }
.pp-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.pp-hint a, .pp-main p a { color: var(--brand-ink); font-weight: 600; }
.pp-hint.center, .center { text-align: center; justify-content: center; }
.pp-loading { height: 280px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: pp-shine 1.2s infinite linear; }
@keyframes pp-shine { to { background-position: -200% 0; } }

.pp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.pp-narrow { max-width: 520px; margin: 4vh auto 0; }
.pp-wide { max-width: 1080px; margin: 0 auto; }
.pp-hero-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.pp-hero-ico svg { width: 28px; height: 28px; }
.pp-hero-ico.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pp-hero-ico.ok svg { stroke-width: 2.6; }
.pp-hero-ico.bad { background: var(--warn-soft); color: var(--warn); }
.pp-hero .g-btn { margin-top: 4px; }

/* ---------- formulário ---------- */
.pp-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1000px) { .pp-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.pp-form { display: grid; gap: 16px; }
.pp-step { margin: 0; min-width: 0; }
.pp-step legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin: 0 0 16px; padding: 0; font-weight: 700; font-size: 17px; }
.pp-step legend + * { clear: both; }
.pp-step legend small { font-weight: 500; color: var(--muted); font-size: 13px; }
.pp-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 800; }
.pp-field { margin: 0 0 16px; min-width: 0; }
.pp-field:last-child { margin-bottom: 0; }
.pp-field > label, .pp-field > .label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; }
.pp-field small { font-weight: 500; color: var(--muted); }
.pp-row { display: grid; gap: 16px; margin-bottom: 16px; }
.pp-row:last-child { margin-bottom: 0; }
.pp-row > .pp-field { margin-bottom: 0; }
/* minmax(0, 1fr): uma coluna nunca fica mais larga que a tela por causa do conteúdo (ex.: campo de data no iPhone) */
.pp-row { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .pp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.pp-form input[type="text"], .pp-form input[type="tel"], .pp-form input[type="date"], .pp-form select, .pp-form textarea,
.pp-narrow input[type="text"], .pp-narrow input[type="tel"] {
  width: 100%; min-height: 46px; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.pp-form textarea { min-height: 170px; resize: vertical; line-height: 1.5; font: inherit; font-size: 16px; }
.pp-form input:focus-visible, .pp-form select:focus-visible, .pp-form textarea:focus-visible, .pp-narrow input:focus-visible {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); border-radius: 12px;
}
.pp-form [aria-invalid="true"], .pp-narrow [aria-invalid="true"] { border-color: var(--warn) !important; }
.pp-form .mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.pp-form input::placeholder, .pp-form textarea::placeholder { color: var(--muted); opacity: .8; }
.pp-narrow .pp-form { gap: 0; }
.pp-narrow .pp-field { margin-bottom: 14px; }
.pp-narrow .btn-primary { margin-top: 12px; }

/* tipo de vaga: cartões grandes, fáceis de tocar */
.pp-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; border-radius: 14px; }
.pp-types[aria-invalid="true"] { outline: 2px solid var(--warn); outline-offset: 4px; }
.pp-type { position: relative; cursor: pointer; }
.pp-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pp-type > span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 14px; transition: border-color .15s, background .15s; }
.pp-type b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pp-type small { color: var(--muted); font-size: 13px; }
.pp-type .pd { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pp-type:hover > span { border-color: var(--muted); }
.pp-type input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.pp-type input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }

/* opções lado a lado (sim/não, por mês/por semana) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface-2); }
.seg[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--warn); }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background .15s, color .15s; }
.seg-opt:hover span { color: var(--ink); }
.seg-opt input:checked + span { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.seg-opt input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 1px; }

.pp-stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface-2); }
.pp-stepper button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.pp-stepper button:disabled { opacity: .4; cursor: default; }
.pp-stepper button svg { width: 18px; height: 18px; stroke-width: 2.4; }
.pp-stepper output { min-width: 44px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

.pp-price { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pp-money { position: relative; display: block; flex: 1 1 160px; max-width: 220px; }
.pp-money > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); pointer-events: none; }
.pp-money input { padding-left: 30px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-link { border: 0; background: none; padding: 6px 0 0; color: var(--brand-ink); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
/* região: o mesmo menu do topo da lista, com a altura dos campos do formulário */
.pp-region summary { min-height: 46px; padding: 0 12px 0 14px; gap: 8px; font-size: 15px; border-radius: 12px; justify-content: flex-start; }
.pp-region summary > span { flex: 1; }
.pp-region summary svg:first-child { width: 17px; height: 17px; color: var(--brand-ink); transform: none !important; }
.pp-region .menu { width: 100%; }
.pp-under { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pp-count { flex: none; margin-top: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-count.over { color: var(--warn); font-weight: 700; }
.pp-phone { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-phone input { flex: 1 1 220px; }
.pp-save { margin-top: 10px; }

/* aviso do número de verdade (antes do campo do telefone) */
.pp-callout { display: flex; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border-radius: 14px; background: var(--amber-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.pp-callout-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.pp-callout-ico svg { width: 20px; height: 20px; }
.pp-callout b { display: block; margin-bottom: 4px; font-size: 15px; }
.pp-callout p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.pp-callout p:last-child { margin: 0; }
.pp-callout .strong { color: var(--ink); font-weight: 700; }

.pp-summary { display: flex; gap: 8px; align-items: center; margin: 0; padding: 11px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 14px; }
.pp-summary svg { width: 18px; height: 18px; flex: none; }
.pp-submit { display: grid; gap: 12px; }
.pp-submit .check { margin: 0; font-size: 14px; }
.pp-submit .check + .err { margin: -6px 0 0 30px; }

/* vaga parecida já no site */
.pp-dup { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--amber); background: var(--amber-soft); }
.pp-dup > b { display: flex; gap: 8px; align-items: center; color: var(--amber); }
.pp-dup > b svg { width: 18px; height: 18px; flex: none; }
.pp-dup p { margin: 0; font-size: 14px; color: var(--ink-2); }
.pp-dup-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.pp-dup-card:hover { border-color: var(--muted); }
.pp-dup-txt { flex: 1; min-width: 140px; }
.pp-dup-go { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-ink); font-weight: 600; font-size: 13px; }
.pp-dup-go svg { width: 14px; height: 14px; }

/* prévia do cartão */
.pp-aside { display: none; }
@media (min-width: 1000px) { .pp-aside { display: block; } }
.pp-sticky { position: sticky; top: 84px; }
.pp-aside-label { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pp-pv { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pp-pv.ghost { opacity: .6; }
.pp-pv-price { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.pp-pv-price small { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 4px; }
.pp-pv-title { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.pp-pv-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-pv-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.pp-pv-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pp-pv-meta svg { width: 13px; height: 13px; }
.pp-pv-meta .rooms { color: var(--brand-ink); font-weight: 600; }

/* ---------- Meus anúncios ---------- */
.pp-home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.pp-home-head .pp-lead { margin-bottom: 8px; }
.pp-new { width: auto; padding-inline: 18px; }
.pp-new svg { width: 18px; height: 18px; stroke-width: 2.6; }
.pp-limit { margin: 14px 0 16px; font-size: 13px; color: var(--muted); }
.pp-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .pp-items { grid-template-columns: 1fr 1fr; } }
.pp-item { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.pp-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-item h3 { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 17px; }
.pp-item-meta { margin: 0; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.pp-item-text { display: flex; gap: 7px; align-items: flex-start; margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.pp-item-text.bad { color: var(--warn); font-weight: 600; }
.pp-item-text svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.pp-date { font-size: 12.5px; color: var(--muted); }
.pp-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.pp-status svg { width: 14px; height: 14px; stroke-width: 2.4; }
.pp-status.st-pending, .pp-status.st-review { background: var(--amber-soft); color: var(--amber); }
.pp-status.st-live { background: var(--ok-soft); color: var(--ok-ink); }
.pp-status.st-rejected { background: var(--warn-soft); color: var(--warn); }
.pp-empty { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 36px 22px; }
.pp-empty p { margin: 0 0 14px; color: var(--ink-2); max-width: 44ch; }
.pp-empty .pp-new { margin-top: 4px; }

.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.pp-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.pp-btn:hover { background: var(--surface-2); }
.pp-btn svg { width: 16px; height: 16px; }
.pp-btn.strong { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pp-btn.strong:hover { filter: brightness(1.07); }
.pp-btn.quiet { border-color: transparent; color: var(--muted); }
.pp-btn.warn { border-color: var(--warn); color: var(--warn); }
.pp-btn:disabled { opacity: .6; cursor: progress; }
.pp-sure { font-weight: 700; font-size: 14px; }
.pp-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -4px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-weight: 600; }
.pp-back:hover { color: var(--ink); background: var(--surface-2); }
.pp-back svg { width: 18px; height: 18px; }

/* enviado */
.pp-sent .btn-primary { width: auto; padding-inline: 20px; }
.pp-timeline { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 0; }
.pp-timeline li { position: relative; display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--muted); font-weight: 600; }
.pp-timeline li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.pp-timeline li span svg { width: 16px; height: 16px; stroke-width: 2.4; }
.pp-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 38px; width: 2px; height: 14px; background: var(--line-2); }
.pp-timeline .done { color: var(--ok-ink); }
.pp-timeline .done span { background: var(--ok-soft); }
.pp-timeline .now { color: var(--ink); }
.pp-timeline .now span { background: var(--amber-soft); color: var(--amber); }

.pp-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; }
.pp-foot a { color: var(--muted); }

@media (max-width: 560px) {
  .pp-map span { display: none; }
  .pp-map { padding: 8px; }
  .pp-card { padding: 18px 16px; border-radius: 16px; }
  .pp-main { padding-top: 18px; }
  .pp-types { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pp-type > span { padding: 10px 12px; }
  .pp-new { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .pp-loading { animation: none; } }

/* limite de anúncios atingido: o motivo do botão desligado, à vista */
.pp-limit { display: flex; gap: 8px; align-items: flex-start; }
.pp-limit.full { margin: 18px 0 18px; padding: 12px 16px; border-radius: 12px; background: var(--amber-soft); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.5; }
.pp-limit svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--amber); }
.pp-new:disabled { opacity: .5; cursor: not-allowed; }
/* aprovado não se edita; aviso antes de enviar */
.pp-item-text.lock { color: var(--muted); }
.pp-final { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }
.pp-final svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--brand-ink); }
/* tela de enviado: os dois botões com a mesma altura */
.pp-sent .pp-actions .btn-primary, .pp-sent .pp-actions .pp-btn { min-height: 46px; padding: 0 20px; border-radius: 12px; font-size: 15px; }
.pp-sent .pp-actions .btn-primary { margin-top: 0; }
/* caixa de marcar dentro de um campo (ex.: "salvar no meu perfil"): caixa e texto lado a lado */
.pp-field > label.check { display: flex; margin: 10px 0 0; font-weight: 500; }
/* data: texto dia/mês/ano + o calendário do navegador escondido em cima do ícone */
.pp-date { position: relative; display: flex; align-items: center; }
.pp-date input[type="text"] { padding-right: 48px; font-variant-numeric: tabular-nums; }
.pp-cal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.pp-cal:hover { background: var(--surface-2); color: var(--ink); }
.pp-cal svg { width: 19px; height: 19px; pointer-events: none; }
.pp-cal .pp-picker { position: absolute; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; }
.pp-cal .pp-picker::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

/* iPhone (Safari): o campo de data nativo tem largura mínima própria e passava da borda da tela.
   O calendário escondido fica recortado dentro do ícone e nenhum campo de data impõe largura. */
.pp-cal { overflow: hidden; }
.pp-form input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; }
.pp-cal .pp-picker { display: block; font-size: 16px; }
.pp-date, .pp-date input[type="text"] { min-width: 0; width: 100%; max-width: 100%; }
