/*
 * main.css — GLOBAL / common styles only (mobile-first).
 * Page-specific styles live in their own page-named file (e.g. home.css).
 */

:root {
  --wg-color: #0eaf4c;          /* brand green (sampled from logo) */
  --wg-color-dark: #0b8f3e;
  --wg-accent-red: #f6272a;     /* logo accent */
  --wg-accent-yellow: #fcc00c;  /* logo accent */
  --wg-text: #1a1a1a;
  --wg-muted: #666;
  --wg-bg: #ffffff;
  --wg-border: #e4e4e4;
  --wg-max-width: 720px;
  --wg-space: 16px;
  --wg-radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* The hidden attribute must always win, even over component display rules
   (e.g. .wg-btn sets display:inline-flex, which would otherwise show a
   `hidden` Load-more button). */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--wg-text);
  background: var(--wg-bg);
  line-height: 1.5;
}

a { color: var(--wg-color); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Buttons (global) */
.wg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--wg-color);
  border: 1px solid var(--wg-color);
  border-radius: var(--wg-radius);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background .15s ease, box-shadow .15s ease, transform .04s ease;
}
.wg-btn:hover {
  background: var(--wg-color-dark);
  border-color: var(--wg-color-dark);
  box-shadow: 0 2px 6px rgba(14, 175, 76, 0.25);
  text-decoration: none;
}
.wg-btn:active { transform: translateY(1px); }
.wg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14, 175, 76, 0.30); }
.wg-btn:disabled { opacity: .55; cursor: default; box-shadow: none; }

/* Secondary / outline button */
.wg-btn-ghost {
  background: #fff;
  color: var(--wg-text);
  border-color: var(--wg-border);
  box-shadow: none;
}
.wg-btn-ghost:hover { background: #f5f5f5; border-color: #d4d4d4; box-shadow: none; }

/* Pill badge (e.g. Verified / ADMIN) */
.wg-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--wg-color);
  border-radius: 999px;
  vertical-align: middle;
}

/* Search bar (marketplace + community) */
.wg-search { display: flex; gap: 8px; margin-bottom: 12px; }
.wg-search input {
  flex: 1; padding: 10px 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--wg-border); border-radius: var(--wg-radius);
}
.wg-search .wg-btn { width: auto; padding: 10px 18px; }

/* Closed (sold/found/given-away) cards: clearly greyed out + a status badge */
.wg-card.is-closed { opacity: 0.7; }
.wg-card.is-closed .wg-card-img { filter: grayscale(1); }
/* Card thumbnail — one canonical rule (used by marketplace, home, profile).
   Fixed square box + cover crop so every card image is the SAME size. NB: no
   flex here — `display:flex` makes iOS Safari ignore aspect-ratio (uneven). */
.wg-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f1f1;
}
.wg-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* "Account levels" explainer modal (profile + signup). */
.wg-levels-cta { margin: 4px 0 12px; }
.wg-levels-intro { color: var(--wg-muted); font-size: 0.9rem; margin: 0 0 12px; }
.wg-levels-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.wg-levels-table th, .wg-levels-table td { border: 1px solid var(--wg-border); padding: 8px 10px; text-align: left; vertical-align: top; }
.wg-levels-table th { background: #f4f4f4; }
.wg-levels-table td:first-child { white-space: nowrap; }
.wg-levels-note { font-size: 0.8rem; color: var(--wg-muted); margin: 12px 0 0; }

/* Footer language switcher (visible to everyone, logged in or not). */
.wg-langswitch { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 6px; }
.wg-langbtn {
  background: none; border: 1px solid var(--wg-border); border-radius: 999px;
  color: var(--wg-muted); font: inherit; font-size: 0.82rem; padding: 4px 12px; cursor: pointer;
}
.wg-langbtn:hover { border-color: var(--wg-color); color: var(--wg-text); }
.wg-langbtn.is-on { background: var(--wg-color); border-color: var(--wg-color); color: #fff; font-weight: 600; }

/* When launched as the installed PWA (standalone), hide install prompts — the
   landing CTA, the bottom floating banner, and the footer link. The top-nav
   "Install app" link stays. (wg-standalone is set in site_head.php.) */
.wg-standalone .wg-home-install,
.wg-standalone #wg-install,
.wg-standalone .wg-footer-legal a[href="/install"] { display: none !important; }

/* Events: "not the organizer" disclaimer (shown on the event page AND the event
   form, which use different page stylesheets — so it lives here, global). */
.wg-event-disclaimer {
  background: #fff8e6;
  border: 1px solid var(--wg-accent-yellow);
  border-radius: var(--wg-radius);
  padding: 10px 12px;
  font-size: 0.9rem;
  margin-bottom: var(--wg-space);
}

/* Generic placeholder for posts with no photo (the image div is left empty by
   the feed renderers). :empty out-specifies the per-page .wg-card-img bg. */
.wg-card-img:empty {
  background-image: url(/brand/placeholder-post.svg?v=3);   /* ?v bumped when the SVG changes (CSS-internal asset can't use filemtime) */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.wg-card-imgcount {
  position: absolute; right: 6px; bottom: 6px; z-index: 2;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.wg-card-status-badge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  font-size: 0.66rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
/* "HOT" badge — many people chatting about the item */
.wg-hot-badge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: var(--wg-accent-red); color: #fff;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.02em;
  padding: 2px 8px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* "Me" badge — marks the current user's own posts */
.wg-me-badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #1a1a1a;
  background: var(--wg-accent-yellow);
  border-radius: 999px;
  vertical-align: middle;
}
/* On image cards, float it over the top-left corner */
.wg-card .wg-me-badge { position: absolute; top: 6px; left: 6px; z-index: 2; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

/* Layout */
.wg-main {
  max-width: var(--wg-max-width);
  margin: 0 auto;
  padding: var(--wg-space);
}
/* Wider content area on desktop (mobile keeps the comfortable 720px). */
@media (min-width: 1000px) {
  :root { --wg-max-width: 1040px; }
}
/* Ultra-narrow screens (e.g. Galaxy Fold cover, ~280px): tighten the header
   so the logo lockup + login don't get clipped. */
@media (max-width: 380px) {
  .wg-header { padding-left: 10px; padding-right: 10px; gap: 8px; }
  .wg-logo img { height: 30px; }
}

/* Header / nav */
.wg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wg-space);
  padding: 12px var(--wg-space);
  border-bottom: 1px solid var(--wg-border);
  position: sticky;
  top: 0;
  background: var(--wg-bg);
  z-index: 10;
}
.wg-logo {
  display: inline-flex;
  align-items: center;
}
.wg-logo img {
  height: 40px;
  width: auto;
  display: block;
}
.wg-logo:hover { text-decoration: none; }

/* Available-points chip (left of the header, always visible when logged in) */
.wg-points-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: auto;            /* keep next to the logo; push the rest right */
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  background: #e8f7ee;
  color: var(--wg-color-dark, #0a7d37);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.wg-points-chip:hover { text-decoration: none; background: #d6f0e0; }
.wg-points-chip .wg-ico { width: 18px; height: 18px; color: var(--wg-color, #0eaf4c); }
.wg-points-chip-val { font-size: 0.92rem; }
@media (max-width: 480px) {
  .wg-points-chip { padding: 3px 9px 3px 6px; }
  .wg-points-chip .wg-ico { width: 16px; height: 16px; }
  .wg-points-chip-val { font-size: 0.85rem; }
}

/* Inline SVG icons inherit text colour and size */
.wg-ico {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
}

/* Desktop top nav (icon + label) */
.wg-nav-top {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wg-navlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--wg-radius);
  color: var(--wg-text);
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.wg-navlink:hover { background: var(--wg-surface, #f4f4f4); text-decoration: none; }
.wg-navlink.is-active { color: var(--wg-color-dark); }
.wg-navlink.is-active .wg-ico { color: var(--wg-color); }

/* Right side of the header (nav + bell + user) */
.wg-header-right { display: flex; align-items: center; gap: 6px; }
.wg-header-bell { position: relative; display: inline-flex; align-items: center; color: var(--wg-text); padding: 4px; }
.wg-header-bell:hover { text-decoration: none; color: var(--wg-color-dark); }

/* Unread badge on nav links (e.g. Messages) */
.wg-navlink, .wg-bnav-item, .wg-header-user, .wg-header-bell { position: relative; }
.wg-nav-badge {
  position: absolute; top: 2px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  background: var(--wg-accent-red); color: #fff;
  font-size: 0.62rem; font-weight: 700; line-height: 16px; text-align: center;
  border-radius: 999px;
}

/* Current user at top-right (mobile only; desktop shows it in the top nav) */
.wg-header-user { display: none; align-items: center; gap: 6px; color: var(--wg-text); font-weight: 600; }
.wg-header-user .wg-ico { width: 22px; height: 22px; }

/* Mobile bottom tab bar + Create FAB (hidden on desktop) */
.wg-bottomnav { display: none; }
.wg-fab { display: none; }

/* Footer */
.wg-footer {
  max-width: var(--wg-max-width);
  margin: 0 auto;
  padding: var(--wg-space);
  color: var(--wg-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--wg-border);
}
.wg-social { display: flex; gap: 14px; margin-bottom: 10px; }
.wg-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--wg-muted); border: 1px solid var(--wg-border); transition: all .15s;
}
.wg-social-link:hover { color: var(--wg-color-dark, #1c7c4a); border-color: var(--wg-color); }
.wg-footer-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; }
.wg-footer-legal a { color: var(--wg-muted); font-size: 0.82rem; }
.wg-footer-legal a:hover { color: var(--wg-color-dark, #1c7c4a); }
.wg-footer-disclaimer { margin: 12px 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--wg-muted); }
.wg-footer-biz { margin: 6px 0 0; font-size: 0.72rem; color: var(--wg-muted); }

/* PWA install banner (shown only when the browser offers install) */
.wg-install {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--wg-border); border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); padding: 12px 14px;
  width: calc(100% - 24px); max-width: 460px; box-sizing: border-box; font-size: 0.9rem;
}
.wg-install-text { flex: 1; min-width: 0; color: var(--wg-text); line-height: 1.35; }
.wg-install .wg-btn { width: auto; flex: none; padding: 8px 16px; white-space: nowrap; }
.wg-install-x { flex: none; background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--wg-muted); padding: 0 4px; }
@media (max-width: 640px) {
  .wg-install { bottom: 72px; }   /* sit above the fixed bottom tab bar */
  .wg-install-text { font-size: 0.82rem; }
}

/* ---- Mobile (≤640px): collapse top nav into a fixed bottom tab bar ---- */
@media (max-width: 640px) {
  .wg-nav-top { display: none; }
  .wg-logo img { height: 34px; }

  body { padding-bottom: 64px; } /* clear the fixed bottom bar */

  .wg-bottomnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--wg-bg);
    border-top: 1px solid var(--wg-border);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: stretch;
  }
  .wg-bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    padding: 4px 2px;
    color: var(--wg-muted);
    font-size: 0.66rem;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    min-width: 0;
  }
  .wg-bnav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .wg-bnav-item .wg-ico { width: 24px; height: 24px; }
  .wg-bnav-item.is-active { color: var(--wg-color-dark); }
  .wg-bnav-item.is-active .wg-ico { color: var(--wg-color); }
  .wg-bnav-item .wg-nav-badge { top: 1px; right: 50%; transform: translateX(16px); }

  .wg-header-user { display: inline-flex; }

  /* Floating Create button, above the bottom bar */
  .wg-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 16px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    z-index: 21;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--wg-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  }
  .wg-fab:hover { background: var(--wg-color-dark); text-decoration: none; }
  .wg-fab:active { transform: translateY(1px); }
  .wg-fab .wg-ico { width: 26px; height: 26px; }
}

/* ---- Modal + report form (shared by post + profile pages) ---- */
.wg-modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.5); padding: 16px;
}
.wg-modal[hidden] { display: none; }
.wg-modal-card {
  position: relative; background: #fff; border-radius: var(--wg-radius);
  padding: 20px 18px; width: 100%; max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.wg-modal-x {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  color: var(--wg-muted); cursor: pointer;
}
.wg-modal-title { font-size: 1.05rem; margin: 0 0 14px; }
.wg-report-gate { display: flex; flex-direction: column; gap: 12px; }
.wg-report-gate[hidden] { display: none; }
.wg-report-gate p { margin: 0; color: var(--wg-text); }
.wg-report-gate .wg-btn { width: auto; align-self: flex-start; }
.wg-report-form { display: flex; flex-direction: column; gap: 10px; }
.wg-report-form[hidden] { display: none; }
.wg-report-form select, .wg-report-form textarea {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 16px;
  border: 1px solid var(--wg-border); border-radius: var(--wg-radius);
}
.wg-report-form .wg-btn { width: auto; align-self: flex-end; padding: 8px 18px; }

/* Confirm modal */
.wg-confirm-card { max-width: 360px; }
.wg-confirm-msg { margin: 0 0 16px; font-size: 0.95rem; line-height: 1.45; }
.wg-confirm-row { display: flex; gap: 8px; justify-content: flex-end; }
.wg-confirm-row .wg-btn { width: auto; padding: 9px 18px; }

/* Review modal: star rating + text */
.wg-stars { display: flex; gap: 4px; margin: 4px 0 12px; }
.wg-star { background: none; border: none; cursor: pointer; font-size: 1.8rem; line-height: 1; color: #d4d4d4; padding: 0; }
.wg-star.is-on { color: var(--wg-accent-yellow); }
.wg-review-text {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 16px;
  border: 1px solid var(--wg-border); border-radius: var(--wg-radius); resize: vertical; margin-bottom: 12px;
}
.wg-modal-card .wg-btn { width: 100%; }

/* Styled file-upload dropzone (drag & drop + tap) — used project-wide for
   every file picker. Markup: pages/dropzone.php; behaviour: js/main.js. */
.wg-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--wg-border); border-radius: 12px;
  background: #fafafa; color: var(--wg-muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.wg-dropzone:hover { border-color: var(--wg-color, #16a34a); background: #f3faf5; color: var(--wg-text); }
.wg-dropzone:focus-within { border-color: var(--wg-color, #16a34a); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.wg-dropzone.is-dragover { border-color: var(--wg-color, #16a34a); background: #eafaf0; color: var(--wg-color-dark, #0b8f3e); }
.wg-dropzone-input {            /* keep it focusable but visually hidden */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wg-dropzone-icon { color: var(--wg-color, #16a34a); }
.wg-dropzone-cta { font-weight: 600; color: var(--wg-text); }
.wg-dropzone-drag { font-size: 0.82rem; }
.wg-dropzone-hint { font-size: 0.75rem; }

/* ── Site-wide points promo strip ─────────────────────────────────────────── */
.wg-points-promo {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px;
  background: linear-gradient(90deg, #0eaf4c, #0a7d37);
  color: #fff; font-weight: 600; text-decoration: none;
}
.wg-points-promo:hover { text-decoration: none; color: #fff; filter: brightness(1.04); }
.wg-points-promo .wg-ico { width: 20px; height: 20px; color: #fcc00c; flex: none; }
.wg-points-promo-text { flex: 1 1 auto; min-width: 0; font-size: 0.9rem; }
.wg-points-promo-cta { font-weight: 800; white-space: nowrap; font-size: 0.85rem; }
.wg-points-promo-x {
  flex: none; width: 26px; height: 26px; margin-left: 2px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,0.18);
  color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.wg-points-promo-x:hover { background: rgba(255,255,255,0.32); }
@media (max-width: 480px) {
  .wg-points-promo { padding: 8px 11px; gap: 7px; }
  .wg-points-promo-text { font-size: 0.82rem; }
  .wg-points-promo-cta { font-size: 0.78rem; }
}

/* Feed page header: title + a prominent Create button (marketplace/community) */
.wg-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wg-feed-head h1 { margin: 0; }
.wg-feed-create { width: auto; padding: 9px 16px; flex: none; }
.wg-feed-create .wg-ico { width: 18px; height: 18px; }

/* Daily-login points modal (confirm-only) */
.wg-daily-card { text-align: center; max-width: 340px; }
.wg-daily-art { display: flex; justify-content: center; margin-bottom: 6px; }
.wg-daily-title { margin: 4px 0 6px; font-size: 1.15rem; }
.wg-daily-body { margin: 0 0 16px; color: var(--wg-muted, #555); }
.wg-daily-card .wg-btn { width: 100%; }

/* "Join our WhatsApp group" CTA (profile + points pages) */
.wg-wa-cta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin: 18px 0; padding: 14px 16px;
  border: 1px solid #cfe9d6; border-radius: 14px;
  background: linear-gradient(100deg, #eafaf0, #f4fbf6);
}
.wg-wa-ico { flex: none; display: inline-flex; color: #25D366; }
.wg-wa-body { flex: 1 1 200px; min-width: 0; }
.wg-wa-title { display: block; font-size: 0.98rem; }
.wg-wa-text { margin: 2px 0 0; font-size: 0.86rem; color: var(--wg-muted, #555); }
.wg-wa-btn { width: auto; flex: none; background: #25D366; border-color: #25D366; }
.wg-wa-btn:hover { background: #1da851; border-color: #1da851; }
@media (max-width: 520px) { .wg-wa-btn { width: 100%; } }

/* ── Tickets (member /support + admin dashboard) ─────────────────────────── */
.wg-tk-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--wg-border, #e4e4e4); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; }
.wg-tk-row:hover { background: #f6f8f7; }
.wg-tk-row.is-unread { border-color: var(--wg-color, #0eaf4c); background: #f3fbf6; }
.wg-tk-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wg-tk-row-subject { font-weight: 700; color: var(--wg-text, #1a1a1a); }
.wg-tk-row-meta { font-size: 0.78rem; color: var(--wg-muted, #666); }
.wg-tk-dot { flex: none; width: 9px; height: 9px; border-radius: 999px; background: var(--wg-color, #0eaf4c); }

.wg-tk-thread { margin-top: 6px; }
.wg-tk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.wg-tk-back { width: auto; padding: 5px 12px; }
.wg-tk-subject { margin: 0; font-size: 1.05rem; flex: 1 1 auto; }
.wg-tk-status { font-size: 0.7rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.wg-tk-status.is-open { background: #e8f7ee; color: #0a7d37; }
.wg-tk-status.is-closed { background: #eef0f1; color: #555; }
.wg-tk-member { font-size: 0.82rem; color: var(--wg-muted, #666); margin: 0 0 8px; }
.wg-tk-admin-actions { margin-bottom: 8px; }
.wg-tk-admin-actions .wg-btn { width: auto; padding: 5px 12px; }
.wg-tk-messages { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.wg-tk-msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; }
.wg-tk-msg.is-admin { align-self: flex-start; background: #eef6ff; border: 1px solid #d6e6fb; }
.wg-tk-msg.is-user { align-self: flex-end; background: #e8f7ee; border: 1px solid #cfead9; }
.wg-tk-who { font-size: 0.72rem; color: var(--wg-muted, #666); margin-bottom: 3px; }
.wg-tk-body { white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; }
.wg-tk-att-img { display: inline-block; margin-top: 6px; max-width: 220px; }
.wg-tk-att-img img { width: 100%; border-radius: 8px; display: block; }
.wg-tk-att-doc { display: inline-block; margin-top: 6px; padding: 6px 10px; background: #fff; border: 1px solid var(--wg-border, #e4e4e4); border-radius: 8px; font-size: 0.85rem; }
.wg-tk-composer { border-top: 1px solid var(--wg-border, #e4e4e4); padding-top: 12px; }
.wg-tk-input { width: 100%; padding: 10px 12px; font: inherit; font-size: 16px; border: 1px solid var(--wg-border, #e4e4e4); border-radius: 10px; resize: vertical; }
.wg-tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.wg-tk-chip { font-size: 0.76rem; background: #f1f3f2; border: 1px solid #e0e3e1; border-radius: 999px; padding: 3px 10px; }
.wg-tk-bar { display: flex; gap: 8px; margin-top: 10px; }
.wg-tk-bar .wg-btn { width: auto; }
.wg-tk-newform { display: flex; flex-direction: column; gap: 8px; }
.wg-tk-newform input, .wg-tk-newform textarea { padding: 9px 11px; font: inherit; border: 1px solid var(--wg-border, #e4e4e4); border-radius: 10px; }

/* Danger button + badge (e.g. suspend, suspended) */
.wg-btn-danger { color: var(--wg-accent-red, #f6272a); border-color: #f3bcbc; }
.wg-btn-danger:hover { background: #fdecec; border-color: var(--wg-accent-red, #f6272a); color: var(--wg-accent-red, #f6272a); }
.wg-badge-danger { background: var(--wg-accent-red, #f6272a); color: #fff; }

/* Always-visible Feedback button (bottom-left; opposite the Create FAB) */
.wg-feedback-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 21;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px 9px 12px; border-radius: 999px;
  background: var(--wg-accent-yellow, #fcc00c); color: #1a1a1a;
  font-weight: 800; font-size: 0.85rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.wg-feedback-fab:hover { text-decoration: none; color: #1a1a1a; filter: brightness(0.97); }
.wg-feedback-fab .wg-ico { width: 20px; height: 20px; }
/* Mobile: icon-only circle, lifted above the bottom nav, opposite the Create FAB. */
@media (max-width: 640px) {
  .wg-feedback-fab { left: 16px; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 0; width: 48px; height: 48px; justify-content: center; }
  .wg-feedback-fab-label { display: none; }
}
/* Hide in the installed PWA's standalone mode? No — keep feedback always reachable. */
