.dataset-page {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: stretch;
  justify-content: center;
  background-color: var(--theme-background-grey);
  padding-top: 48px;
}

.dataset-menu-container {
  background-color: var(--theme-background-grey);
  flex-basis: 250px;
  flex-shrink: 1;
  flex-grow: 1;
  @media (max-width: 950px) {
    display: none;
  }
  @media (max-width: 1260px) {
    flex-basis: 150px;
  }
  .dataset-menu {
    padding-top: 0;
    position: sticky;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    top: 48px;
  }
  .menu-item {
    padding-bottom: 24px;
    width: 150px;
  }
  a {
    text-decoration: none;
    color: var(--theme-dark-text);
  }
}

.dataset-infos {
  background-color: var(--theme-background-grey);
  flex-grow: 4;
  flex-basis: 700px;
  padding: 0 12px 48px;
  min-width: 0;
}

.dataset-metas {
  background-color: var(--theme-background-grey);
  flex-basis: 250px;
  min-width: 300px;
  flex-grow: 1;
  flex-shrink: 1;
  padding: 0 12px 48px;
  font-style: normal;
  .icon {
    margin-right: .2em;
  }
  .dataset-metas-info-title {
    color: var(--theme-label-text);
  }
  .dataset-tags {
    display: flex;
    flex-wrap: wrap;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.dataset-title-div {
  background-color: white;
  margin: 0 auto;
  padding: 96px 0;
  text-align: center;
  @media (max-width: 1250px) {
    padding: 48px 0;
  }
}

.dataset__resources ~ .dataset__resources {
  padding-top: 1vh;
}

.dataset__resources .information-message {
  color: var(--theme-label-text);
}

.dataset__resources .resources-message {
  color: var(--theme-label-text);
}

.dataset__resources .warning-red {
  color: var(--theme-error-border);
}

.dataset__logo {
  img {
    max-height: 100px;
    max-width: 150px;
    object-fit: contain;
  }
}

.resource--download {
  display: flex;

  i {
    font-size: 2em;
  }

  div > h6 {
    color: var(--black);
    text-decoration: none;
  }
}

.community-resource-detail {
  display: block !important;
  text-align: left !important;
  flex-grow: 1;
  .community-resource-source {
    margin-bottom: 0;
  }
  p {
    margin: 0;
  }
}

.resource__details {
  display: flex;
  flex-direction: row;
  width: 40%;

  div {
    display: flex;
    flex-direction: column;
    width: 50%;
    padding-left: 5%;
    text-align: center;
  }
}

.resource--download > div:last-child {
  display: flex;
  flex-direction: column;
}

.ressources-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0 -12px;

  .panel {
    margin: 12px;
  }
}

.resource__summary--Fatal,
.resource__summary--Fatal a {
  color: var(--theme-error-border) !important;
}
.resource__summary--Error,
.resource__summary--Error a {
  color: var(--theme-error-border) !important;
}
.resource__summary--Warning,
.resource__summary--Warning a {
  color: var(--theme-warning-border) !important;
}
.resource__summary--Information,
.resource__summary--Information a {
  color: var(--theme-info-border) !important;
}
.resource__summary--Irrelevant,
.resource__summary--Irrelevant a {
  color: var(--theme-success-border) !important;
}
.resource__summary--Success,
.resource__summary--Success a {
  color: var(--theme-success-border) !important;
}

.resource {
  flex-basis: calc(45% - 24px);
  min-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  .button-outline:hover {
    background-color: transparent;
  }
  h4 {
    display: inline-block;
    margin-bottom: 0;
    font-size: 1em;
    max-width: 80%;
  }
  .resource-panel-bottom {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    .resource-actions {
      flex-shrink: 1;
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      justify-content: space-between;
      .button-outline.secondary.no-border {
        padding: 0 12px 0 0;
        border: none;
      }
    }
  }
  .button {
    margin: 0;
  }
  a.light-grey-link {
    color: var(--theme-label-text) !important;
    &:hover {
      background-color: transparent !important;
      color: var(--theme-dark-text) !important;
    }
  }
  a {
    text-decoration: none;
    &:hover {
      background-color: transparent !important;
    }
  }
  .resource-format {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
}

.dark {
  color: var(--theme-dark-text) !important;
}

.light-grey {
  color: var(--theme-label-text) !important;
}

.panel.invalid-resource-panel {
  background-color: #f5f6f7;
}

.community-resource-download {
  align-self: flex-end;
}

.resource-status-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-bottom: 75px solid transparent;
  border-left: 75px solid transparent;

  span {
    position: absolute;
    top: -60px;
    width: 100px;
    left: -75px;
    text-align: center;
    font-size: 12px;
    font-family: arial;
    transform: rotate(45deg);
    display: block;
  }
}

.span-unavailable {
  line-height: 1em;
}

.ml-05-em {
  margin-left: 0.5em;
}

.resource--valid {
  border-top: 75px solid var(--theme-success-bg);
}

.resource--outdated {
  border-top: 75px solid var(--theme-background-grey);
}

.resource--unavailable {
  border-top: 75px solid var(--theme-error-bg);
}

.resource__header {
  padding-bottom: 1em;
  width: 60%;
}

.mode,
.version {
  background-color: var(--lighter-blue);
}

.reuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  margin: -12px;
}

.reuse {
  margin: 12px;
  flex-basis: 450px;
  // min-width: 450px;
  flex-grow: 1;
  min-height: 300px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  img {
    width: 25%;
    height: 100px;
    object-fit: cover;
    padding-right: 24px;
  }

  .reuse__links {
    width: 25%;
    height: 100px;
    display: flex;
    flex-direction: column;

    a {
      line-height: 1.1em;
      padding-top: 1em;
    }
  }
  .reuse__details {
    min-height: 200px;
    width: 75%;
    flex-basis: 100%;
    overflow: auto;
  }
}

.dataset-details__discussions {
  .panel__header {
    div {
      display: flex;
      justify-content: space-between;

      .form {
        margin: 0;
      }
    }
  }
}

@media (max-width: 749px) {
  .community-resource-detail {
    text-align: center !important;
  }

  .ressources-list {
    justify-content: center;
  }

  .resource__header,
  .resource__details {
    width: 100%;
  }

  .panel__header {
    text-align: center;

    div {
      flex-direction: column;
      text-align: center;
    }
  }

  .resource--download {
    flex-direction: column;
    justify-content: center;

    div {
      text-align: center;
    }

    .icon {
      margin-right: 0;
    }
  }

  .resource__details {
    flex-direction: column;
    justify-content: center;

    div {
      width: 100%;
    }
  }

  .reuse {
    flex-wrap: nowrap;
    img {
      height: 50%;
      max-height: 50%;
      width: 100%;
      object-fit: cover;
      padding: 0;
    }

    .reuse__links {
      width: 100%;
      flex-basis: 0;
      flex-direction: row;
      justify-content: space-around;

      a {
        padding-top: 6px;
        padding-bottom: 12px;
        margin: 0;
      }
    }
    .reuse__details {
      text-align: center;
      width: 100%;
      flex-basis: 100%;
      min-height: 0;
      overflow: hidden;
    }
  }

  .dataset {
    .section {
      padding: 1em 0;
    }

    .section-grey {
      padding: 3em 0;
    }
  }
}

.pb-48 {
  padding-bottom: 48px;
}

.pb-24 {
  padding-bottom: 24px;
}

.pb-12 {
  padding-bottom: 12px;
}

.pb-6 {
  padding-bottom: 6px;
}

.pt-48 {
  padding-top: 48px;
}

.pt-96 {
  padding-top: 96px;
}

.pt-24 {
  padding-top: 24px;
}

.pt-12 {
  padding-top: 12px;
}

.p-24 {
  padding: 24px;
}

.p-6 {
  padding: 6px;
}

.p-12 {
  padding: 12px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mr-24 {
  margin-right: 24px;
}

.my-\.5 {
  margin: .5em 0;
}

.no-padding {
  padding: 0 !important;
}

.dataset-type-info {
  display: flex;
  align-items: center;
}

.dataset-icon-type img {
  width: 26px;
  vertical-align: middle;
  padding-right: 6px;
}

.ign-tile {
  filter: grayscale(100%) opacity(70%);
}

.leaflet-map {
  width: 100%;
  height: 400px;
  margin: 0 auto;
  z-index: 0;
  input[type='radio'] {
    width: 16px;
    height: 16px;
  }
  input[type='radio']::before {
    top: 15%;
    left: 15%;
    width: 10px;
    height: 10px;
  }
  .leaflet-popup-content {
    overflow: auto;
  }
}

#dataset-covered-area-map {
  width: 100%;
  max-width: 400px;
  height: 400px;
  z-index: 0;
}

.leaflet-tooltip-pane .leaflet-tooltip {
  color: white;
  font-weight: bold;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.reuses_not_available {
  font-style: italic;
}

.container_max_700px {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.panel > :first-child {
  margin-top: 0;
}

hr {
  border-bottom: 1px solid var(--theme-border-lighter);
}

.discussion, #notifications-sent, #backed-up-resources {
  .displayMore {
    text-align: center;
    margin-bottom: 1em;
  }
}

#vega-vis {
  width: 100%;
  max-width: 900px;
  margin: 1em auto;
  display: block;
}

.follow-dataset-icon {
  text-align: right;

  a:hover {
    background: transparent;
  }

  p.notification {
    text-align: left;
    transition: all 1s;
    opacity: 0;
    display: none;
    &.active {
      display: block;
      animation: fade-in 1s;
      opacity: 1;
    }
  }
}

.netex-conversion-modal .button__group {
  a.button:hover {
    background-color: var(--theme-secondary-darken) !important;
  }
  a.button.secondary:hover {
    background-color: var(--darkest-grey) !important;
  }
  
  .button {
    display: flex;
    align-items: center;
  }
}
