/* ============================================================================
   OFFIQA — Template page stylesheet
   Loads AFTER offiqa-design-v2.css via extra_css.
   Used by: /templates/* pages
   ============================================================================ */

/* Template page layout: preview left, details right */
.template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-6);
  align-items: start;
}

/* Template preview card — large, prominent */
.template-preview {
  position: sticky;
  top: 90px;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.template-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}
.template-preview-header h2 {
  font-size: 1.1rem;
  margin: 0;
}
.template-type-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ochre-700);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--ochre-tint);
  border: 1px solid var(--ochre-soft);
  flex-shrink: 0;
}

/* The copyable template content area */
.template-content-area {
  padding: var(--space-4);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-2);
  min-height: 180px;
}
.template-content-area h3, .template-content-area h4 {
  font-size: 0.95rem;
  color: var(--green-700);
  margin: var(--space-3) 0 0.3rem;
}
.template-content-area h3:first-child, .template-content-area h4:first-child {
  margin-top: 0;
}
.template-content-area ul, .template-content-area ol {
  margin: 0 0 var(--space-3);
}
.template-content-area p:last-child, .template-content-area ul:last-child { margin-bottom: 0; }

/* Copy all button bar */
.template-copy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
}
.template-copy-bar .format-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
}

/* Template details column */
.template-details { display: grid; gap: var(--space-5); }

/* Filled example block */
.template-example {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.template-example-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-3);
  display: block;
}
.filled-example {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-2);
}
.filled-example strong { color: var(--green-700); }

/* Use case scenario chips */
.use-case-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* When to use section */
.template-when {
  display: grid;
  gap: var(--space-3);
}
.when-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.93rem;
  color: var(--ink-2);
}
.when-item::before {
  content: "→";
  color: var(--green-400);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

@media (max-width: 1000px) {
  .template-layout { grid-template-columns: 1fr; }
  .template-preview { position: static; }
}
