/* ==========================================================================
   Site Changelog — Frontend Styles
   ========================================================================== */

/* Wrapper */
.changelog {
  font-family: inherit;
  max-width: 860px;
}

/* Month group heading */
.cl-month-group {
  margin: 32px 0 12px;
}

.cl-month-heading {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
}

/* Entry card */
.changelog-entry {
  margin: 0 0 16px;
  padding: 16px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

/* Top row: date · env · badges */
.cl-entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.cl-entry-date {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 500;
  margin-right: 4px;
}

.cl-entry-env {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-right: 6px;
}

/* Badges */
.cl-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.6;
}

/* Entry title */
.cl-entry-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

/* Area + changed-by line */
.cl-entry-byline {
  font-size: 0.8125rem;
  color: #374151;
  margin-bottom: 10px;
}

/* Description */
.cl-entry-description {
  margin-bottom: 12px;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Section label (Version notes, URLs affected) */
.cl-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

/* Version notes */
.cl-versions-wrap {
  margin-bottom: 12px;
}

.cl-versions-pre {
  margin: 0;
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  color: #111;
}

/* URLs affected */
.cl-urls-wrap {
  margin-bottom: 12px;
}

.cl-urls-list {
  margin: 0;
  padding-left: 18px;
}

.cl-urls-list li {
  font-size: 0.8125rem;
  margin-bottom: 2px;
}

.cl-urls-list li.cl-url-path {
  font-family: 'SFMono-Regular', Consolas, monospace;
  color: #374151;
}

/* Rollback toggle */
.cl-rollback-wrap {
  margin-top: 4px;
}

.cl-rollback-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  color: #6b7280;
  cursor: pointer;
  text-decoration: underline;
}

.cl-rollback-panel {
  display: none;
  margin-top: 8px;
  padding: 10px 14px;
  background: #fef9c3;
  border-left: 3px solid #ca8a04;
  border-radius: 0 6px 6px 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #374151;
}

/* ==========================================================================
   Site Changelog — Admin Metabox Styles
   ========================================================================== */

.cl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cl-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.cl-field input[type="text"],
.cl-field input[type="date"],
.cl-field select,
.cl-field textarea {
  width: 100%;
}

.cl-field textarea {
  min-height: 80px;
}

.cl-wide {
  grid-column: 1 / -1;
}

.cl-help {
  color: #666;
  font-size: 0.75rem;
  margin-top: 4px;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.cl-filters {
  margin-bottom: 28px;
  padding: 16px 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.cl-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.cl-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
  flex: 1 1 130px;
}

.cl-filter-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cl-filter-field input[type="date"],
.cl-filter-field input[type="text"],
.cl-filter-field select {
  padding: 6px 10px;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111;
  width: 100%;
}

.cl-filter-field input[type="date"]:focus,
.cl-filter-field input[type="text"]:focus,
.cl-filter-field select:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: #2563eb;
}

.cl-filters-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.cl-btn-filter {
  padding: 7px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.cl-btn-filter:hover {
  background: #1d4ed8;
}

.cl-btn-filter:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.cl-btn-reset {
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: underline;
}

.cl-btn-reset:hover {
  color: #111;
}

/* Active filter summary */
.cl-filter-summary {
  font-size: 0.8125rem;
  color: #374151;
  margin: 0 0 20px;
  padding: 8px 14px;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  border-radius: 0 6px 6px 0;
}

/* No results */
.cl-no-results {
  font-size: 0.875rem;
  color: #6b7280;
  padding: 24px;
  text-align: center;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
}
