/* =================================================================
   Saath — additive UI layer  (v1)
   Components the Phase 1 scope needs that the original system did
   not have: dialogs, bottom sheets, toasts, filter drawers, interest
   expiry pills and the protected-photo request states.

   ADDITIVE ONLY. Nothing in app.css or auth.css is modified.
   Everything below is built from the existing ember-glow variables
   (--pink, --fire-2, --glass, --line, --radius, --shadow-lg …) so it
   inherits both themes automatically.

   Load AFTER app.css (or auth.css):
     <link rel="stylesheet" href="assets/extra.css">
   ================================================================= */

/* ---------- dialog ---------- */
.ovl { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: rgba(10,2,6,.55); backdrop-filter: blur(3px); animation: ovlIn .18s ease; }
@keyframes ovlIn { from { opacity: 0; } to { opacity: 1; } }

.dlg { width: min(520px, 100%); margin: auto; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: dlgIn .26s cubic-bezier(.2,.7,.2,1); }
body[data-theme="dark"] .dlg { background: #150a0f; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg.wide { width: min(680px, 100%); }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.dlg-head h3 { font-size: 1.14rem; font-weight: 700; }
.dlg-x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--glass);
  color: var(--muted); display: grid; place-items: center; flex: none; transition: color .2s, border-color .2s; }
.dlg-x:hover { color: var(--pink); border-color: var(--pink); }
.dlg-x svg { width: 16px; height: 16px; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.dlg-foot .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .dlg-foot .btn { flex: 0 0 auto; } }

/* becomes a bottom sheet on phones */
@media (max-width: 560px) {
  .ovl { padding: 0; align-items: flex-end; }
  .dlg { width: 100%; border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheetIn .26s cubic-bezier(.2,.7,.2,1); }
  @keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
}

/* ---------- side drawer (mobile filters) ---------- */
.drw { position: fixed; inset: 0 0 0 auto; z-index: 91; width: min(380px, 92vw);
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: drwIn .26s cubic-bezier(.2,.7,.2,1); }
body[data-theme="dark"] .drw { background: #150a0f; }
@keyframes drwIn { from { transform: translateX(100%); } to { transform: none; } }
.drw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: none; }
.drw-body { padding: 20px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.drw-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; flex: none; }
.drw-foot .btn { flex: 1; }

body.no-scroll { overflow: hidden; }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); z-index: 95;
  bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none; }
@media (min-width: 921px) { .toasts { bottom: 24px; } }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  font-size: .86rem; font-weight: 500; pointer-events: auto; animation: tIn .26s cubic-bezier(.2,.7,.2,1); }
.toast svg { width: 17px; height: 17px; flex: none; color: var(--green-2); }
.toast.err svg { color: var(--danger); }
@keyframes tIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.toast.out { animation: tOut .2s ease forwards; }
@keyframes tOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- interest expiry (§03 Interest Reminders & Expiry) ---------- */
.expiry { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px;
  font-size: .72rem; font-weight: 700; line-height: 1.1;
  background: var(--warn-soft); color: #A8650A; border: 1px solid rgba(245,165,36,.4); }
.expiry svg { width: 12px; height: 12px; flex: none; }
.expiry.soon { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.expiry.gone { background: var(--glass); color: var(--muted); border-color: var(--line); }
body[data-theme="dark"] .expiry { color: #FFD06A; }

/* ---------- protected photos (§03) ---------- */
.locked-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  font-size: .84rem; background: var(--violet-soft); color: var(--ink-2); border: 1px solid rgba(139,92,246,.3); }
.locked-note svg { width: 16px; height: 16px; flex: none; color: var(--purple-2); margin-top: 2px; }
.locked-note strong { color: var(--ink); }
.chip-guard { background: var(--violet-soft); color: var(--purple); border-color: rgba(139,92,246,.4); }
body[data-theme="dark"] .chip-guard { color: #C4B5FD; }

/* ---------- plan gate (§02 plan-gated contact reveal) ---------- */
.gate { position: relative; border-radius: 14px; overflow: hidden;
  background: var(--accent-soft); border: 1px solid rgba(251,60,127,.3); padding: 16px; text-align: center; }
.gate .gate-ic { width: 38px; height: 38px; border-radius: 12px; margin: 0 auto 10px; display: grid; place-items: center;
  background: var(--fire-2); color: #fff; box-shadow: 0 8px 18px -8px rgba(251,60,127,.7); }
.gate .gate-ic svg { width: 18px; height: 18px; }
.gate p { font-size: .86rem; color: var(--ink-2); }
.gate strong { color: var(--ink); }
.gate .btn { margin-top: 12px; }
.blurred { filter: blur(5px); user-select: none; pointer-events: none; }

/* ---------- completeness meter (§03 Profile Completeness Meter) ---------- */
.complete { display: flex; align-items: center; gap: 14px; }
.complete .cnum { font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.complete .cbar { flex: 1; }
.todo { list-style: none; padding: 0; display: grid; gap: 8px; }
.todo li { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--ink-2); }
.todo li svg { width: 16px; height: 16px; flex: none; }
.todo li.done { color: var(--muted); }
.todo li.done svg { color: var(--green); }
.todo li.open svg { color: var(--muted-2); }
.todo li a { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--accent-deep); }

/* ---------- payment method rows (§16 mobile-money first) ---------- */
.pay { display: grid; gap: 8px; }
.payrow { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 14px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line-2); transition: border-color .2s, background .2s; }
.payrow:hover { border-color: var(--pink); }
.payrow.on { border-color: var(--pink); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(251,60,127,.1); }
.payrow input { accent-color: var(--pink); width: 18px; height: 18px; flex: none; }
.payrow .pname { font-weight: 600; font-size: .92rem; color: var(--ink); }
.payrow .pnote { font-size: .76rem; color: var(--muted); }
.payrow .plogo { width: 42px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: .6rem; font-weight: 800; letter-spacing: .02em; color: #fff; }
.plogo.mtn { background: #FFCC00; color: #1a1a1a; }
.plogo.telecel { background: #E2001A; }
.plogo.airteltigo { background: #E30613; }
.plogo.card { background: var(--ink); color: var(--bg); }
.plogo.bank { background: var(--purple); }

/* ---------- misc helpers ---------- */
.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: none; border: 0;
  padding: 11px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-weight: 600; font-size: .88rem; color: var(--muted); transition: color .2s, border-color .2s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .active, .tabs [aria-selected="true"] { color: var(--accent-deep); border-bottom-color: var(--pink); }

.empty { display: grid; place-items: center; gap: 12px; text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .art { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--pink); }
.empty .art svg { width: 26px; height: 26px; }
.empty h3 { color: var(--ink); font-size: 1.14rem; }
.empty p { max-width: 42ch; font-size: .86rem; }

.rail { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; }

.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 99; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 15px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; font-size: .96rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { padding-bottom: 15px; color: var(--ink-2); font-size: .86rem; max-width: 68ch; }

@media (prefers-reduced-motion: reduce) { .ovl, .dlg, .drw, .toast { animation: none !important; } }

/* ---------- protected-photo label override (§03) ----------
   app.css sets .ph.blur::before to "Photo visible after interest
   accepted". Under the quoted scope a member locks their album and
   approves each viewer, so the label is a request, not a wait.
   Overridden here rather than edited in app.css.              */
.ph.blur::before { content: "🔒 Photos locked — request access"; }
.ph.blur.sm::before { content: "🔒"; }

/* ---------- photo lightbox (§03 protected photos) ----------
   Opened from any [data-lb] tile. Locked photos show the request
   state instead of the image, so the paywall is visible in context. */
.lb { width:min(900px,100%); margin:auto; }
.lb-stage { position:relative; border-radius:var(--radius); overflow:hidden;
  background:var(--bg-2); aspect-ratio:4/3; display:grid; place-items:center; }
body[data-theme="dark"] .lb-stage { background:#0d0509; }
.lb-stage .shot { position:absolute; inset:0; background-size:cover; background-position:center 18%; }
.lb-stage .locked { position:relative; z-index:2; display:grid; place-items:center; gap:12px;
  text-align:center; padding:26px; max-width:38ch; }
.lb-stage .locked .li { width:52px; height:52px; border-radius:16px; display:grid; place-items:center;
  background:var(--violet-soft); color:var(--purple-2); }
.lb-stage .locked .li svg { width:22px; height:22px; }
.lb-stage .locked strong { color:var(--ink); font-size:1.02rem; }
.lb-stage .locked p { font-size:.86rem; color:var(--muted); }
.lb-nav { position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:40px; height:40px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(10,2,6,.55); color:#fff; display:grid; place-items:center; }
.lb-nav:hover { background:rgba(10,2,6,.78); }
.lb-nav svg { width:20px; height:20px; }
.lb-nav.prev { left:12px; } .lb-nav.next { right:12px; }
.lb-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; flex-wrap:wrap; }
.lb-count { font-size:.84rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.lb-thumbs { display:flex; gap:8px; margin-top:12px; overflow-x:auto; scrollbar-width:none; }
.lb-thumbs::-webkit-scrollbar { display:none; }
.lb-thumbs button { flex:none; width:58px; height:58px; border-radius:12px; overflow:hidden; cursor:pointer;
  border:2px solid transparent; background-size:cover; background-position:center; padding:0; position:relative; }
.lb-thumbs button.on { border-color:var(--pink); }
.lb-thumbs button.lk::after { content:"🔒"; position:absolute; inset:0; display:grid; place-items:center;
  background:rgba(10,2,6,.5); font-size:.9rem; }
[data-lb] { cursor:pointer; }
@media (max-width:560px){ .lb-stage { aspect-ratio:1/1; } }

/* ---------- plan-gated photos (free members see the first photo only) ----------
   Distinct from .ph.blur / [data-locked], which is the OWNER's privacy lock.
   This one is the subscription gate, so it is gold rather than violet. */
.ph.premium::before {
  content: "👑 " attr(data-plan-msg);
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; text-align: center; padding: 14px;
  font-size: .78rem; font-weight: 700; line-height: 1.35; color: #6b4708;
  backdrop-filter: blur(14px); background: rgba(255,208,106,.28);
}
.ph.img.premium::before { color: #fff; background: rgba(40,22,2,.44); text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.ph.premium.sm::before { content: "👑"; padding: 0; font-size: 1rem; }
body[data-theme="dark"] .ph.premium::before { color: #FFD06A; background: rgba(60,38,4,.5); }

.lb-stage .plan { position: relative; z-index: 2; display: grid; place-items: center; gap: 12px;
  text-align: center; padding: 26px; max-width: 40ch; }
.lb-stage .plan .pi { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); }
.lb-stage .plan .pi svg { width: 22px; height: 22px; }
.lb-stage .plan strong { color: var(--ink); font-size: 1.02rem; }
.lb-stage .plan p { font-size: .86rem; color: var(--muted); }
.lb-thumbs button.pr::after { content: "👑"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(40,22,2,.5); font-size: .85rem; }

/* ---------- classes referenced by the new screens ----------
   These were used in markup before being defined; .note.guard fell back to
   the default blue note, and .strong did nothing at all. */
.note.guard { background: var(--violet-soft); border-color: rgba(139,92,246,.3); }
.note.guard > svg, .note.guard .ni { color: var(--purple-2); }
.strong { font-weight: 600; color: var(--ink); }

.ni.violet { background: var(--violet-soft); color: var(--purple-2); }

.optrow { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2);
  cursor: pointer; transition: border-color .2s, background .2s; }
.optrow:hover { border-color: var(--pink); }
.optrow input { accent-color: var(--pink); width: 18px; height: 18px; margin-top: 2px; flex: none; }

/* ---------- resolved rows (interest accepted / declined / removed) ---------- */
.row-done { opacity:.55; }
.row-done .iact, .row-done .acts { display:none !important; }
.res-note { display:inline-flex; align-items:center; gap:6px; font-size:.78rem; font-weight:700;
  padding:5px 10px; border-radius:8px; }
.res-note.ok { background:var(--verify-soft); color:var(--green-2); border:1px solid rgba(16,185,129,.35); }
.res-note.no { background:var(--glass); color:var(--muted); border:1px solid var(--line); }
body[data-theme="dark"] .res-note.ok { color:#34D399; }
.is-gone { display:none !important; }

/* ---------- [hidden] must win ----------
   The UA rule for [hidden] is display:none at the lowest specificity, so any
   class with its own display (e.g. .empty{display:grid}) silently defeats it.
   This affects every panel we toggle with el.hidden. */
[hidden] { display: none !important; }

/* ---------- admin queue states ---------- */
.q-done { opacity:.5; pointer-events:none; transition:opacity .25s; }
.q-gone { display:none !important; }
.q-stamp { display:inline-flex; align-items:center; gap:6px; font-size:.74rem; font-weight:700;
  padding:4px 9px; border-radius:8px; line-height:1.1; }
.q-stamp.ok  { background:var(--verify-soft); color:var(--green-2); border:1px solid rgba(16,185,129,.35); }
.q-stamp.no  { background:var(--danger-soft); color:var(--danger); border:1px solid var(--danger-line); }
.q-stamp.warn{ background:var(--warn-soft);   color:#A8650A;       border:1px solid rgba(245,165,36,.4); }
body[data-theme="dark"] .q-stamp.ok { color:#34D399; }
body[data-theme="dark"] .q-stamp.warn { color:#FFD06A; }

/* ---------- segmented control ----------
   Defined inline in settings.html only; promoted here so any screen can use
   it. settings.html keeps its own copy, which wins there — identical rules. */
.seg3 { display:inline-grid; grid-auto-flow:column; gap:4px; padding:4px; border-radius:11px;
  background:var(--bg-2); border:1px solid var(--line); }
.seg3 button { border:0; background:transparent; border-radius:8px; padding:7px 11px;
  font-weight:600; font-size:.8rem; color:var(--muted); white-space:nowrap; cursor:pointer;
  transition:background .2s, color .2s; }
.seg3 button:hover { color:var(--ink); }
.seg3 button.on { background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }
body[data-theme="dark"] .seg3 { background:rgba(255,255,255,.05); }
body[data-theme="dark"] .seg3 button.on { background:rgba(255,255,255,.1); }
.seg3.block { display:grid; grid-template-columns:repeat(3,1fr); width:100%; }

/* =================================================================
   Breadcrumb — Home › current page, at the top of the page content
   (Dashboard, Search, Interests, Messages).
   ================================================================= */
.crumbs { margin: 0 0 16px; font-size: .84rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.crumbs a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px 5px 7px; margin-left: -7px; border-radius: 9px;
  font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.crumbs a:hover { color: var(--accent-deep); background: var(--accent-soft); }
.crumbs a:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.crumbs .home-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px;
  background: var(--accent-soft); color: var(--pink); }
.crumbs .home-ic svg { width: 15px; height: 15px; }
.crumbs .sep { width: 15px; height: 15px; flex: none; color: var(--muted-2); }
.crumbs [aria-current="page"] { padding: 5px 2px; font-weight: 700; color: var(--accent-deep);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-theme="dark"] .crumbs [aria-current="page"] { color: #FF8FB5; }
@media (max-width: 600px) { .crumbs { margin-bottom: 12px; font-size: .8rem; } .crumbs .home-ic { width: 24px; height: 24px; } }
