/* Channel map additions. Loaded after ../map/public/styles.css and uses its
   variables, so both tools share one look. */

/* ── Location + filters ─────────────────────────── */
.loc-actions { display: flex; gap: 0.5rem; margin-top: 0.55rem; flex-wrap: wrap; }
.btn-ghost {
  background: var(--surface); color: var(--green-dark);
  border: 1.5px solid var(--border); padding: 0.45rem 0.8rem; font-size: 0.84rem;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--green-light); background: #f5fbf7; }
.btn-ghost:disabled { opacity: 0.55; cursor: progress; }

.filter-label {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); margin: 0.85rem 0 0.35rem;
}
.filter-label:first-child { margin-top: 0; }
.filter-label .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
#searchInput { width: 100%; }

.section-note { font-size: 0.78rem; color: var(--text-muted); margin: -0.2rem 0 0.5rem; line-height: 1.4; }
.section > h2 .count { font-weight: 600; color: var(--green-mid); margin-left: 0.3rem; }

.empty {
  font-size: 0.84rem; color: var(--text-muted); line-height: 1.45;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

/* ── Channel cards ──────────────────────────────── */
.ch-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 11px;
  margin-bottom: 0.45rem; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ch-card:last-child { margin-bottom: 0; }
.ch-card:hover { border-color: var(--green-light); }
.ch-card.open { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,106,79,0.10); }

.ch-head {
  display: flex; align-items: flex-start; gap: 0.65rem; width: 100%;
  padding: 0.6rem 0.75rem; border: none; background: none; cursor: pointer;
  font-family: inherit; text-align: left; color: var(--text);
}
.ch-swatch {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; margin-top: 0.28rem;
  border: 2px solid currentColor;
}
.ch-swatch.everywhere { border-radius: 50%; border-style: dashed; }
.ch-main { flex: 1; min-width: 0; }
.ch-title { display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.ch-name { font-weight: 700; font-size: 0.93rem; word-break: break-word; }
.ch-type {
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.08rem 0.45rem; border-radius: 99px;
}
.ch-type.hashtag { background: rgba(45,106,79,0.12); color: var(--green-dark); }
.ch-type.private { background: #fdf0dc; color: #92400e; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.3rem; }
.ch-tag {
  font-size: 0.7rem; padding: 0.05rem 0.45rem; border-radius: 99px;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--bg);
}
.ch-desc {
  font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ch-card.open .ch-desc { display: block; -webkit-line-clamp: unset; }
.ch-chev {
  color: var(--text-muted); font-size: 1rem; line-height: 1; margin-top: 0.15rem;
  transition: transform 0.15s;
}
.ch-card.open .ch-chev { transform: rotate(90deg); }

.ch-body { padding: 0 0.75rem 0.8rem; border-top: 1px solid var(--border); }
.ch-body[hidden] { display: none; }

.key-label {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); margin: 0.7rem 0 0.3rem;
}
.key-row { display: flex; align-items: center; gap: 0.5rem; }
.key-row code {
  flex: 1; min-width: 0; font-family: "SF Mono","Fira Code","Consolas",monospace;
  font-size: 0.8rem; background: var(--blue); color: #d4eee5;
  padding: 0.45rem 0.6rem; border-radius: 7px; word-break: break-all; line-height: 1.4;
}

.ch-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.7rem; }
.ch-actions .btn { padding: 0.45rem 0.8rem; font-size: 0.82rem; text-decoration: none; display: inline-block; }

.ch-qr { display: flex; gap: 0.8rem; align-items: center; margin-top: 0.75rem; }
.ch-qr .qr {
  width: 132px; flex-shrink: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 4px; line-height: 0;
}
.ch-qr .qr svg { width: 100%; height: auto; display: block; }
.ch-qr .hint { margin: 0; }

.ch-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.6rem; line-height: 1.6; }
.ch-meta a { color: var(--green-mid); }

/* ── Region scope + info popups ─────────────────── */
.ch-tag.scope { border-color: #c7d2fe; background: #eef2ff; color: #3730a3; }
.key-row code.scope-code { background: #eef2ff; color: #3730a3; font-weight: 700; }
.info-wrap { position: relative; display: inline-block; vertical-align: middle; margin-left: 0.3rem; }
.info-btn {
  width: 17px; height: 17px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
  font-family: inherit; font-size: 0.68rem; font-weight: 700; line-height: 1; text-transform: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.info-btn:hover, .info-btn:focus-visible, .info-btn[aria-expanded="true"] {
  border-color: var(--green); color: var(--green-dark); outline: none;
}
.info-pop {
  position: absolute; right: -0.4rem; top: calc(100% + 0.4rem); z-index: 1000;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: var(--shadow); padding: 0.5rem 0.65rem; white-space: nowrap;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}
.info-pop[hidden] { display: none; }
.info-pop-link { font-size: 0.84rem; font-weight: 700; color: var(--green-dark); text-decoration: none; }
.info-pop-link:hover { text-decoration: underline; }

/* ── Suggest ────────────────────────────────────── */
.suggest-card strong { font-size: 0.92rem; }
.suggest-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0.3rem 0 0.7rem; line-height: 1.4; }
.suggest-card .btn { display: inline-block; text-decoration: none; }

/* ── Map ────────────────────────────────────────── */
.point-marker {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold-warm); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--green-dark), 0 2px 6px rgba(0,0,0,0.3);
}

@media (max-width: 720px) {
  .ch-qr .qr { width: 116px; }
  .key-row code { font-size: 0.72rem; }
}
