/* Nagios Changelog */
/* Ports the production Elementor template CSS (archive + single) to the plugin markup. */
/* Selectors are scoped to a container class so Elementor kit typography cannot override them. */

/* Tokens */
.ncl-archive,
.ncl-single,
.ncl-filter,
.ncl-breadcrumb,
.ncl-pagination,
.ncl-latest,
.ncl-md-pointer,
.ncl-empty {
  --ncl-accent: #7fabff;
  --ncl-accent-hover: #4d89f9;
  --ncl-accent-soft: #bed3ff;
  --ncl-label: #9fbfff;
  --ncl-text: #d9e6ff;
  --ncl-heading: #ffffff;
  --ncl-text-muted: rgba(255, 255, 255, 0.6);
  --ncl-text-soft: rgba(255, 255, 255, 0.7);
  --ncl-card: rgba(127, 171, 255, 0.04);
  --ncl-card-hover: rgba(127, 171, 255, 0.06);
  --ncl-surface: rgba(127, 171, 255, 0.05);
  --ncl-surface-raised: rgba(127, 171, 255, 0.08);
  --ncl-border-soft: rgba(127, 171, 255, 0.1);
  --ncl-border: rgba(127, 171, 255, 0.15);
  --ncl-border-strong: rgba(127, 171, 255, 0.25);
  --ncl-radius: 0.5rem;
  --ncl-radius-card: 0.75rem;

  --ncl-security: #ef4444;
  --ncl-fixed: #22c55e;
  --ncl-added: #3b82f6;
  --ncl-updated: #a855f7;
  --ncl-improved: #0ea5e9;
  --ncl-deprecated: #fb923c;
  --ncl-removed: #f43f5e;
}

/* Breadcrumb */
.ncl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #eeeeee;
}

.ncl-breadcrumb a.ncl-crumb {
  color: var(--ncl-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.ncl-breadcrumb a.ncl-crumb:hover,
.ncl-breadcrumb a.ncl-crumb:focus-visible {
  color: var(--ncl-accent-hover);
  text-decoration: underline;
}

.ncl-breadcrumb .ncl-crumb__sep {
  margin: 0 4px;
  color: #94a3b8;
}

.ncl-breadcrumb .ncl-crumb--current {
  color: #eeeeee80;
  font-weight: 500;
}

/* Latest release statement (new) */
.ncl-latest {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(127, 171, 255, 0.45);
  border-radius: var(--ncl-radius-card);
  background: var(--ncl-surface-raised);
  color: var(--ncl-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.ncl-latest a {
  color: var(--ncl-accent);
  text-decoration: none;
}

.ncl-latest a:hover {
  color: var(--ncl-accent-hover);
  text-decoration: underline;
}

.ncl-latest strong {
  color: var(--ncl-heading);
}

/* Filter bar (same look as the old .sd-filter-bar) */
.ncl-filter {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--ncl-border);
  border-radius: var(--ncl-radius);
  background: var(--ncl-surface-raised);
  position: relative;
  z-index: 10;
}

.ncl-filter .ncl-filter__label {
  color: var(--ncl-label);
  font-size: 0.85rem;
  white-space: nowrap;
}

.ncl-filter .ncl-filter__search,
.ncl-filter .ncl-filter__sort {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ncl-filter .ncl-filter__search {
  flex: 0 1 300px;
}

.ncl-filter .ncl-filter__input,
.ncl-filter .ncl-filter__select {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--ncl-border-strong);
  border-radius: 0.3rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--ncl-text);
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease;
}

.ncl-filter .ncl-filter__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ncl-filter .ncl-filter__select {
  width: 150px;
  padding-right: 2.5rem;
  appearance: none;
  background-image: url('/wp-content/uploads/2025/09/chevron-down.svg');
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 12px;
  cursor: pointer;
}

.ncl-filter .ncl-filter__select option {
  background: #1a1a2e;
  color: var(--ncl-text);
}

.ncl-filter .ncl-filter__input:hover,
.ncl-filter .ncl-filter__select:hover {
  border-color: rgba(127, 171, 255, 0.4);
}

.ncl-filter .ncl-filter__input:focus,
.ncl-filter .ncl-filter__select:focus {
  outline: none;
  border-color: rgba(127, 171, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
}

.ncl-filter .ncl-filter__submit {
  padding: 0.45rem 1rem;
  border: 1px solid rgba(127, 171, 255, 0.3);
  border-radius: 0.375rem;
  background: rgba(127, 171, 255, 0.15);
  color: #eeeeee;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ncl-filter .ncl-filter__submit:hover {
  border-color: rgba(127, 171, 255, 0.45);
  background: rgba(127, 171, 255, 0.25);
  color: #ffffff;
}

.ncl-filter .ncl-filter__clear {
  color: var(--ncl-accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.ncl-filter .ncl-filter__clear:hover {
  color: var(--ncl-accent-hover);
  text-decoration: underline;
}

/* Screen-reader-only text */
.ncl-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Archive list */
.ncl-archive {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 120ms ease;
}

.ncl-archive[aria-busy='true'] {
  opacity: 0.5;
}

/* Entry card (old .changelog-card) */
.ncl-archive .ncl-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'header action'
    'body body';
  overflow: hidden;
  border: 1px solid rgba(127, 171, 255, 0.12);
  border-radius: var(--ncl-radius-card);
  background: var(--ncl-card);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ncl-archive .ncl-entry:hover {
  border-color: rgba(127, 171, 255, 0.2);
  background: var(--ncl-card-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card header (old .card-header) */
.ncl-archive .ncl-entry__header {
  grid-area: header;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ncl-border-soft);
  background: rgba(127, 171, 255, 0.06);
}

.ncl-archive .ncl-entry__title {
  margin: 0;
  color: var(--ncl-heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.ncl-archive .ncl-entry__title a {
  color: var(--ncl-heading);
  text-decoration: none;
}

.ncl-archive .ncl-entry__title a:hover,
.ncl-archive .ncl-entry__title a:focus-visible {
  color: var(--ncl-accent);
}

.ncl-archive .ncl-entry__meta {
  margin: 0.25rem 0 0;
  color: var(--ncl-text-muted);
  font-size: 0.875rem;
}

.ncl-archive .ncl-entry__summary {
  margin-top: 0.5rem;
  color: var(--ncl-text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ncl-archive .ncl-entry__summary p {
  margin: 0;
}

/* Card content (old .card-content) */
.ncl-archive .ncl-entry__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
}

/* Detail button: right side of the header row, vertically centred */
.ncl-archive .ncl-entry__footer {
  grid-area: action;
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem 1.25rem 0;
  border-bottom: 1px solid var(--ncl-border-soft);
  background: rgba(127, 171, 255, 0.06);
}

.ncl-archive a.ncl-entry__permalink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(127, 171, 255, 0.3);
  border-radius: 0.375rem;
  background: rgba(127, 171, 255, 0.15);
  color: #eeeeee;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ncl-archive a.ncl-entry__permalink::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background: url('/wp-content/uploads/2025/06/arrow-right.svg') center / contain no-repeat;
  transition: transform 0.2s ease;
}

.ncl-archive a.ncl-entry__permalink:hover {
  border-color: rgba(127, 171, 255, 0.45);
  background: rgba(127, 171, 255, 0.25);
  color: #ffffff;
  transform: translateX(2px);
}

.ncl-archive a.ncl-entry__permalink:hover::after {
  transform: translateX(2px);
}

/* Sections, shared by archive and single */
.ncl-archive .ncl-section,
.ncl-single .ncl-section {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--ncl-border);
  border-radius: var(--ncl-radius);
  background: var(--ncl-surface);
}

.ncl-archive .ncl-section__title,
.ncl-single .ncl-section__title {
  margin: 0 0 0.75rem;
  color: var(--ncl-section-color, var(--ncl-accent));
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ncl-archive .ncl-section__items,
.ncl-single .ncl-section__items {
  color: var(--ncl-text);
}

.ncl-archive .ncl-section__items ul,
.ncl-archive .ncl-section__items ol,
.ncl-single .ncl-section__items ul,
.ncl-single .ncl-section__items ol {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--ncl-text);
}

.ncl-archive .ncl-section__items ul,
.ncl-single .ncl-section__items ul {
  list-style: disc;
}

.ncl-archive .ncl-section__items li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.ncl-archive .ncl-section__items li::marker,
.ncl-single .ncl-section__items li::marker {
  color: var(--ncl-section-color, var(--ncl-accent));
}

.ncl-archive .ncl-section__items li:last-child,
.ncl-single .ncl-section__items li:last-child {
  margin-bottom: 0;
}

.ncl-archive .ncl-section__items p:first-child,
.ncl-single .ncl-section__items p:first-child {
  margin-top: 0;
}

.ncl-archive .ncl-section__items p:last-child,
.ncl-single .ncl-section__items p:last-child {
  margin-bottom: 0;
}

.ncl-archive .ncl-section__items a,
.ncl-single .ncl-section__items a {
  color: var(--ncl-accent);
}

/* Section type colours (were inline styles) */
.ncl-section--security {
  --ncl-section-color: var(--ncl-security);
}

.ncl-section--fixed {
  --ncl-section-color: var(--ncl-fixed);
}

.ncl-section--added {
  --ncl-section-color: var(--ncl-added);
}

.ncl-section--updated {
  --ncl-section-color: var(--ncl-updated);
}

.ncl-section--improved {
  --ncl-section-color: var(--ncl-improved);
}

.ncl-section--deprecated {
  --ncl-section-color: var(--ncl-deprecated);
}

.ncl-section--removed {
  --ncl-section-color: var(--ncl-removed);
}

.ncl-archive .ncl-section--security,
.ncl-single .ncl-section--security {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.ncl-archive .ncl-section--fixed,
.ncl-single .ncl-section--fixed {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
}

.ncl-archive .ncl-section--added,
.ncl-single .ncl-section--added {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.ncl-archive .ncl-section--updated,
.ncl-single .ncl-section--updated {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
}

.ncl-archive .ncl-section--improved,
.ncl-single .ncl-section--improved {
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.1);
}

.ncl-archive .ncl-section--deprecated,
.ncl-single .ncl-section--deprecated {
  border-color: rgba(251, 146, 60, 0.3);
  background: rgba(251, 146, 60, 0.1);
}

.ncl-archive .ncl-section--removed,
.ncl-single .ncl-section--removed {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.1);
}

/* Components, shared */
.ncl-archive .ncl-components,
.ncl-single .ncl-components {
  margin-top: 0.75rem;
}

.ncl-archive .ncl-components__title,
.ncl-single .ncl-components__title {
  margin: 0 0 1rem;
  color: var(--ncl-accent);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.ncl-archive .ncl-component,
.ncl-single .ncl-component {
  margin-bottom: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--ncl-border);
  border-radius: var(--ncl-radius);
  background: var(--ncl-surface);
}

.ncl-archive .ncl-component:last-child,
.ncl-single .ncl-component:last-child {
  margin-bottom: 0;
}

.ncl-archive .ncl-component__title,
.ncl-single .ncl-component__title {
  margin: 0 0 0.5rem;
  color: var(--ncl-accent);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.ncl-archive .ncl-component__version,
.ncl-single .ncl-component__version {
  color: var(--ncl-text-muted);
  font-size: 0.9em;
  font-weight: 400;
}

.ncl-archive .ncl-component__items,
.ncl-single .ncl-component__items {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--ncl-text);
  list-style: disc;
}

.ncl-archive .ncl-component__items li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.ncl-archive .ncl-component__items li::marker,
.ncl-single .ncl-component__items li::marker {
  color: var(--ncl-accent);
}

.ncl-archive .ncl-component__items li:last-child,
.ncl-single .ncl-component__items li:last-child {
  margin-bottom: 0;
}

/* Single post (old #changelog-single-container) */
.ncl-single {
  max-width: 100%;
  margin: 0 auto;
  color: var(--ncl-text);
}

.ncl-single .ncl-summary {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--ncl-border);
  border-radius: var(--ncl-radius);
  background: var(--ncl-surface-raised);
}

.ncl-single .ncl-summary__title {
  margin: 0 0 0.75rem;
  color: var(--ncl-accent);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ncl-single .ncl-summary__body {
  color: var(--ncl-text);
  line-height: 1.6;
}

.ncl-single .ncl-summary__body p {
  margin: 0;
}

.ncl-single .ncl-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.ncl-single .ncl-section__title {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.ncl-single .ncl-section__items li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.ncl-single .ncl-components {
  margin-top: 2rem;
}

.ncl-single .ncl-components__title {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.ncl-single .ncl-component {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.ncl-single .ncl-component__title {
  font-size: 1rem;
}

.ncl-single .ncl-component__items li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Pagination (new) */
.ncl-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.ncl-pagination li {
  margin: 0;
}

.ncl-pagination a.page-numbers,
.ncl-pagination span.page-numbers {
  display: inline-block;
  min-width: 2.25rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(127, 171, 255, 0.3);
  border-radius: 0.375rem;
  background: rgba(127, 171, 255, 0.08);
  color: #eeeeee;
  font-size: 0.875rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ncl-pagination a.page-numbers:hover {
  border-color: rgba(127, 171, 255, 0.45);
  background: rgba(127, 171, 255, 0.25);
  color: #ffffff;
}

.ncl-pagination span.page-numbers.current {
  border-color: var(--ncl-accent-hover);
  background: var(--ncl-accent-hover);
  color: #ffffff;
  font-weight: 600;
}

.ncl-pagination span.page-numbers.dots {
  border-color: transparent;
  background: none;
}

/* Markdown pointer (new) */
.ncl-md-pointer {
  margin-top: 2rem;
  font-size: 0.85rem;
  text-align: center;
}

.ncl-md-pointer a {
  color: var(--ncl-text-muted);
  text-decoration: none;
}

.ncl-md-pointer a:hover {
  color: var(--ncl-accent);
  text-decoration: underline;
}

/* Empty state (old .no-results) */
.ncl-empty {
  margin: 0;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--ncl-radius);
  background: rgba(0, 0, 0, 0.2);
  color: var(--ncl-text-muted);
  text-align: center;
}

/* Tablet */
@media (max-width: 785px) {
  .ncl-archive {
    gap: 1.25rem;
  }

  .ncl-archive .ncl-entry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'header'
      'action'
      'body';
  }

  .ncl-archive .ncl-entry__header {
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 0;
  }

  .ncl-archive .ncl-entry__title {
    font-size: 1.125rem;
  }

  .ncl-archive .ncl-entry__body {
    padding: 1.25rem;
  }

  .ncl-archive .ncl-entry__footer {
    padding: 0 1.25rem 1rem;
  }

  .ncl-archive a.ncl-entry__permalink {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .ncl-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .ncl-filter .ncl-filter__search {
    flex-basis: auto;
  }

  .ncl-filter .ncl-filter__sort {
    justify-content: space-between;
  }

  .ncl-filter .ncl-filter__select {
    flex: 1;
    width: auto;
  }

  .ncl-single .ncl-section,
  .ncl-single .ncl-component,
  .ncl-single .ncl-summary {
    padding: 1rem;
  }

  .ncl-single .ncl-section__title,
  .ncl-single .ncl-component__title,
  .ncl-single .ncl-summary__title {
    font-size: 0.9375rem;
  }

  .ncl-single .ncl-section__items li,
  .ncl-single .ncl-component__items li {
    font-size: 0.9375rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .ncl-archive .ncl-entry__header {
    padding: 0.875rem 1rem 0.75rem;
  }

  .ncl-archive .ncl-entry__title {
    font-size: 1rem;
  }

  .ncl-archive .ncl-entry__body {
    padding: 1rem;
  }

  .ncl-archive .ncl-entry__footer {
    padding: 0 1rem 0.875rem;
  }

  .ncl-archive .ncl-section,
  .ncl-archive .ncl-component {
    padding: 0.75rem;
  }

  .ncl-archive .ncl-section__title,
  .ncl-archive .ncl-component__title {
    font-size: 0.8125rem;
  }

  .ncl-archive .ncl-section__items li,
  .ncl-archive .ncl-component__items li {
    font-size: 0.875rem;
  }

  .ncl-single .ncl-section,
  .ncl-single .ncl-component,
  .ncl-single .ncl-summary {
    padding: 0.875rem;
  }

  .ncl-single .ncl-section__title,
  .ncl-single .ncl-component__title,
  .ncl-single .ncl-summary__title {
    font-size: 0.875rem;
  }

  .ncl-single .ncl-section__items li,
  .ncl-single .ncl-component__items li,
  .ncl-single .ncl-summary__body {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ncl-archive,
  .ncl-archive .ncl-entry,
  .ncl-archive a.ncl-entry__permalink,
  .ncl-archive a.ncl-entry__permalink::after {
    transition: none;
  }
}
