@import "../../pretixbase/scss/_contrast.scss";

h1, .h1,
h2, .h2,
h3, .h3 {
  margin-top: 2.25 * $line-height-computed;
  margin-bottom: 0.75 * $line-height-computed;
}

.page-header {
  position: relative;
  padding-bottom: 9px;
  margin-top: 20px;

  h1 {
    margin: 0;
  }
  h1 small {
    white-space: nowrap;
  }
  .loginbox {
    padding-top: 15px;
  }
  .event-logo, .organizer-logo {
    max-width: 100%;
    height: auto;
  }
}
.pager-header-with-logo a {
  display: inline-block;
}

.main-box {
  background: $main-box-bg;
}

.page-header-links > div.header-part {
  padding-top: 15px;

  a:link, a:visited {
    color: choose-contrast-color($body-bg, white, $link-color);
  }
  a:active, a:hover, a:focus {
    color: choose-contrast-color($body-bg, white, $link-hover-color);
  }
}

.page-header-links-outside > div.header-part {
  padding-bottom: 15px;
}

.page-header.logo-large {

  img {
    width: 100%;
  }

  .loginbox {
    text-align: right;
    padding: 10px;
    html.rtl & {
      text-align: left;
    }
  }

  border-bottom: none;
}

h2.content-header {
  margin-top: 0;
}

@media (max-width: $screen-xs-max) {
  .page-header.logo-large {
    margin-left: -15px;
    margin-right: -15px;
    margin-top: 0;
  }
  h2.content-header small {
    display: block;
  }
}
@media (min-width: $screen-sm-min) {
  .main-box {
    @if ($body-bg != #FFFFFF) {
      margin: 20px auto;
      padding-left: 25px;
      padding-right: 25px;
      border-radius: $border-radius-large;
    }
  }
  .page-header-links-outside {
    @if ($body-bg != #FFFFFF) {
      padding-left: 0;
      padding-right: 0;
    }
  }
  .page-header-links > div.header-part {
    @if ($body-bg != #FFFFFF) {
      padding: 10px 0;
      margin-bottom: -20px;
    }
  }

  .page-header.logo-large {
    margin-top: 0;

    @if ($body-bg != #FFFFFF) {
      margin-left: -25px;
      margin-right: -25px;
    }

    img {
      @if ($body-bg != #FFFFFF) {
        border-top-right-radius: $border-radius-large;
        border-top-left-radius: $border-radius-large;
      }
    }
  }

  .page-header .loginbox {
    padding-top: 0;
  }
}

footer {
  @if ($body-bg != #FFFFFF) {
    padding-bottom: 0;
  }
}

.label-success-warning {
  @include label-variant($label-success-bg);

  padding-left: 2.5em;
  position: relative;
  &::before {
    font-family: FontAwesome;
    text-rendering: auto;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    color: white;
    content: $fa-var-exclamation;
    background: $label-warning-bg;

    display: block;

    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2em;

    padding-top: .5em;
    text-align: center;

    border-top-left-radius: .25em;
    border-bottom-left-radius: .25em;
  }
}
