/* Builds overview page (/builds). BESPOKE page, but its CHROME is reused VERBATIM from
 * the bloodngold.com damage calculator (bb-wiki webapp/templates/base.html +
 * webapp/static/style.css) so /builds matches the main site (user request 2026-07-11):
 * the same .container / h1 / .page-subtitle (Overhype disclaimer) / .site-footer, and the
 * same palette. Every value below is copied from bb-wiki style.css, cited by its selector.
 * bb-wiki is a separate app; we copy the values here rather than <link> its stylesheet
 * (that would be a forbidden cross-workspace runtime dependency). */

* { box-sizing: border-box; margin: 0; padding: 0; }   /* bb-wiki style.css * */

body {
  /* bb-wiki style.css body */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  line-height: 1.5;
  font-size: 0.9rem;
  min-height: 100vh;
}

.container {
  /* bb-wiki style.css .container */
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  /* bb-wiki style.css h1 */
  color: #c9a227;
  margin-bottom: 0.1rem;
  font-size: 1.8rem;
}

.page-subtitle {
  /* bb-wiki style.css .page-subtitle */
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
}

.site-footer {
  /* bb-wiki style.css .site-footer */
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 0.8rem;
  color: #666;
}
.site-footer a { color: #666; text-decoration: none; }   /* bb-wiki style.css .site-footer a */
.site-footer a:hover { color: #c9a227; }                 /* bb-wiki style.css .site-footer a:hover */

/* ---- page-specific bits (bespoke layout, palette from bb-wiki style.css) ---- */

.builds-intro { color: #e0e0e0; margin-bottom: 1.5rem; max-width: 46rem; }

.builds-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.builds-button {
  /* bb-wiki style.css button (an <a> here, so display:inline-block) */
  display: inline-block;
  padding: 8px 24px;
  background: #c9a227;
  color: #1a1a2e;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}
.builds-button:hover { background: #dbb634; }   /* bb-wiki style.css button:hover */

/* Third action: a plain gold text link (not a button) that opens the "feature your
   builds" dialog, sitting to the right of the two buttons. */
.builds-feature-link {
  align-self: center;
  color: #c9a227;                   /* bb-wiki style.css h1 / accent */
  text-decoration: underline;
  font-size: 0.9rem;
}
.builds-feature-link:hover { color: #dbb634; }   /* bb-wiki style.css button:hover */

/* "Feature your builds" modal - centered box over a dim backdrop. */
.builds-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.builds-modal[hidden] { display: none; }   /* override display:flex when hidden */

.builds-modal-box {
  background: #16213e;              /* bb-wiki style.css .panel */
  border: 1px solid #333;           /* bb-wiki style.css .panel */
  border-radius: 8px;               /* bb-wiki style.css .panel */
  padding: 1.5rem;
  max-width: 30rem;
}
.builds-modal-title {
  color: #c9a227;                   /* bb-wiki style.css h2 */
  font-size: 1.3rem;                /* bb-wiki style.css h2 */
  margin-bottom: 0.8rem;
}
.builds-modal-box p { margin-bottom: 1.2rem; }
.builds-modal-box strong { color: #c9a227; }   /* bb-wiki style.css accent */
.builds-modal-actions { display: flex; align-items: center; gap: 1rem; }
.builds-modal-close { color: #888; text-decoration: none; font-size: 0.9rem; }
.builds-modal-close:hover { color: #c9a227; }

.builds-list { display: flex; flex-direction: column; gap: 0.8rem; }

.builds-item {
  /* card modelled on bb-wiki style.css .index-section / .panel */
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #16213e;             /* bb-wiki style.css .panel / .index-section */
  border: 1px solid #333;          /* bb-wiki style.css .panel */
  border-radius: 8px;              /* bb-wiki style.css .panel */
  padding: 1rem 1.2rem;            /* bb-wiki style.css .index-section */
  text-decoration: none;
  color: #e0e0e0;
}
.builds-item:hover { border-color: #c9a227; }

.builds-item-thumb {
  width: 200px;
  aspect-ratio: 1200 / 630;         /* the og card ratio (og_image.py _W x _H) */
  object-fit: cover;
  border-radius: 4px;
  background: #14110d;              /* og_image.py _BG backing, shows while loading */
  flex-shrink: 0;
}

.builds-item-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }

.builds-item-title {
  color: #c9a227;                   /* bb-wiki style.css h1 / accent */
  font-size: 1.2rem;
  font-weight: bold;
}

.builds-item-meta { color: #888; font-size: 0.8rem; }   /* bb-wiki style.css .results-subtitle */

.builds-empty {
  text-align: center;
  color: #888;
  padding: 3rem 1rem;
  border: 1px dashed #333;          /* bb-wiki style.css .panel border */
  border-radius: 8px;
}

@media (max-width: 520px) {
  .builds-item-thumb { width: 120px; }
}
