/* ToyTally UI hotfixes — readable cards, neutral surfaces */

/* Self-hosted Comic Neue fonts */
@font-face {
  font-family: 'Comic Neue';
  src: url('/fonts/comicneue-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Comic Neue';
  src: url('/fonts/comicneue-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Design tokens */
:root{
  --tt-bg: #f8fafc;        /* slate-50 */
  --tt-surface: #ffffff;   /* white */
  --tt-border: #e2e8f0;    /* slate-200 */
  --tt-text: #0f172a;      /* slate-900 */
  --tt-muted: #475569;     /* slate-600 */
  --tt-accent: #0ea5e9;    /* sky-500 */
  --tt-success: #059669;   /* emerald-600 */
}

/* Container background stays neutral even if page uses gradients */
.tt-toy-grid{
  background: transparent;
}

/* Pro Upsell Banner */
.tt-upsell-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tt-upsell-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.tt-upsell-content p {
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.tt-upsell-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tt-upsell-actions .tt-btn {
  border: 1px solid rgba(255,255,255,0.2);
}

/* Card: neutral surface + clear border + proper text colors */
.tt-toy-card{
  background: var(--tt-surface);
  color: var(--tt-text);
  border: 1px solid var(--tt-border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}

/* Titles and meta */
.tt-toy-card h3{
  margin: 0 0 2px 0;
  font-weight: 600;
  color: var(--tt-text);
}
.tt-toy-card .tt-meta{
  color: var(--tt-muted);
  font-size: .9rem;
}

/* Data grid inside the card */
.tt-toy-card dl{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px 12px;
  margin: 10px 0 0 0;
  font-size: .9rem;
  color: var(--tt-text);
}
.tt-toy-card dt{
  color: var(--tt-muted);
  font-weight: 500;
}
.tt-toy-card dd{ margin: 0; }

/* Buttons */
.tt-btn{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 16px; border: 1px solid var(--tt-border);
  background: #fff; color: var(--tt-text); text-decoration: none;
}
.tt-btn:hover{ box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.tt-btn.tt-primary{
  background: var(--tt-accent);
  border-color: var(--tt-accent);
  color: #fff;
}

/* Kill accidental blends/inverted themes for this area */
.tt-toy-grid, .tt-toy-grid *{
  mix-blend-mode: normal;
  -webkit-text-fill-color: initial;
}

/* Kill-switch: Force readable cards if global styles override */
.tt-toy-card{ background: #fff !important; color: #0f172a !important; }
.tt-toy-card .tt-meta{ color: #475569 !important; }

/* Respect dark mode body, but cards stay readable */
@media (prefers-color-scheme: dark){
  .tt-toy-card{
    background: #0b1220 !important;  /* near-surface dark */
    border-color: #1f2937;          /* slate-800 */
    color: #e5e7eb !important;       /* slate-200 */
  }
  .tt-toy-card .tt-meta{ color: #94a3b8 !important; }
  .tt-btn{ background: #0b1220; color: #e5e7eb; border-color: #1f2937; }
  .tt-btn.tt-primary{ background: var(--tt-accent); border-color: var(--tt-accent); color: #001018; }
}