/* === TTB — BGG Info Grabber (Steam/Etsy/eBay style) === */
.ttb-bgg-container {
  --bg: #0b1020;
  --card: #101a2f;
  --muted: #9aa8b4;
  --text: #e6eef5;
  --border: #1f2a44;
  --accent: #66C0F4;   /* Steam-ish blue */
  --accent-2: #F1641E; /* Etsy orange (used subtly) */
  --ring: rgba(102,192,244,0.35);

  color: var(--text);
  background: var(--bg);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 8px 30px rgba(0,0,0,0.35);
  max-width: 900px;
  margin: 0 auto;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Header */
.ttb-bgg-container h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .2px;
}
.ttb-bgg-container p,
.ttb-bgg-container small {
  color: var(--muted);
}

/* Input row */
#ttb-bgg-input {
  width: 100%;
  max-width: 640px;
  background: #0f1730;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  margin: 8px 10px 8px 0;
}
#ttb-bgg-input::placeholder { color: #93a1b4; opacity: .8; }
#ttb-bgg-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Primary / ghost button patterns (matches our other tools) */
#ttb-bgg-fetch {
  background: var(--accent);
  color: #07121f;
  border: none;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .12s ease, transform .04s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 6px 18px rgba(102,192,244,0.25);
}
#ttb-bgg-fetch:hover { filter: brightness(1.06); }
#ttb-bgg-fetch:active { transform: translateY(1px); }
#ttb-bgg-fetch:disabled {
  opacity: .6; cursor: not-allowed; box-shadow: none;
}

/* Results card */
#ttb-bgg-results {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

/* Generic content styling inside results */
#ttb-bgg-results h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}
#ttb-bgg-results p { margin: 6px 0; color: #d6dfeb; }
#ttb-bgg-results a { color: var(--accent); text-decoration: none; }
#ttb-bgg-results a:hover { text-decoration: underline; }

/* Image presentation */
.ttb-bgg-container img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b1222;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  margin: 12px 0;
}

/* “Key/value” rows if you output them (p + strong) */
#ttb-bgg-results p strong {
  color: #f3f7ff;
  font-weight: 800;
}

/* Utility badges (if you add spans in JS later) */
.ttb-badge {
  display: inline-block;
  background: #0c2034;
  color: #cfeaff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  margin-right: 6px;
}

/* Subtle separators (optional) */
.hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  margin: 12px 0;
}

/* Responsive tweaks */
@media (max-width: 720px) {
  #ttb-bgg-input { max-width: 100%; margin-right: 0; }
  .ttb-bgg-container { padding: 16px; }
}

/* Print view: clean sheet */
@media print {
  .ttb-bgg-container {
    background: #fff; color: #000; box-shadow: none; border-radius: 0;
  }
  #ttb-bgg-input, #ttb-bgg-fetch { display: none !important; }
  #ttb-bgg-results { border: none; box-shadow: none; }
}

/* Input + fetch row */
.ttb-bgg-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.ttb-bgg-row input {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 15px;
    background: #2a2a2a;
    color: #fff;
}
.ttb-bgg-row input:focus {
    outline: none;
    border-color: #66b3ff;
    box-shadow: 0 0 4px #66b3ff;
}

/* Button base */
.ttb-btn { background: var(--accent); color:#0a141f; border:none; padding:10px 14px; border-radius:12px; font-weight:800; cursor:pointer; }
.ttb-btn:hover { filter: brightness(1.05); }
.ttb-btn.ttb-ghost { background:#0b1222; border:1px solid #1f2a44; color:#cfeaff; }

/* Action row (secondary buttons) */
.ttb-bgg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Status text */
.ttb-status {
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 18px;
}
.ttb-status.success {
    color: #4caf50;
}
.ttb-status.error {
    color: #e53935;
}

/* Results area */
#ttb-bgg-results {
    padding: 15px;
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #333;
    color: #eee;
}

/* Responsive */
@media (max-width: 500px) {
    .ttb-bgg-row {
        flex-direction: column;
    }
    .ttb-bgg-actions {
        flex-direction: column;
    }
}