/* =====================================================================
   Changelog Generator — app.css
   Extends the shared design system (base.css).
   ===================================================================== */

[data-theme="light"] .icon-sun { display: none; }
.icon-moon { display: none; }

.pane-title { margin: 0 0 var(--space-4); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary); }
.pane-meta { font-size: 12px; }

.toolbar-panel { padding: var(--space-4) var(--space-5); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.toolbar .spacer { flex: 1; }
#projectName { font-weight: 700; }

#statusBadge .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }

.hint-panel { padding: var(--space-4) var(--space-5); }
.hint-panel a { color: var(--brand-400); }

/* ===================== Layout ===================== */
.layout { display: grid; grid-template-columns: 1fr 460px; gap: var(--space-6); align-items: start; margin-top: var(--space-2); }
.preview-wrap { position: sticky; top: calc(64px + var(--space-4)); min-width: 0; }
.preview-panel { padding: var(--space-5); }

.output-scroll { position: relative; max-height: calc(100vh - 220px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-solid); }
.output-code { margin: 0; padding: var(--space-4); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--text-secondary); }

/* ===================== Versions list ===================== */
.versions-list { display: flex; flex-direction: column; gap: var(--space-5); }
.version-card { padding: var(--space-5); }
.version-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.unreleased-check { gap: var(--space-2); font-size: 13px; flex: none; }
.version-number-field { width: 140px; }
.version-number-field input { font-weight: 700; font-family: var(--font-mono); }
.version-date-field { width: 160px; }
.version-head .spacer { flex: 1; min-width: 8px; }

.categories-list { display: flex; flex-direction: column; gap: var(--space-4); }
.category-block { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); background: var(--surface); }
.category-head { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-3); }
.category-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.category-name { font-weight: 700; font-size: 13.5px; }
.category-head .badge { margin-left: auto; }

.items-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-3); }
.item-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.item-text { flex: 1; font-size: 13.5px; word-break: break-word; }
.item-row-actions { display: flex; gap: 4px; flex: none; }
.item-row-actions .btn { width: 28px; height: 28px; }
.item-row.is-editing .item-text { display: none; }
.item-edit-input { flex: 1; }

.item-add-row { display: flex; gap: 8px; }
.item-add-row input { flex: 1; }

/* Category accent colors */
.cat-added .category-dot { background: var(--success); }
.cat-changed .category-dot { background: var(--info); }
.cat-deprecated .category-dot { background: var(--warning); }
.cat-removed .category-dot { background: var(--danger); }
.cat-fixed .category-dot { background: var(--brand-500); }
.cat-security .category-dot { background: var(--accent-pink); }

/* ===================== Responsive ===================== */
@media (max-width: 1040px) {
  .layout { grid-template-columns: 1fr; }
  .preview-wrap { position: static; }
  .output-scroll { max-height: 480px; }
}
@media (max-width: 720px) {
  #statusBadge { display: none; }
  .toolbar .spacer { display: none; }
  .toolbar-group { width: 100%; }
  .toolbar-group .btn { flex: 1; }
  .version-number-field, .version-date-field { width: 100%; }
  .version-head { flex-direction: column; align-items: stretch; }
  .version-head .spacer { display: none; }
}
@media (max-width: 460px) {
  .item-row-actions { gap: 2px; }
  .item-row-actions .btn { width: 26px; height: 26px; }
}
