/* ============================================================
   TOOL PAGE TEMPLATE  —  /assets/css/tool-page.css
   Shared styles for all Impheim generator / tool pages.

   Load order:  impheim.css  →  tool-page.css  →  <tool>.css

   To create a new tool page:
     1. Copy one of the existing tool HTML files as a starting point.
     2. Add your tool-specific CSS in a new tool CSS file.
     3. Override body::after colours for a different ambient mood.
     4. Override .controls-bar children for custom control widgets.
   ============================================================ */

/* ---- Page layout ---- */
body {
  padding: 0 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Site nav must stretch full-width inside the centred flex body */
.site-nav { width: 100%; align-self: stretch; }

/* ---- Atmospheric background glows ----
   Default: arcane purple/amber palette.
   Override body::after in your tool CSS to change the mood. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 130% 55% at 50% -8%,  rgba(120, 80, 220, 0.22) 0%,  transparent 60%),
    radial-gradient(ellipse 55%  45% at  4% 95%,  rgba(210, 120, 30,  0.12) 0%,  transparent 55%),
    radial-gradient(ellipse 45%  40% at 96% 88%,  rgba(40,  90, 210,  0.10) 0%,  transparent 55%),
    radial-gradient(ellipse 70%  35% at 50% 110%, rgba(200, 60,  60,  0.06) 0%,  transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: breathe 14s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.65; }
  50%       { opacity: 1.00; }
}

/* ---- Page header ---- */
.page-header {
  width: 100%;
  max-width: 1500px;
  text-align: center;
  padding: 44px 20px 0;
}

h1 {
  font-family: var(--font-d);
  font-size: 2.7em;
  font-weight: 800;
  letter-spacing: 5px;
  background: linear-gradient(140deg, #ffd060 0%, #f0a820 35%, #ffe080 65%, #d88818 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 10px;
}

.subtitle {
  font-family: 'Palatino Linotype', Georgia, serif;
  font-size: 1em;
  font-style: italic;
  /* Gold-tinted muted white — matches the site's warm palette */
  color: rgba(240, 210, 160, 0.42);
  letter-spacing: 1.5px;
}

.header-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(240,192,64,.20) 15%,
    rgba(240,192,64,.55) 50%,
    rgba(240,192,64,.20) 85%,
    transparent 100%);
  margin: 22px auto 0;
  max-width: 700px;
  position: relative;
}
.header-divider::before {
  content: '◆';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7em;
  color: rgba(240,192,64,.6);
  background: var(--bg);
  padding: 0 8px;
  line-height: 0;
}

/* ---- Controls bar ---- */
.controls-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r-md); padding: .85rem 1.25rem;
  margin-bottom: 2rem;
  width: 100%;
  align-self: stretch;
}
.controls-left  { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.controls-right { display: flex; align-items: center; gap: .65rem; }
.ctrl-label {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.ctrl-select {
  background: var(--bg4); border: 1px solid var(--border2); color: var(--text);
  padding: .3rem .6rem; border-radius: 6px; font-size: .88rem; cursor: pointer;
}
.ctrl-select:focus { outline: none; border-color: var(--border3); }

/* ---- Spacer for a second ctrl-label in the same controls-left row ---- */
.ctrl-label-sep { margin-left: 1.2rem; }

/* ---- Count picker (optional — for tools with a number input) ---- */
.count-btns { display: flex; align-items: center; }
.count-btn {
  background: var(--bg4); border: 1px solid var(--border2); color: var(--text);
  width: 28px; height: 28px; cursor: pointer; font-size: 1.1rem; line-height: 1;
  border-radius: 6px; transition: background .15s;
}
.count-btn:hover { background: var(--bg3); }
.count-val {
  min-width: 28px; text-align: center; font-size: .95rem; font-weight: 600;
  color: var(--text); padding: 0 .35rem;
}

/* ---- Footer spacing ---- */
.site-footer { margin-top: 4rem; }

/* ---- SEO description section (below generated content) ---- */
.tool-desc-section {
  width: 100%;
  max-width: 820px;
  margin: 3rem auto 0;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
}
.tool-desc-section h2 {
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text2);
  background: none;
  -webkit-text-fill-color: unset;
  letter-spacing: .04em;
  margin-bottom: 1rem;
}
.tool-desc-section p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: .9rem;
}
.tool-desc-section a { color: var(--accent); }
@media print { .tool-desc-section { display: none !important; } }

/* ---- Support note (Ko-fi / Tipeee callout inside tool-desc-section) ---- */
.tool-support-note {
  margin-top: 1.4rem;
  padding: .85rem 1.1rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-dim);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: .875rem !important;
  color: var(--text2) !important;
  line-height: 1.7 !important;
  margin-bottom: 0 !important;
}
.tool-support-note a { color: var(--gold) !important; font-weight: 600; }
.tool-support-note a:hover { color: var(--text) !important; }

/* ---- Base print styles ----
   Each tool CSS adds its own grid / colour overrides on top. */
@media print {
  * { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
  body {
    background: #0c0a10 !important;
    display: block !important;
    padding: 0 !important;
    width: 100% !important;
  }
  body::after { display: none !important; }
  .site-nav, #site-footer, footer, .controls-bar, .page-header { display: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  body { padding: 0 10px 60px; }
  h1   { font-size: 1.7em; letter-spacing: 2px; }
  .controls-bar  { flex-direction: column; align-items: flex-start; }
  .controls-right { width: 100%; justify-content: flex-end; }
}
