/*
 * Documentation: the index (html/com_content/category/docs.php), the
 * navigation module beside the articles (mod_srdocs, which loads this file
 * from the active template) and the article title. Ported from the Joomla 3
 * template; its colours are now the template's tokens (template.css), so
 * the pages follow the colour scheme.
 */

.sr-docs {
  --sr-docs-radius: var(--sr-radius);
  --sr-docs-input-line: #b7cad0;
  --sr-docs-bullet: #97adb4;
  --sr-docs-state-line: #c9a227;
  --sr-docs-state-bg: #fdf6e0;
  --sr-docs-state-text: #6b5200;
  color: var(--sr-text);
}

[data-bs-theme="dark"] .sr-docs {
  --sr-docs-input-line: #3b5056;
  --sr-docs-bullet: #6f878e;
  --sr-docs-state-line: #8a7020;
  --sr-docs-state-bg: #2b2412;
  --sr-docs-state-text: #f0d68a;
}

/* Cards and lists set their own display, which would otherwise beat the hidden attribute. */
.sr-docs [hidden] {
  display: none !important;
}

.sr-docs__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header: title, lead and the filter. */
.sr-docs__header {
  margin-bottom: 36px;
  padding: 32px 36px 28px;
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-docs-radius);
  background: linear-gradient(135deg, var(--sr-brand-tint) 0%, var(--sr-tint) 70%);
}

.sr-docs__kicker {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sr-docs__title {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.2;
}

.sr-docs__lead {
  max-width: 46rem;
  margin-top: 10px;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.sr-docs__lead > :last-child {
  margin-bottom: 0;
}

.sr-docs__filter {
  position: relative;
  max-width: 34rem;
  margin-top: 22px;
}

.sr-docs__filter-icon {
  position: absolute;
  top: 0;
  left: 16px;
  color: var(--sr-muted);
  line-height: 48px;
  pointer-events: none;
}

.sr-docs .sr-docs__filter-input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--sr-docs-input-line);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-surface);
  color: var(--sr-ink);
  font-size: 1rem;
}

.sr-docs .sr-docs__filter-input::placeholder {
  color: var(--sr-muted);
}

.sr-docs .sr-docs__filter-input:focus {
  border-color: var(--sr-brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--sr-brand-rgb), 0.3);
}

.sr-docs__status {
  margin: 8px 0 0;
  font-size: 0.875rem;
}

/* Empty until the filter has something to say; kept rendered so screen readers hear it. */
.sr-docs__status:empty {
  margin: 0;
}

/* A product with sections: heading row, then its section cards. */
.sr-docs__product {
  margin-bottom: 44px;
}

.sr-docs__product-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--sr-line);
}

.sr-docs__product-text {
  flex: 1 1 auto;
  min-width: 0;
}

.sr-docs__product-title,
.sr-docs__group-title,
.sr-docs__help-title {
  margin: 0;
  font-size: 1.625rem;
  line-height: 1.25;
}

.sr-docs__product-text .sr-docs__summary {
  margin: 4px 0 0;
}

.sr-docs__product-all {
  flex: none;
  font-weight: 700;
  white-space: nowrap;
}

.sr-docs__group-title {
  margin-bottom: 20px;
  font-size: 1.375rem;
}

/* Cards. */
.sr-docs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.sr-docs__others {
  margin-bottom: 44px;
}

.sr-docs__card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px 18px;
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-docs-radius);
  background: var(--sr-surface);
  box-shadow: var(--sr-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sr-docs__card:hover {
  border-color: rgba(var(--sr-brand-rgb), 0.45);
  box-shadow: var(--sr-shadow-raised);
}

.sr-docs__card--plain,
.sr-docs__card--page {
  margin-bottom: 24px;
}

.sr-docs__card--page {
  padding: 8px 28px;
}

.sr-docs__card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.sr-docs__card-title {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.sr-docs__card-title a,
.sr-docs__product-title a {
  color: inherit;
  text-decoration: none;
}

.sr-docs__card-title a:hover,
.sr-docs__card-title a:focus,
.sr-docs__product-title a:hover,
.sr-docs__product-title a:focus {
  color: var(--sr-link);
  text-decoration: underline;
}

.sr-docs__count {
  margin: 2px 0 0;
  color: var(--sr-muted);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.sr-docs__summary {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.sr-docs .sr-docs__icon {
  display: inline-block;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sr-tint);
  color: var(--sr-link);
  font-size: 1.125rem;
  line-height: 40px;
  text-align: center;
}

.sr-docs .sr-docs__icon--large {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--sr-brand);
  color: var(--sr-on-brand);
  font-size: 1.625rem;
  line-height: 52px;
}

/* Article lists. */
.sr-docs__items {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}

.sr-docs__item {
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid var(--sr-line-soft);
  line-height: 1.4;
}

.sr-docs__item a {
  display: flex;
  gap: 10px;
  text-decoration: none;
}

/* A page icon (Font Awesome's file-lines, from Joomla's icon font). */
.sr-docs__item a::before {
  content: "\f15c";
  flex: none;
  color: var(--sr-docs-bullet);
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
}

.sr-docs__item a:hover {
  text-decoration: underline;
}

/* Shown to editors only: visitors are never given these articles. */
.sr-docs__item--hidden-state a {
  color: var(--sr-muted);
}

.sr-docs__state {
  flex: none;
  align-self: center;
  margin-left: auto;
  padding: 1px 8px;
  border: 1px solid var(--sr-docs-state-line);
  border-radius: 999px;
  background: var(--sr-docs-state-bg);
  color: var(--sr-docs-state-text);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sr-docs__card--page .sr-docs__item {
  padding: 12px 0;
  font-size: 0.9375rem;
}

.sr-docs__card--page .sr-docs__item:first-child {
  border-top: 0;
}

.sr-docs__more {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 700;
}

.sr-docs--filtering .sr-docs__more,
.sr-docs--filtering .sr-docs__product-all {
  display: none;
}

/* Help. */
.sr-docs__help {
  padding: 28px 32px 32px;
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-docs-radius);
  background: var(--sr-tint);
}

.sr-docs__help-title {
  margin-bottom: 18px;
  font-size: 1.375rem;
}

.sr-docs__help-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sr-docs__help-links a {
  display: flex;
  box-sizing: border-box;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-radius-sm);
  background: var(--sr-surface);
  color: var(--sr-text);
  text-decoration: none;
}

.sr-docs__help-links a:hover,
.sr-docs__help-links a:focus {
  border-color: var(--sr-brand);
  color: var(--sr-text);
}

.sr-docs__help-name {
  display: block;
  color: var(--sr-ink);
  font-weight: 700;
}

.sr-docs__help-text {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (max-width: 767px) {
  .sr-docs__header {
    padding: 22px 20px 16px;
  }

  .sr-docs__title {
    font-size: 1.75rem;
  }

  .sr-docs__lead {
    font-size: 1rem;
  }

  .sr-docs__product-head {
    flex-wrap: wrap;
  }

  .sr-docs__product-all {
    flex-basis: 100%;
  }

  .sr-docs__help {
    padding: 22px 20px 24px;
  }
}

@media print {
  .sr-docs__filter,
  .sr-docs__status,
  .sr-docs__help {
    display: none;
  }

  .sr-docs__card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* --------------------------------------------------------------------------
 * The navigation module (mod_srdocs): the product as the title, its
 * sections as headings, the article being read marked.
 * ------------------------------------------------------------------------ */

.sr-docs-nav {
  font-size: 1rem;
}

.sr-docs-nav__title {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.sr-docs-nav__title a {
  color: inherit;
  text-decoration: none;
}

.sr-docs-nav__title a:hover,
.sr-docs-nav__title a:focus {
  color: var(--sr-link);
  text-decoration: underline;
}

.sr-docs-nav__heading {
  margin: 20px 0 8px;
  color: var(--sr-accent-text);
  font-size: 1.1875rem;
}

.sr-docs-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sr-docs-nav__list li + li {
  margin-top: 2px;
}

.sr-docs-nav__list a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 3px solid transparent;
  line-height: 1.35;
  text-decoration: none;
}

.sr-docs-nav__list a:hover {
  text-decoration: underline;
}

.sr-docs-nav [aria-current="page"] {
  color: var(--sr-ink);
  font-weight: 700;
}

.sr-docs-nav__list [aria-current="page"] {
  border-left-color: var(--sr-accent);
}

.sr-docs-nav__all {
  margin: 20px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--sr-line-soft);
  font-weight: 700;
}
