/**
 * @file
 * Full view of a label: two columns, accordions, sidebar.
 */

.kans-label__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 60rem) {
  .kans-label__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}


.kans-label__intro {
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* --- accordions ---------------------------------------------------------- */

.kans-label__accordion {
  border-bottom: 1px solid #e3e1dc;
}

.kans-label__accordion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.75rem;
  cursor: pointer;
  font-size: 1.125rem;
  list-style: none;
  text-transform: uppercase;
}

/* Suppress the native disclosure marker; the chevron below replaces it. */
.kans-label__accordion-heading::-webkit-details-marker {
  display: none;
}

.kans-label__accordion-heading:hover,
.kans-label__accordion[open] > .kans-label__accordion-heading {
  background: #f4f4f2;
}

.kans-label__accordion-heading::after {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid #8a8a8a;
  border-bottom: 2px solid #8a8a8a;
  margin-right: 0.5rem;
  content: "";
  transform: rotate(45deg) translate(-0.2rem, -0.2rem);
  transition: transform 0.15s ease;
}

.kans-label__accordion[open] > .kans-label__accordion-heading::after {
  transform: rotate(-135deg) translate(-0.2rem, -0.2rem);
}

.kans-label__accordion-body {
  padding: 1rem 0.75rem 1.25rem;
  line-height: 1.6;
}

/*
 * The body's first block carries its own top margin in most themes, but that
 * margin would collapse against the heading and reintroduce the gap this
 * padding exists to create -- so drop it and let the padding do the spacing.
 */
.kans-label__accordion-body > *:first-child {
  margin-top: 0;
}

/* --- outbound links ------------------------------------------------------ */

.kans-label__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.kans-label__link {
  padding: 0.65rem 1.25rem;
  background: #b3b3b3;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  word-break: break-word;
}

.kans-label__link:hover,
.kans-label__link:focus-visible {
  background: #999;
  color: #fff;
}

/* --- sidebar ------------------------------------------------------------- */

.kans-label__aside {
  padding: 1rem;
  background: #f4f4f2;
}

.kans-label__logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #fff;
}

.kans-label__logo {
  max-width: 100%;
  height: auto;
  /* Logos share no aspect ratio (400x400 up to 2320x2560), so they are boxed
     and contained rather than cropped to a grid cell. */
  object-fit: contain;
}

.kans-label__teaser {
  padding: 1rem 0;
  border-bottom: 1px solid #dedbd4;
  color: #6b6b6b;
  font-style: italic;
}

.kans-label__aside-heading {
  margin: 1rem 0 0.5rem;
  font-size: 1.125rem;
  font-style: italic;
}

.kans-label__category-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #6b6b6b;
  font-style: italic;
}

/*
 * The term names are stored lower-case ("voeding", "alimentation") but the
 * legacy sidebar showed them capitalised. Done here rather than by editing 21
 * taxonomy terms, and with ::first-letter rather than `capitalize`, which would
 * also hit the second word ("Biologische Landbouw").
 */
.kans-label__category-list li::first-letter {
  text-transform: uppercase;
}

.kans-label__download {
  padding: 1rem 0;
  margin: 0;
  border-top: 1px solid #dedbd4;
}

.kans-label__download a {
  color: #6b6b6b;
  font-style: italic;
}

/* --- type badge ---------------------------------------------------------- */

/*
 * The three colours are the legacy site's, which kept them in a hardcoded PHP
 * map rather than the database — they exist nowhere in the imported content.
 * They live here as modifier classes because this is presentation: the
 * alternative floated during the migration analysis was a config object, but
 * that only pays off if the value changes without a deploy, and the rest of
 * this styling is CSS anyway.
 */
.kans-label__type {
  padding: 0.4rem 1rem;
  margin: 0;
  color: #fff;
  font-style: italic;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.kans-label__type--label {
  background: #009d52;
}

.kans-label__type--pictogram {
  background: #5f84b0;
}

.kans-label__type--reclame {
  background: #f1b954;
}
