/* ── Suggest-a-game slide-in panel ────────────────────────
   Shared by the main app (play-mode popover, invite modal, friends screen)
   and the library app (game detail). Mirrors the report panel's slide-in
   language. Theme tokens come from each app's stylesheet; fallbacks keep it
   legible if a token is missing. */

.suggest-panel {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.suggest-panel.hidden { display: none !important; }

.suggest-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.suggest-panel.open { pointer-events: auto; }
.suggest-panel.open .suggest-panel-backdrop { opacity: 1; }

.suggest-panel-content {
  position: relative;
  pointer-events: auto;
  background: var(--surface, #15151f);
  color: var(--text, #e8e8f0);
  border-left: 1px solid var(--border, #2c2c3a);
  width: 100vw;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.suggest-panel.open .suggest-panel-content { transform: translateX(0); }

@media (min-width: 720px) {
  .suggest-panel-content { width: 420px; max-width: 420px; }
}

.suggest-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #2c2c3a);
  flex: 0 0 auto;
}

.suggest-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.suggest-panel-close {
  border: none;
  background: none;
  color: var(--text-dim, #9a9ab0);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
}

.suggest-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggest-context {
  background: var(--surface2, #1d1d2a);
  border: 1px solid var(--border, #2c2c3a);
  border-radius: 10px;
  padding: 10px 12px;
}

.suggest-context-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim, #9a9ab0);
  margin-bottom: 4px;
}

.suggest-context-game {
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: break-word;
}

.suggest-context-meta {
  font-size: 11px;
  color: var(--text-dim, #9a9ab0);
  margin-top: 2px;
}

.suggest-note-input,
.suggest-search-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface2, #1d1d2a);
  border: 1px solid var(--border, #2c2c3a);
  border-radius: 8px;
  color: var(--text, #e8e8f0);
  font: inherit;
  font-size: 13px;
  padding: 9px 10px;
}

.suggest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border, #2c2c3a);
  border-radius: 10px;
  background: var(--surface2, #1d1d2a);
}

/* Game rows are whole-row buttons. */
button.suggest-row {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button.suggest-row:hover { border-color: var(--accent, #00e5a0); }

.suggest-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.suggest-row-name {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-row-meta {
  font-size: 11px;
  color: var(--text-dim, #9a9ab0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-row-pick {
  font-size: 18px;
  color: var(--text-dim, #9a9ab0);
  flex: 0 0 auto;
}

.suggest-row-btn {
  flex: 0 0 auto;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent, #00e5a0);
  color: #0b0b12;
}

.suggest-row-btn:disabled { opacity: 0.75; cursor: default; }
.suggest-row-btn.suggest-sent { background: var(--surface2, #1d1d2a); color: var(--accent, #00e5a0); border: 1px solid var(--accent, #00e5a0); }

.suggest-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggest-confirm-btn { padding: 11px 12px; font-size: 13px; }

.suggest-back-btn {
  border: none;
  background: none;
  color: var(--text-dim, #9a9ab0);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  padding: 2px 0;
}

.suggest-empty {
  font-size: 12px;
  color: var(--text-dim, #9a9ab0);
  padding: 10px 2px;
}

.suggest-error {
  font-size: 12px;
  color: #e53e3e;
  background: rgba(229, 62, 62, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
}

/* ── Entry-point link buttons (play-mode popover, invite modal) ───────── */

.suggest-link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: none;
  background: none;
  color: var(--text-dim, #9a9ab0);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 6px 0 2px;
}

.suggest-link-btn:hover { color: var(--accent, #00e5a0); text-decoration: underline; }
.suggest-link-btn.hidden { display: none; }

/* The library app has no global .hidden utility — cover the flag-gated
   Suggest button on the game detail page. */
.lib-game-hero-actions .lib-btn.hidden { display: none; }
