/* =====================================================================
   Lost & Found pages (/lostfound/…). Builds on app.css (cards, pills,
   inputs, steps, list items) and its light/dark colour variables.
   ===================================================================== */

/* ---------- hero ---------- */
.lf-hero {
    background:
        radial-gradient(900px 320px at 85% -10%, var(--brand-soft), transparent 70%),
        var(--bg-alt);
    border-bottom: 1px solid var(--line);
    padding: 2.6rem 0 2.2rem;
}
.lf-hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.lf-hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; margin: .7rem 0 .5rem; }
.lf-hero p { max-width: 34rem; }
.lf-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.lf-cta.center { justify-content: center; }
.lf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.lf-stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem .8rem; text-align: center; box-shadow: var(--shadow); color: var(--ink);
    transition: transform .15s, border-color .15s;
}
a.lf-stat:hover { transform: translateY(-3px); border-color: var(--brand); }
.lf-stat strong { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.lf-stat span { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.lf-stat.lost strong { color: #dc2626; }
.lf-stat.found strong { color: #16a34a; }
.lf-stat.resolved strong { color: var(--brand); }

.lf-section { padding-top: 1.8rem; }

/* ---------- search ---------- */
.lf-search { margin-bottom: 1rem; }
.lf-search-bar { display: flex; gap: .6rem; padding: .45rem; align-items: center; border-radius: 16px; }
.lf-search-bar .lf-search-q { flex: 1; min-width: 0; }
.lf-search-bar .input { border-color: transparent; }
.lf-search-bar .btn { flex: none; }
.lf-search-more { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.lf-search-more .input { width: auto; flex: 0 1 200px; padding-block: .45rem; font-size: .9rem; }
.lf-search-q { position: relative; }
.lf-search-q svg { position: absolute; left: .8rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.lf-search-q .input { padding-left: 2.4rem; }

.lf-chips { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem 0 .6rem; margin-bottom: .6rem; scrollbar-width: thin; }
.lf-chip {
    white-space: nowrap; padding: .4rem .9rem; border-radius: 99px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink-soft); font-weight: 600; font-size: .88rem; transition: .15s;
}
.lf-chip:hover { border-color: var(--brand); color: var(--brand); }
.lf-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.lf-results-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; min-height: 2rem; }
.lf-results-head p { margin: 0; }

/* ---------- cards ---------- */
.lf-card .thumb { height: 180px; }
.lf-card-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lf-card-top .muted { margin-left: auto; }
.lf-card-desc { color: var(--ink-soft); font-size: .9rem; margin: .1rem 0 .5rem; }
.pill.ok { background: #dcfce7; color: #15803d; }
html[data-theme="dark"] .pill.lost { background: rgba(220, 38, 38, .18); color: #fca5a5; }
html[data-theme="dark"] .pill.found { background: rgba(22, 163, 74, .18); color: #86efac; }
html[data-theme="dark"] .pill.resolved { background: rgba(99, 102, 241, .2); color: #c7d2fe; }

.lf-empty { text-align: center; padding: 2.4rem 1.4rem; }
.lf-empty-ico { font-size: 2.6rem; margin-bottom: .4rem; }
.lf-empty .btn { margin-top: .8rem; }

.lf-pages { display: flex; justify-content: center; gap: .4rem; margin-top: 1.8rem; flex-wrap: wrap; }
.lf-pages .page-btn { display: inline-grid; place-items: center; min-width: 40px; }
.page-gap { align-self: center; color: var(--ink-soft); padding: 0 .2rem; }

.lf-how { margin-top: 1rem; }


/* ---------- one post ---------- */
.lf-back { display: inline-block; font-weight: 600; font-size: .9rem; margin-bottom: .8rem; }
.lf-post-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; }
.lf-gallery { background: var(--bg-alt); display: flex; flex-direction: column; min-height: 320px; }
.lf-gallery-main { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg-alt); flex: 1; }
.lf-thumbs { display: flex; gap: .5rem; padding: .7rem; }
.lf-thumb { border: 2px solid transparent; border-radius: 10px; padding: 0; width: 70px; height: 56px; overflow: hidden; cursor: pointer; background: none; }
.lf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lf-thumb.active { border-color: var(--brand); }
.lf-noimg { flex: 1; display: grid; place-items: center; align-content: center; gap: .3rem; color: var(--ink-soft); }
.lf-noimg span { font-size: 4rem; }
.lf-post-info { padding: 1.8rem; }
.lf-post-info .detail-meta { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.lf-desc { white-space: normal; color: var(--ink); line-height: 1.65; }
.lf-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }
.lf-contact { margin-top: 1rem; background: var(--brand-soft); border-radius: 12px; padding: 1rem 1.2rem; }
.lf-contact-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.lf-contact-row:last-of-type { border-bottom: 0; }
.lf-contact .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 700; }
.lf-contact-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.lf-contact p { margin: .6rem 0 0; }
.lf-owner { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.lf-owner .muted { margin-right: auto; }

/* ---------- form ---------- */
.lf-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.lf-form textarea.input { resize: vertical; min-height: 120px; }
.lf-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.lf-fieldset legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.lf-contact-field { display: grid; grid-template-columns: 96px 1fr; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.lf-contact-field .check-row { margin: 0; }
.lf-contact-field .input:disabled { opacity: .55; }
.lf-phone-check { margin: -.1rem 0 .8rem 102px; }
.lf-phone-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .3rem; }
.lf-phone-row .input { width: 130px; }
.lf-phone-check.ok small { color: var(--success); font-weight: 600; }
.verify-hint { background: #fef3c7; color: #92400e; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
html[data-theme="dark"] .verify-hint { background: rgba(245, 158, 11, .15); color: #fcd34d; }

.lf-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.lf-img { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-alt); border: 1px solid var(--line); }
.lf-img img { width: 100%; height: 100%; object-fit: cover; }
.lf-img-x {
    position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0;
    background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; font-size: .85rem;
}
.lf-drop {
    aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center;
    align-content: center; gap: .15rem; text-align: center; cursor: pointer; color: var(--ink-soft);
    font-weight: 600; font-size: .9rem; padding: .5rem; transition: .15s;
}
.lf-drop:hover, .lf-drop.drag { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.lf-drop[hidden] { display: none; }
.lf-drop-ico { font-size: 1.7rem; }

.lf-tabs { margin-bottom: 1.2rem; flex-wrap: wrap; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
}
@media (max-width: 860px) {
    .lf-hero-inner { grid-template-columns: 1fr; }
    .lf-post-card { grid-template-columns: 1fr; }
    .lf-gallery { min-height: 220px; }
}
@media (max-width: 600px) {
    .lf-hero { padding: 1.8rem 0 1.6rem; }
    .lf-cta .btn { flex: 1; padding-left: .8rem; padding-right: .8rem; font-size: .95rem; white-space: nowrap; }
    .lf-hero .grad { display: inline; }
    .lf-stat strong { font-size: 1.4rem; }
    .lf-search-more { flex-wrap: nowrap; }
    .lf-search-more .input { flex: 1 1 0; min-width: 0; }
    .lf-post-info { padding: 1.2rem; }
    .lf-contact-field { grid-template-columns: 1fr; gap: .3rem; }
    .lf-phone-check { margin-left: 0; }
}

/* Google Places suggestions on the location boxes (assets/js/places.js).
   The box is wrapped in .pl-field only when a Maps key is set; the
   dropdown reuses the search suggestion look (.st-drop / .st-opt). */
.pl-field { position: relative; display: block; min-width: 0; }
.pl-field > .input { width: 100%; }
.pl-field > .pl-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); min-width: 240px; max-height: 320px; }
.pl-empty { padding: .55rem .6rem; }
.pl-attr { padding: .3rem .6rem .1rem; text-align: right; font-size: .7rem; color: var(--ink-soft); letter-spacing: .01em; }
.lf-search-more .pl-field { flex: 0 1 260px; }
.lf-search-more .pl-field > .input { width: 100%; flex: none; }
@media (max-width: 600px) {
    .lf-search-more .pl-field { flex: 1 1 0; }
    .pl-field > .pl-drop { min-width: 0; }
    .lf-search-more .pl-field > .pl-drop { left: auto; width: min(320px, calc(100vw - 32px)); }
}
