/*
 * Copyright 2018-2020 DITA (AM Consulting LLC)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Developed on behalf of: Bokbasen AS (https://www.bokbasen.no)
 * Licensed to: Bokbasen AS and CAST under one or more contributor license agreements.
 */

.error {
  position: sticky;
  z-index: 20;
  background-color: transparentize($ui-white, 0.125);
  color: $error-red;
  height: 100%;
  top: 0;
  text-align: center;
  width: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;

  .reader-icon {
    display: block;
    width: 3rem;
    height: 3rem;
    fill: $error-red;
    margin: 0 auto;
  }

  span {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    height: 100vh;
    justify-content: center;
    align-items: center;
  }

  button {
    color: $error-red;
    border: 1px solid $error-red;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1rem;

    + button {
      margin-left: 1rem;
    }
  }
}


[data-viewer-theme="sepia"] {
  .error {
    background-color: transparentize($sepia-bg, 0.125);

    button {
      background-color: $ui-white;
      color: $error-red;
      border: 1px solid $error-red;
    }
  }
}

[data-viewer-theme="night"] {
  .error {
    background-color: transparentize($night-bg, 0.125);

    button {
      background-color: lighten($night-bg, 10%);
      color: $error-red;
      border: 1px solid $error-red;
    }
  }
}
