html {
  font-size: 62.5%;
  scroll-padding-top: 8rem;
  scroll-behavior: smooth;
}

body {
  color: var(--color-body);
  background-color: var(--bg-neutral);
  font-size: 1.8rem;
  overflow-x: hidden;
  margin: 0;
  line-height: 1.5;

  @media print {
    print-color-adjust: exact;
    font-size: 1.4em;
  }
}
@media (max-width: #{$breakpoint-lg}) {
  body:has(article.o-single--with-sidemenu):not(:has(.o-newspage)) {
    margin: 0 0 calc(7rem + env(safe-area-inset-bottom)) 0;
  }
}

p,
ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 2rem;

  li > small {
    display: inline-block;
    line-height: 1.2;
  }
}

button {
  font-size: 1.8rem;
}

a {
  color: var(--link-default);
  transition: all 0.3s ease;
  text-underline-offset: 0.2rem;

  &:hover,
  &:focus {
    color: var(--link-hovered);
  }

  @media print {
    text-decoration: none;
    color: var(--bs-body-color);

    > .material-symbols-rounded {
      display: none;
    }
  }
}

main {
  margin-top: 2rem;
  padding-left: calc(100vw - 100%);

  @media print {
    margin-top: 0;
    padding-left: 0;
  }
}

.o-container {
  max-width: 1320px;

  @media (max-width: #{$breakpoint-xxl}) {
    max-width: 1140px;
  }

  @media (max-width: #{$breakpoint-xl}) {
    max-width: 960px;
  }

  @media (max-width: #{$breakpoint-lg}) {
    max-width: 720px;
  }

  @media (max-width: #{$breakpoint-md}) {
    max-width: 540px;
  }

  @media (max-width: #{$breakpoint-sm}) {
    max-width: calc(100vw - 3.2rem);
  }

  @media print {
    max-width: 100%;
  }

  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.o-card {
  background-color: var(--bg-default);
  border-radius: var(--border-radius-l);
  padding: 2rem;
}

.o-single--with-sidemenu {
  background-color: unset;
  padding: 0;

  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;

  @media (max-width: #{$breakpoint-lg}) {
    display: flex;
    flex-direction: column;
  }
}

img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-l);

  @media print {
    display: none;
  }
}

.o-list__picture {
  margin-right: 1.2rem;
  display: flex;
}

.o-related__operator-wrapper > .o-related__list {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding-left: 0;
  column-gap: 4rem;
  row-gap: 1rem;
  list-style-type: none;

  li > a {
    display: flex;
    gap: 1rem;
    align-items: center;
  }
}

.o-related__date {
  margin-left: 2.4rem;
}

.o-list__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  list-style-position: inside;
  padding-left: 0;

  > li {
    margin-left: 0.5rem;
  }

  @media print {
    list-style-position: inherit !important;
    padding-left: 2rem;
  }
}

.o-list__list-item {
  &--country,
  &--operator {
    list-style-type: none;

    @media print {
      list-style: disc !important;
    }
  }
}

.o-list__link {
  display: flex;
  align-items: center;
  width: fit-content;

  > .o-list__picture {
    @media print {
      display: none;
    }
  }
}

.o-list__countries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;

  @media (max-width: #{$breakpoint-lg}) {
    display: flex;
    flex-direction: column;
  }
}

.o-list__countries-overview {
  display: flex;
  gap: 2rem;
  flex-direction: column;
}

@mixin add-columns($columns) {
  &--columns-#{$columns} {
    columns: $columns;
    column-gap: 2.4rem;

    @media (max-width: #{$breakpoint-md}) {
      columns: 1;
    }

    li {
      break-inside: avoid-column;
    }
  }
}

.o-section {
  @include add-columns(1);
  @include add-columns(2);
  @include add-columns(3);
}

.o-single {
  padding: 2rem;
  background-color: var(--bg-default);
  border-radius: var(--border-radius-l);
  border: var(--border);

  &--with-sidemenu {
    padding: 0;
    background-color: inherit;
    border: unset;
  }

  &__container {
    background-color: var(--bg-default);
    padding: 2rem;
    border-radius: var(--border-radius-l);
    border: var(--border);

    @media print {
      border: none;
      padding: 0;
    }
  }

  &__content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    p {
      text-align: justify;
    }
  }

  &__news-image {
    margin-bottom: 1.6rem;

    @media (min-width: #{$breakpoint-lg}) {
      display: none;
    }
  }

  &__content-header {
    display: flex;
    justify-content: space-between;
    flex-flow: wrap;
    column-gap: 2rem;
    row-gap: 1rem;
    margin-bottom: 1.6rem;
    align-items: center;

    h1 {
      margin-bottom: 0;
    }
  }

  &__content-header-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 3rem;
  }

  &__news-image {
    margin-bottom: 1.6rem;

    @media (min-width: #{$breakpoint-lg}) {
      display: none;
    }
  }
}

.o-list {
  padding: 2rem;
  background-color: var(--bg-default);
  border-radius: var(--border-radius-l);
  border: var(--border);
}

.o-list--news {
  padding: 0;
  background-color: unset;
  border: none;
}

.pagefind-highlight {
  padding: 0;
  background-color: var(--bg-accent);
}

.sr-only {
  opacity: 0;
  position: absolute;
}

.a-flag {
  height: 1.3em;
  width: auto;
  aspect-ratio: 1 / 1;
}

button:not(:disabled) {
  cursor: pointer;
}

hr {
  opacity: 0.25;
  border: 0;
  border-top: 1px solid;
  margin: 1rem 0;
}

details > summary {
  cursor: pointer;
}

.a-operator-logo {
  height: 1.3em;
  width: auto;
  aspect-ratio: 120 / 50;
  border-radius: var(--border-radius-m);
}

.o-link__external:not(.o-last-updated)::after {
  @media print {
    content: " (" attr(href) ") ";
  }
}
