/*-------------------
      CONTENT AREA
--------------------*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}

// #141204 added overrides to be deleted after merge to volto core
.folder-contents {
  .ui.dropdown:hover > .menu > .item:hover > .menu,
  .ui.dropdown > .menu > .item:active > .menu {
    top: 0 !important;
    left: 100% !important;
    display: block;
    overflow: visible;
    width: auto;
    height: auto;
    opacity: 1;
  }

  .ui.menu.top-menu {
    flex-wrap: wrap;
  }

  .table {
    display: block;
    overflow: auto;
  }

  .breadcrumb {
    flex-wrap: wrap;
  }
}
/*******************************
             Text
*******************************/
.content-area p,
.content-area li {
  font-size: @large;
}

// metadata sidebar p tags shouldn't be as large as content area p
.metadata-sidebar p,
.metadata-sidebar li {
  font-size: @medium;
}

#page-document,
#content {
  > h1.documentFirstHeading {
    position: relative;
    border-bottom: none;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;

    &:before {
      border-bottom: none;
    }
    @media only screen and (max-width: 1400px) {
      font-size: 2.2rem;
    }
  }

  > h3 {
    font-size: 1.125rem;
  }
}

/*-------------------
      COMMENTS
---------------------*/
#comment-add-id {
  .ui.raised.segments {
    box-shadow: none;
  }
}

.comment {
  .ui.raised.segments {
    box-shadow: none;
  }
}

/*-------------------
      FOOTER
--------------------*/

.first-footer,
.portal-footer {
  background: @blue !important;
}

.second-footer,
.portal-colophon {
  background: @white !important;
}

.portal-footer,
.portal-colophon {
  padding: 0 !important;
}

.section-header {
  margin: 0 0 0.83em 0 !important;
  font-size: 1.375em !important;
  line-height: 1.2em !important;
}

.portal-footer {
  font-size: 12px;

  .colophon-section {
    &:not(:first-child) {
      border-top: 1px solid rgba(255, 255, 255, 0.23);
    }
  }

  .section-centered {
    width: 100%;
    flex-basis: 100%;
    padding: 1.125rem 0;
    text-align: center;
  }

  h2,
  p,
  div,
  a {
    color: @white !important;
  }

  h2 {
    font-weight: bold !important;
  }
}

.column {
  @media screen and (min-width: 767px) {
    width: 100%;
  }
}

.first-footer {
  .media-centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
  }

  .social-media,
  .media {
    line-height: 1;
  }

  .social-media {
    display: flex;
    margin: 0 0.5em;
    @media screen and (max-width: 665px) {
      margin-bottom: 1em;
    }

    .link-plain.media i {
      font-size: 4em !important;
    }
  }

  .media {
    display: flex;
    align-items: center;

    i {
      font-size: 4em;
    }

    .media-body {
      margin-left: 0.5em;
      line-height: 1.8;
      text-align: left;
    }
  }

  :not(:last-child).mx-2 {
    @media screen and (max-width: 665px) {
      margin-bottom: 1.5em;
    }
  }

  .mx-2 {
    display: flex;
    align-items: center;
    margin: 0 2em;
    line-height: 1;

    i {
      margin-right: 0;
      font-size: 3em;
    }

    span {
      margin: 0 0 0 0.5em;
      line-height: 1.5;
      text-align: left;
    }
  }
}

.portal-colophon {
  a {
    color: @darkBlue;
    font-weight: bold;

    &:hover {
      color: @darkBlue;
    }
  }

  .colophon-section {
    padding: 1.125rem 0;
  }

  .europe-agency-text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: @lightGrey;
    font-size: 12px;
    font-weight: normal;

    span {
      margin: 0 1em;
    }
  }

  .eea-software-info {
    border-top: 1px solid rgba(0, 0, 0, 0.11);
    font-size: 11px;
  }

  .colophon-links {
    display: inline-block;
    margin: 0 1em 0.75em;
    font-size: @11px;
    @media screen and (max-width: 1023px) {
      width: 94%; /* 100% enlarged the content area beyond window area */
      text-align: center;
    }

    i.creative.commons {
      font-size: 12px;
    }
  }
}

.eu-flag {
  width: 60px;
  height: 38px;
}

/*-------------------
      PRINT RULES
--------------------*/

@media print {
  .ui.basic.segment.header-wrapper,
  .ui.secondary.vertical.segment.breadcrumbs,
  #page-document > p.block.image.align.center:first-child,
  .ui.content-area .ui.container.tags,
  .ui.segment.footer-wrapper,
  .metadata-btn-group,
  #comment-add-id,
  .comments,
  .card > .card__face.card__face--back {
    display: none;
  }

  .card.is-flipped > .card__face.card__face--front {
    display: none;
  }

  .card.is-flipped > .card__face.card__face--back {
    position: relative;
    display: block;
  }

  #page-document,
  #content {
    padding-right: 2rem;
    padding-left: 2rem;
    margin: 6rem 0 0 0 !important;
    color: @black;
    font-size: 14px;

    h1 {
      color: @grayPrint !important;
      font-size: 2rem !important;

      &:first-child {
        margin-bottom: 4rem;
      }
    }

    h1.documentFirstHeading + p {
      color: @grayPrint !important;
      font-size: 1rem;
      line-height: 1.7rem;
    }

    h2 {
      border-top: 1px solid @black !important;
      border-bottom: 1px solid @black !important;
      color: @black;
      font-size: 1.5rem;
    }

    h3 {
      color: @grayPrint !important;
      font-size: 1rem;
      line-height: 1.5rem;

      &:first-child {
        margin-bottom: 6rem;
      }
    }

    p > strong,
    li > strong {
      color: @black;
    }

    a,
    a > strong {
      color: @pureBlack !important;
      font-size: 14px;
    }

    ul {
      list-style-type: none;
    }
  }

  .ui.accordion {
    .title.accordion-title.align-arrow-left,
    .title.accordion-title.align-arrow-right {
      border-top: 1px solid #ddd !important;
      font-size: 1rem;

      svg {
        transform: rotate(90deg);
      }
    }

    .active.title.accordion-title.align-arrow-left,
    .active.title.accordion-title.align-arrow-right {
      border-top: 1px solid #ddd !important;
      font-size: 1rem;

      svg {
        transform: none;
      }
    }

    .content {
      display: block !important;

      > * {
        height: auto !important;
        margin-bottom: 0.5rem !important;
      }

      > * > * {
        display: block !important;
        opacity: 1 !important;
      }
    }
  }
}
