/* Schema.org Explorer – WordPress admin styles */
/* ── TD-06: PresenceGraph design tokens (from pco_base.min.css) ───── */
#schema-explorer-wrap {
  --se-brand: #1a2238;                  /* --color-brand-primary */
  --se-brand-deep: #12192b;
  --se-primary: #00d084;                /* --color-primary (PG green) */
  --se-primary-dim: #00b874;
  --se-text: #e0e0e0;                   /* --color-text-primary */
  --se-text-dim: #9aa4b2;
  --se-panel: #1e293b;                  /* dark slate surface */
  --se-panel-alt: #232f3f;
  --se-border: #334155;
  --se-input-bg: #26334a;
}


#schema-explorer-wrap {
  height: 900px;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--se-text, #e0e0e0);
  background: var(--se-brand, #1a2238);
  box-sizing: border-box;
}

/* Collapsed sidebar */
body.folded #schema-explorer-wrap {
  left: 36px;
}

/* Mobile */
@media screen and (max-width: 782px) {
  #schema-explorer-wrap {
    left: 0;
    top: 46px;   /* mobile admin bar */
  }
}

#schema-explorer-wrap *, #schema-explorer-wrap *::before, #schema-explorer-wrap *::after {
  box-sizing: border-box;
}

/* ── Header ── */
#se-header {
  background: var(--se-brand-deep, #12192b);
  color: #fff;
  border-bottom: 2px solid var(--se-primary, #00d084);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
#se-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  margin: 0;
  color: #fff;
  border: none;
  padding: 0;
}
#se-search {
  flex: 1;
  padding: 7px 14px;
  border: 1px solid var(--se-border, #334155);
  background: var(--se-input-bg, #26334a);
  color: var(--se-text, #e0e0e0);
  border-radius: 24px;
  font-size: 0.95rem;
  outline: none;
  max-width: 480px;
}
#se-reset-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 24px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
}
#se-reset-btn:hover { background: rgba(255,255,255,0.35); }

/* ── Filter bar ── */
#se-filters {
  background: var(--se-panel-alt, #232f3f);
  border-bottom: 1px solid var(--se-border, #334155);
  padding: 7px 16px;
  flex-shrink: 0;
}
.se-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 3px 0;
  margin: 4px 4px;
}
.se-filter-label {
  font-size: 0.82rem;
  color: #9aa7bd;
  min-width: 72px;
  flex-shrink: 0;
}
.se-filter-btn {
  padding: 4px 14px;
  border: 1px solid var(--se-border, #334155);
  border-radius: 20px;
  background: var(--se-panel, #1e293b);
  color: var(--se-text, #e0e0e0);
  cursor: pointer;
  font-size: 0.82rem;
}

#se-result-count { margin-left: auto; font-size: 0.8rem; color: #cacaca; }
#se-header #se-result-count { color: rgba(255,255,255,0.75); white-space: nowrap; }

/* ── Main two-pane layout ── */
#se-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── List panel ── */
#se-list-panel {
  width: 320px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #575757;
  border-right: 1px solid #334155;
  overflow-x: hidden;
}
.se-list-item {
  padding: 9px 14px;
  border-bottom: 1px solid #73737354;
  cursor: pointer;
}
.se-list-item:hover { background: #f0f7ff; color: #023577; }
.se-list-item.selected { background: #e8f0fe; border-left: 3px solid #1a73e8; color: #023577;}
.se-item-name { font-weight: 600; font-size: 0.92rem; }
.se-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 5px;
  vertical-align: middle;
}
.se-badge-type     { background: #12352a; color: #7ee2b0; }
.se-badge-property { background: #3a3122; color: #ffd97a; }
.se-item-desc {
  font-size: 0.76rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Detail panel ── */
#se-detail-panel {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
  background: radial-gradient(circle at top left, #1a2238, #090a0f 80%);
}
#se-detail-panel .se-placeholder {
  color: #aaa;
  text-align: center;
  margin-top: 80px;
  font-size: 1rem;
}
.se-detail-name { font-size: 1.5rem; font-weight: 700; color: var(--se-primary); }
.se-detail-id-link {
  color: #26baf5;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-block;
  margin: 4px 0 12px;
}
.se-detail-id-link:hover { text-decoration: underline; color: #0fa; }
.se-detail-description {
  font-size: 0.9rem;
  color: #eee;
  line-height: 1.6;
  margin-bottom: 18px;
  margin-top: 18px;
  border-left: 3px solid #ddd;
  padding-left: 12px;
}
.se-detail-section { margin-bottom: 14px; }
.se-detail-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #d3cfcf;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.se-ref-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.se-ref-tag {
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
      color: #0fa;
    background: rgba(0, 255, 170, .07);
    border: 1px solid rgba(0, 255, 170, .15);
    -webkit-border-radius: 3px;
    border-radius: 3px;
    padding: .2rem .5rem;
    font-family: monospace;
    font-size: .8rem;
}
.se-ref-tag:hover { background: rgba(0, 255, 170, 0.18); }
.se-detail-plain { font-size: 0.86rem; color: #444; }
.se-breadcrumb { font-size: 0.78rem; color: #888; margin-bottom: 14px; }
.se-breadcrumb span { cursor: pointer; color: #2d87fd; }
.se-breadcrumb span:hover { text-decoration: underline; }
.se-examples-list { display: flex; flex-direction: column; gap: 10px; }
.se-example-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  padding: 12px 14px;
  font-family: 'Fira Mono', Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
  text-wrap: auto;
}
.se-type-link { color: #4ec9b0; text-decoration: none; cursor: pointer; }
.se-type-link:hover { text-decoration: underline; }

/* Scrollbars */
#se-list-panel::-webkit-scrollbar,
#se-detail-panel::-webkit-scrollbar { width: 6px; }
#se-list-panel::-webkit-scrollbar-thumb,
#se-detail-panel::-webkit-scrollbar-thumb { background: var(--se-border, #334155); border-radius: 3px; }

/* TD-00: subtle list-row indicators (dots) — full badges live in the detail panel */
.se-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}
.se-dot-custom { background: #8e44ad; }
.se-dot-usage  { background: #2980b9; }
.se-dot-flag   { background: #e67e22; }

/* detail-panel meta row (badges moved here from list rows) */
.se-detail-meta {
  margin: 0.6rem 0 0.6rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  border: #aaaaaa8f 1px solid;
  max-width: fit-content;
  padding: 0.5rem;
  border-radius: 6px;
}

/* ── TD-00/W7: search highlighting + empty state ─────────────────── */
.se-item-name mark.se-mark,
.se-item-desc mark.se-mark {
  background: #fff3a3;
  color: #1e293b;
  padding: 0 1px;
  border-radius: 2px;
}
.se-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--se-text-dim, #9aa4b2);
  font-size: 0.95rem;
}
.se-empty small {
  color: var(--se-text-dim, #9aa4b2);
}

/* ── TD-12: attribution modal ─────────────────────────────────────────── */
#se-attribution-btn {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(61, 219, 56, 0.4);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
      padding: 7px;
    min-height: min-content;
    min-inline-size: min-content;
}
#se-attribution-btn:hover { background: rgba(255, 255, 255, 0.15); }

.se-attribution-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
}
.se-attribution-modal[hidden] { display: none; }

.se-attribution-card {
  background: #fff;
  color: #222;
  max-width: 480px;
  width: 90%;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.se-attribution-card h3 { margin: 0 0 0.75rem; }
.se-attribution-card p { font-size: 0.9rem; line-height: 1.5; margin: 0 0 0.75rem; color: #222;}
.se-attribution-card a { color: #1a5fb4; }
.se-attribution-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
}
.se-attribution-close:hover { color: #000; }

/* ── TD-05: plan badge + plan tier filter buttons ─────────────────── */
.se-badge-plan {
  background: #12352a;
  color: var(--se-primary, #00d084);
}
.se-filter-btn[data-filter^="plan-"] {
  border-color: #1a5fb4;
}

/* ── TD-11: status filter + dot colours (TD-10 vocabulary) ────────── */
.se-dot-flag { background: #e8a13c; }
.se-filter-btn[data-filter^="status-"] { border-style: solid; }
.se-filter-btn[data-filter="status-supported"] { border-color: #00d084; background: #e8f5e9; color: #2e7d32; }
.se-filter-btn[data-filter="status-testing"] { border-color: #e8a13c; background: #fff3e0; color: #e65100; }
.se-filter-btn[data-filter="status-in-progress"] { border-color: #4a9eff; background: #e8f0fe; color: #1a73e8; }
.se-filter-btn[data-filter="status-contact-us"] { border-color: #b39ddb; background: #f3e8fe; color: #6a1b9a; }
.se-filter-btn[data-filter="status-future"] { border-color: #64748b; background: #f0f4f8; color: #374151; }

/* ── TD-11: status badge colours (detail meta, matches dots/buttons) ─ */
.se-badge-status-supported   { background: #12352a; color: #7ee2b0; }
.se-badge-status-testing     { background: #3a3122; color: #ffd97a; }
.se-badge-status-in-progress { background: #1f2c3d; color: #7cb8ff; }
.se-badge-status-contact-us  { background: #2d2a4a; color: #b39ddb; }
.se-badge-status-future      { background: #26303c; color: #9aa4b2; }

.se-filter-btn:hover { border-color: var(--se-primary, #00d084); }
.se-filter-btn.active {
  background: var(--se-primary, #00d084);
  color: #10241c;
  border-color: var(--se-primary, #00d084);
}
