/* Livira Portal - shared components: icons, buttons, badges, chips, favourite button, cards, placeholders. */

/* ---------- icons (inline sprite in partials/_icons.html: <svg class="ico"><use href="#i-heart"/></svg>) ---------- */
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.2em; }
.ico.fill { fill: currentColor; stroke: none; }
.icon { width: 1em; height: 1em; vertical-align: -0.15em; } /* legacy <img> icons */

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn-gold { background: var(--gold); color: var(--green-deep); } .btn-gold:hover { background: var(--gold-dark); }
.btn-green { background: var(--green); color: #fff; } .btn-green:hover { background: var(--green-soft); }
.btn-wa { background: var(--whatsapp); color: #fff; } .btn-wa:hover { filter: brightness(.93); }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); } .btn-ghost:hover { border-color: var(--green); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; }

/* ---------- badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.bdg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #fff; color: var(--green); box-shadow: 0 1px 3px rgba(0,0,0,.18); line-height: 1.2; }
.bdg.gold { background: var(--gold); color: var(--green-deep); }
.bdg.dark { background: rgba(9,45,43,.9); color: #fff; }
.bdg.red { background: var(--red); color: #fff; }
.bdg.seen { background: rgba(255,255,255,.92); color: #4d5753; }
.bdg.flat { box-shadow: none; border: 1px solid var(--line); background: #fff; }
.bdg.owner { background: var(--horizon-wash); color: var(--green-deep); box-shadow: none; border: 1px solid var(--horizon); }
.bdg.ok { background: #E6F4EA; color: #1D6B34; box-shadow: none; }

/* legacy badge (current templates; migrated to .bdg in later phases) */
.badge {
  display: inline-block; background: var(--gold); color: var(--ink);
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
/* Sold/Rented outcome - a real portal status the Backoffice keeps published (Patrick, 28/09),
   never a normal exclusivity-style badge, so it gets its own strong colour (--red). */
.badge-outcome { background: var(--red); color: #fff; }
/* Story 1471: the listing is advertised by its owner (no name is shown, this badge says it instead). */
.badge-owner { background: var(--green-deep); color: #fff; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chip:hover { border-color: var(--green); }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- placeholders (photo gradients; mockup .ph) ---------- */
.ph { position: relative; background: linear-gradient(135deg, #cdbd9d, #8aa3a8); overflow: hidden; }
.ph::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(transparent 62%, rgba(0,0,0,.18)),
  repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 2px, transparent 2px 46px); }
.ph[data-i="1"] { background: linear-gradient(135deg, #d9c9a8, #7f9aa0); }
.ph[data-i="2"] { background: linear-gradient(160deg, #9fb7b4, #3d6a66); }
.ph[data-i="3"] { background: linear-gradient(120deg, #e3d6bb, #b79b6a); }
.ph[data-i="4"] { background: linear-gradient(150deg, #8fb0c4, #44677a); }
.ph[data-i="5"] { background: linear-gradient(135deg, #cfd8d0, #6f8f86); }
.ph[data-i="6"] { background: linear-gradient(135deg, #e8d9c4, #a7855c); }

.muted { color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- favorite button ---------- */
.fav-btn {
  border: none; background: var(--sand); border-radius: 50%; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.fav-btn img { width: 18px; height: 18px; }
/* Over a card photo: float top-right. Lives on .card (not .card-photo) so it
   sits as a sibling of the <a> wrapping the photo/body - a <button> can't
   nest inside an <a> (invalid interactive-in-interactive HTML). */
.card > .fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(255,255,255,.9);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}


/* ---------- listing cards (search results, account pages) ---------- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper-raised); display: block; position: relative; }
.card > a { display: block; color: inherit; }
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.card.card-hover { box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(0,0,0,.12); }
.card-photo { height: 140px; background-size: cover; background-position: center; background-color: var(--line); position: relative; }
.card-photo .badge { position: absolute; top: 8px; left: 8px; }
.card-body { padding: 10px 12px; }
.card-price { font-weight: 700; font-size: 16px; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.card-specs { font-size: 13px; color: var(--ink-soft); margin: 2px 0; }
.card-address { font-size: 13px; color: var(--ink-soft); }
.empty { color: var(--ink-soft); padding: 20px; text-align: center; }

/* ---------- styled 404 (templates/not_found.html) ---------- */
.nf-page { max-width: 560px; margin: 0 auto; padding: 72px 20px 96px; text-align: center; }
.nf-page .nf-ico { width: 48px; height: 48px; color: var(--gold-dark); margin-bottom: 8px; }
.nf-page h1 { font: 600 28px/1.25 var(--font-serif); margin: 0 0 10px; }
.nf-page p { color: var(--ink-soft); font-size: 16px; line-height: 1.55; margin: 0 0 24px; }
.nf-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
