/* pokedrill quiz widget — minimal, mobile-first */

.pdq {
  --pdq-bg: #fff;
  --pdq-fg: #1a1a2e;
  --pdq-muted: #6b7280;
  --pdq-border: #e5e7eb;
  --pdq-accent: #2563eb;
  --pdq-correct: #16a34a;
  --pdq-close: #d97706;
  --pdq-wrong: #dc2626;
  --pdq-radius: 12px;

  max-width: 560px;
  margin: 1rem auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pdq-fg);
  background: var(--pdq-bg);
  border: 1px solid var(--pdq-border);
  border-radius: var(--pdq-radius);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.pdq-stage { min-height: 280px; display: flex; flex-direction: column; align-items: stretch; }

.pdq-prompt {
  font-size: 1.1rem; font-weight: 600; text-align: center; margin: 0 0 .75rem;
  color: var(--pdq-muted);
}

.pdq-media {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; margin-bottom: 1rem;
}

.pdq-img {
  width: 180px; height: 180px; object-fit: contain;
  image-rendering: pixelated; /* sharper sprites */
}
@media (min-width: 480px) {
  .pdq-img { width: 220px; height: 220px; }
}

.pdq-silhouette {
  filter: brightness(0) saturate(0);
  transition: filter .35s ease;
}
.pdq-silhouette-revealed { filter: none; }

.pdq-cry-btn {
  font: inherit; font-size: 1rem; padding: .7rem 1.4rem;
  background: var(--pdq-accent); color: #fff;
  border: 0; border-radius: 8px; cursor: pointer;
}
.pdq-cry-btn:hover { opacity: .9; }

.pdq-flavor {
  font-style: italic; padding: 1rem 1.25rem; margin: 0;
  background: #f9fafb; border-left: 3px solid var(--pdq-accent);
  border-radius: 6px; line-height: 1.5;
}

.pdq-redact {
  display: inline-block; background: var(--pdq-fg); color: var(--pdq-fg);
  padding: 0 .3em; border-radius: 3px; user-select: none;
}

.pdq-input-row {
  display: flex; gap: .5rem; align-items: stretch;
}
.pdq-input {
  flex: 1; font: inherit; font-size: 1.05rem;
  padding: .6rem .85rem;
  border: 1px solid var(--pdq-border); border-radius: 8px;
  outline: none;
}
.pdq-input:focus { border-color: var(--pdq-accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

.pdq-submit, .pdq-skip {
  font: inherit; cursor: pointer;
  padding: .6rem 1rem; border-radius: 8px; border: 0;
}
.pdq-submit { background: var(--pdq-accent); color: #fff; }
.pdq-submit:hover { opacity: .9; }
.pdq-skip { background: #f3f4f6; color: var(--pdq-muted); }
.pdq-skip:hover { background: #e5e7eb; }

.pdq-feedback {
  min-height: 1.6em; margin-top: .75rem;
  font-size: .95rem; line-height: 1.4;
  text-align: center;
}
.pdq-feedback b { font-weight: 700; }
.pdq-fb-icon { display: inline-block; font-weight: 700; margin-right: .3em; }
.pdq-fb-correct { color: var(--pdq-correct); }
.pdq-fb-close   { color: var(--pdq-close); }
.pdq-fb-wrong   { color: var(--pdq-wrong); }

.pdq-reveal { display: block; margin: .5rem auto 0; width: 100px; height: 100px; object-fit: contain; }

.pdq-scorebar {
  display: flex; gap: 1.5rem; justify-content: center;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px dashed var(--pdq-border);
  font-size: .95rem; color: var(--pdq-muted);
}
.pdq-score-correct b { color: var(--pdq-correct); }
.pdq-score-wrong   b { color: var(--pdq-wrong); }
.pdq-score-asked   b { color: var(--pdq-fg); }

.pdq-finish {
  text-align: center; padding: 2rem 1rem;
}
.pdq-finish h3 { margin: 0 0 .75rem; font-size: 1.3rem; }
.pdq-finish-score { font-size: 2rem; font-weight: 700; margin: 0 0 1.5rem; }
.pdq-finish-score span { font-size: 1.2rem; color: var(--pdq-muted); font-weight: 400; }

/* Options panel (in-widget mode/gen/pack switching, SEO-safe) */
.pdq-options {
  margin-top: 1rem; padding-top: .75rem;
  border-top: 1px dashed var(--pdq-border);
}
.pdq-options summary {
  cursor: pointer; user-select: none;
  font-size: .9rem; color: var(--pdq-muted);
  padding: .25rem 0;
  list-style: none;
}
.pdq-options summary::-webkit-details-marker { display: none; }
.pdq-options summary::before { content: "▾  "; font-weight: 600; }
.pdq-options[open] summary::before { content: "▴  "; }
.pdq-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .65rem;
  margin: .85rem 0 .5rem;
}
.pdq-options label {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .8rem; color: var(--pdq-muted);
}
.pdq-options select {
  font: inherit; font-size: .9rem;
  padding: .4rem .55rem;
  border: 1px solid var(--pdq-border); border-radius: 6px;
  background: #fff;
}
.pdq-apply {
  margin-top: .25rem;
  width: 100%;
}
.pdq-options-note {
  margin: .6rem 0 0;
  font-size: .8rem; color: var(--pdq-muted);
  text-align: center;
}
