/*
 * solidres.com: the download pages (Akeeba Release System), for the
 * template's overrides in html/com_ars/: the categories as cards under their
 * groups, a category's versions, a version's files and notes, the latest
 * releases. Loaded by those overrides only; colours are the template's
 * tokens, so both schemes follow.
 */

.sr-ars > h1 {
  margin-bottom: 8px;
}

.sr-ars__intro {
  margin-bottom: 8px;
}

.sr-ars__intro > :last-child,
.sr-ars-card__text > :last-child,
.sr-ars-release__text > :last-child,
.sr-ars-file__text > :last-child {
  margin-bottom: 0;
}

.sr-ars__empty {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: var(--sr-radius-sm);
  background: var(--sr-tint);
  color: var(--sr-ink);
}

.sr-ars__section > h2 {
  margin: 32px 0 0;
}

/* --------------------------------------------------------------------------
 * The categories: groups of cards.
 * ------------------------------------------------------------------------ */

.sr-ars__group-title {
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sr-line);
  font-size: 1.5rem;
}

.sr-ars-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.sr-ars-card {
  padding: 16px 20px;
  border: 1px solid var(--sr-line);
  border-top: 3px solid var(--sr-brand);
  border-radius: var(--sr-radius);
  background: var(--sr-surface);
  box-shadow: var(--sr-shadow);
}

.sr-ars-card__title {
  margin: 0;
  font-size: 1.25rem;
}

.sr-ars-card__title a {
  text-decoration: none;
}

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

.sr-ars-card__text {
  margin-top: 8px;
  color: var(--sr-muted);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
 * Releases: a category's versions, the latest releases.
 * ------------------------------------------------------------------------ */

.sr-ars-releases {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.sr-ars-release {
  padding: 20px 0;
  border-bottom: 1px solid var(--sr-line);
}

.sr-ars-release:first-child {
  padding-top: 8px;
}

.sr-ars-release__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.sr-ars-release__head > :is(h1, h2, h3) {
  margin: 0;
}

.sr-ars-release__title {
  font-size: 1.5rem;
}

.sr-ars-release__title a {
  text-decoration: none;
}

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

.sr-ars-release__text {
  margin: 0 0 12px;
}

.sr-ars-release__files {
  margin: 12px 0 0;
}

/* The date and the compatibility on one line when they fit. */
.sr-ars-release__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 6px 0 12px;
}

.sr-ars-release__info > .sr-ars-meta,
.sr-ars-release__info > .sr-ars-envs {
  margin: 0;
}

/* View files, then the notes' disclosure beside it; open, the notes take the
 * whole width under the button. */
.sr-ars-release__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.sr-ars-release__actions > .sr-ars-notes[open] {
  flex-basis: 100%;
}

.sr-ars-maturity {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-family: var(--sr-font-heading);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  text-transform: uppercase;
  white-space: nowrap;
}

.sr-ars-maturity--stable {
  background: var(--sr-green-fill);
  color: #ffffff;
}

.sr-ars-maturity--rc {
  background: var(--sr-brand);
  color: var(--sr-on-brand);
}

.sr-ars-maturity--beta {
  background: var(--sr-accent);
  color: var(--sr-on-accent);
}

.sr-ars-maturity--alpha {
  background: #b42318;
  color: #ffffff;
}

.sr-ars-maturity--other {
  background: var(--sr-tint-strong);
  color: var(--sr-ink);
}

.sr-ars-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin: 6px 0 12px;
  color: var(--sr-muted);
  font-size: 0.9375rem;
}

.sr-ars-envs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.sr-ars-envs li {
  padding: 0 8px;
  border: 1px solid var(--sr-line);
  border-radius: 999px;
  background: var(--sr-tint);
  color: var(--sr-text);
  font-size: 0.8125rem;
  line-height: 1.7;
}

/* The release notes, in a disclosure on a category's page and open on a
 * version's page. Their headings are numbered from <h3>; they read as the
 * notes' own sections, smaller than the page's. */
.sr-ars-notes summary,
.sr-ars-sums summary {
  width: fit-content;
  color: var(--sr-link);
  font-family: var(--sr-font-heading);
  letter-spacing: 0.02em;
  cursor: pointer;
}

.sr-ars-notes summary:hover,
.sr-ars-sums summary:hover {
  color: var(--sr-link-hover);
  text-decoration: underline;
}

.sr-ars-notes[open] > summary {
  margin-bottom: 8px;
}

.sr-ars-notes > .sr-ars-notes__body {
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--sr-brand-tint);
}

.sr-ars-notes__body :is(h3, h4, h5, h6) {
  margin: 1.25em 0 0.5em;
  font-size: 1.1875rem;
}

.sr-ars-notes__body > :first-child {
  margin-top: 0;
}

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

/* --------------------------------------------------------------------------
 * A version's page: its files, then its notes.
 * ------------------------------------------------------------------------ */

.sr-ars__files > h2,
.sr-ars__notes > h2 {
  margin: 24px 0 12px;
  font-size: 1.75rem;
}

.sr-ars__notes {
  margin-top: 16px;
}

.sr-ars-files {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sr-ars-file {
  margin-bottom: 16px;
  padding: 16px 20px;
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-radius);
  background: var(--sr-surface);
  box-shadow: var(--sr-shadow);
}

.sr-ars-file__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.sr-ars-file .sr-ars-meta {
  margin-bottom: 8px;
}

.sr-ars-file__name {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--sr-tint);
  color: var(--sr-ink);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.sr-ars-file__text {
  margin-bottom: 8px;
}

.sr-ars-file__actions {
  margin: 12px 0 0;
}

.sr-ars-file__directlink {
  margin: 12px 0 0;
  font-size: 0.9375rem;
}

.sr-ars-file__hint {
  display: block;
  color: var(--sr-muted);
}

.sr-ars-sums {
  margin-top: 12px;
}

.sr-ars-sums dl {
  margin: 8px 0 0;
}

.sr-ars-sums dt {
  color: var(--sr-ink);
  font-size: 0.875rem;
}

.sr-ars-sums dd {
  margin: 0 0 8px;
}

.sr-ars-sums code {
  color: var(--sr-text);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

/* The latest releases' files: a button and the file's name per line. */
.sr-ars-downloads {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.sr-ars-downloads li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.sr-ars-downloads__name {
  overflow-wrap: anywhere;
}

.sr-ars-downloads__hits {
  color: var(--sr-muted);
  font-size: 0.9375rem;
}

.sr-ars__pagination {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
 * My Download ID: the customer's Download IDs.
 * ------------------------------------------------------------------------ */

.sr-ars--dlids .alert code,
.sr-ars--dlids .alert tt {
  color: inherit;
  font-family: var(--sr-font-mono);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sr-ars-dlids__add {
  margin: 16px 0;
}

.sr-ars-dlids th[scope="row"] {
  font-weight: 400;
}

.sr-ars-dlids :is(td, th) {
  vertical-align: middle;
}

.sr-ars-dlids__id code {
  margin-inline-start: 8px;
  color: var(--sr-ink);
  font-size: 0.9375rem;
}

.sr-ars-dlids__id,
.sr-ars-dlids__actions {
  white-space: nowrap;
}

.sr-ars-dlids__actions .btn + .btn {
  margin-inline-start: 6px;
}

.sr-ars-dlids__state {
  color: var(--sr-muted);
}

@media print {
  .sr-ars-file__actions,
  .sr-ars-file__directlink {
    display: none;
  }
}

.sr-ars--dlid-edit form {
  max-width: 560px;
}

.sr-ars-dlid-edit__actions {
  margin-top: 16px;
}
