/* ============================================================
   HEAD LIGHTING REFERENCE TOOL
   Integrates with impheim.css (loaded first).
   ============================================================ */

/* Override body from tool-page.css — this tool is full-viewport, not flex-column */
body {
  padding: 0;
  display: block;
  overflow: hidden;       /* lock scroll while in tool; SEO section below is scroll-accessed */
  height: 100vh;
}

/* Kill the ambient glow from tool-page.css — this tool has its own atmosphere */
body::after { display: none; }

/* ---- Full-height app container below nav ---- */
#app {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

/* ---- Canvas viewport ---- */
#vp {
  flex: 1;
  position: relative;
  min-width: 0;
}
#vp canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ---- Status badge ---- */
#status {
  position: absolute;
  top: 10px;
  left: 12px;
  background: rgba(0,0,0,.75);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  color: #aac4ff;
  pointer-events: none;
  transition: opacity 1.2s;
}
#status.fade { opacity: 0; }

/* ---- Side panel ---- */
#panel {
  width: 238px;
  flex-shrink: 0;
  background: #12131f;
  border-left: 1px solid #252540;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #d0d4ec;
  font-family: system-ui, -apple-system, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #2a2a48 transparent;
}
#panel::-webkit-scrollbar { width: 4px; }
#panel::-webkit-scrollbar-thumb { background: #2a2a48; border-radius: 2px; }

/* ---- Panel sections ---- */
.ph {
  padding: 13px 15px 10px;
  border-bottom: 1px solid #252540;
}
.ph h1 {
  font-size: 13px;
  font-weight: 600;
  color: #c8d8ff;
  letter-spacing: .3px;
  /* override impheim.css heading styles */
  font-family: system-ui, -apple-system, sans-serif;
  background: none;
  -webkit-text-fill-color: #c8d8ff;
  line-height: 1.2;
}
.ph p {
  font-size: 10px;
  color: #6070a0;
  margin-top: 3px;
  line-height: 1.5;
  margin-bottom: 0;
}
.sec {
  padding: 9px 15px 11px;
  border-bottom: 1px solid #1e1e34;
}
.sl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #5868a8;
  margin-bottom: 8px;
}
.ct { margin-bottom: 7px; }
.ct:last-child { margin-bottom: 0; }
.cr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.cn { font-size: 11px; color: #8890c0; }
.cv {
  font-size: 11px;
  color: #c8d4ff;
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- Panel controls ---- */
#panel input[type=range] {
  width: 100%;
  height: 3px;
  cursor: pointer;
  accent-color: #5577ee;
  display: block;
}
#panel input[type=color] {
  width: 100%;
  height: 27px;
  border: 1px solid #303050;
  border-radius: 5px;
  cursor: pointer;
  padding: 2px 3px;
  background: #1a1a30;
}
.br { display: flex; gap: 5px; flex-wrap: wrap; }
#panel button {
  flex: 1;
  min-width: 0;
  padding: 5px 4px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  background: #181828;
  border: 1px solid #2e2e50;
  color: #8890b8;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: system-ui, -apple-system, sans-serif;
}
#panel button:hover { background: #1e1e38; color: #c0ccee; }
#panel button.on { background: #1c2860; border-color: #4060cc; color: #aac4ff; }

#modelSelect {
  width: 100%;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid #2e2e50;
  background: #181828;
  color: #c0ccee;
  font-size: 11px;
  cursor: pointer;
  appearance: auto;
  font-family: system-ui, -apple-system, sans-serif;
}
#modelSelect option { background: #181828; color: #c0ccee; }

/* ---- Custom model upload ---- */
.upload-area {
  border: 1px dashed #2a2a4a;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.upload-area:hover,
.upload-area.drag { border-color: #4455aa; background: #0e0e22; }
.upload-area p { font-size: 10px; color: #5060a0; line-height: 1.6; margin: 0; }
.upload-area strong { color: #7888bb; font-size: 11px; }
#fileInput { display: none; }

/* ---- Attribution overlay ---- */
#attribOverlay {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(8,8,18,.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(80,90,160,.25);
  border-radius: 8px;
  padding: 10px 13px;
  max-width: 280px;
  pointer-events: auto;
}
.attrib-row { font-size: 10px; color: #7888b0; line-height: 1.85; font-family: system-ui, -apple-system, sans-serif; }
.attrib-row b { color: #99aacc; }
.attrib-row a { color: #8090bb; text-decoration: none; }
.attrib-row a:hover { color: #b0c0e0; }
.badge {
  display: inline-block;
  margin-top: 5px;
  font-size: 9px;
  background: rgba(20,22,48,.9);
  border: 1px solid rgba(80,90,160,.3);
  border-radius: 4px;
  padding: 2px 7px;
  color: #5a6a98;
  letter-spacing: .5px;
  font-family: system-ui, -apple-system, sans-serif;
}
.sf-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 9px;
  color: #4a5880;
  text-decoration: none;
  border-bottom: 1px solid #2a3060;
  font-family: system-ui, -apple-system, sans-serif;
}
.sf-link:hover { color: #8898cc; }

/* ---- SEO / info section below the tool ---- */
.hlr-seo {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 4rem;
}
.hlr-seo-inner {
  max-width: 820px;
  margin: 0 auto;
}
.hlr-seo h2 {
  font-size: 1.1rem;
  color: var(--text2);
  margin-bottom: 1rem;
  font-family: var(--font-b);
  background: none;
  -webkit-text-fill-color: unset;
}
.hlr-seo p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: .85rem;
}
.hlr-seo a { color: var(--gold); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  #app { flex-direction: column; }
  #panel {
    width: 100%;
    max-height: 42vh;
    border-left: none;
    border-top: 1px solid #252540;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .ph { flex-shrink: 0; width: 100%; }
  .sec { min-width: 160px; flex-shrink: 0; border-bottom: none; border-right: 1px solid #1e1e34; }
  #vp { flex: 1 1 auto; min-height: 0; }
}
