/* ──────────────────────────────────────────────────────────────────────────
 * extras.css — Append-only stylesheet for new shared UI components.
 * Reuses every variable/class from style.css — no overrides, no conflicts.
 * ──────────────────────────────────────────────────────────────────────── */

/* Privacy badge that sits under H1 on every tool page */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.privacy-badge::before {
  content: '🔒';
  font-size: 0.85em;
}

/* Sections injected by site-extras.js */
.extras-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.extras-section + .extras-section {
  margin-top: 32px;
  padding-top: 28px;
}
.extras-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.mini-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.mini-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.mini-tile:hover {
  border-color: var(--primary-tint);
  transform: translateY(-1px);
  text-decoration: none;
}
.mini-tile-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Filename + quality row (reusable by every tool) */
.output-options {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.output-options label {
  font-weight: 600;
  font-size: 0.88rem;
  display: block;
  margin-bottom: 4px;
}
.output-options input[type='text'],
.output-options input[type='number'],
.output-options select {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

/* Preview area (image/PDF previews) */
.preview-wrap {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  text-align: center;
}
.preview-wrap img, .preview-wrap canvas {
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: block;
  margin: 0 auto;
}
.preview-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Before/after size compare strip */
.size-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.size-compare .pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}
.size-compare .pill .lbl { color: var(--text-muted); margin-right: 6px; font-weight: 500; }
.size-compare .arrow { color: var(--text-muted); }
.size-compare .saved {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

/* Hint line under headings */
.hint-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* Drag-handle list for reorder PDF */
.reorder-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.reorder-item {
  display: grid;
  grid-template-columns: auto 80px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
}
.reorder-item.dragging { opacity: 0.4; }
.reorder-item .handle { color: var(--text-muted); font-size: 1.2rem; cursor: grab; user-select: none; }
.reorder-item .thumb {
  width: 60px;
  height: 80px;
  background: var(--surface-2);
  border-radius: 4px;
  object-fit: cover;
}
.reorder-item .label { font-weight: 600; font-size: 0.9rem; }
.reorder-item button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 4px 8px;
}
.reorder-item button:hover { color: var(--danger); }

/* ── Standardised error / success messages (V2 spec) ─────────────── */
.error-message,
.success-message {
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
}
.error-message {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.success-message {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.error-message::before { content: '⚠ '; font-weight: 700; }
.success-message::before { content: '✓ '; font-weight: 700; }

/* ── "Next step" engagement loop (V11 PART 5) ──────────────────── */
.next-step {
  margin-top: 18px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.next-step strong {
  color: var(--text);
  margin-right: 6px;
}
.next-step a {
  color: var(--primary);
  text-decoration: none;
}
.next-step a:hover { text-decoration: underline; }
