// base colors
$white: #fff !default;
$blue: #0d6efd !default;
$gray-100: #f8f9fa !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-600: #6c757d !default;
$gray-900: #212529 !default;
$black: #000 !default;

$primary: $blue !default; // "accept all" button and privacy policy link color
$secondary: $gray-600 !default; // "accept necessary" button color

// element colors
$link-hover-shade: 10% !default;
$body-bg: $white !default;
$body-color: $gray-900 !default;
$link-color: $primary !default;
$link-hover-color: darken($link-color, $link-hover-shade) !default;
$border-color: $gray-400 !default;
$light: $gray-100 !default;
$box-shadow-lg: 0 1rem 2rem rgba($black, .4) !default;
$layer-color: rgba(0, 0, 0, 0.5) !default; // the fullsize layer, when access is blocked

// metrics
$input-btn-padding-y: .375rem !default;
$input-btn-padding-x: .75rem !default;;
$btn-padding-y: $input-btn-padding-y !default;
$btn-padding-x: $input-btn-padding-x !default;

.cookie-consent-modal {
  padding-top: 0;
  position: fixed;
  width: auto;
  height: auto;
  z-index: 1000;
  font-family: sans-serif;

  .modal-content-wrap {
    position: fixed;
    bottom: 0;
    margin: 1rem;

    &.right {
      right: 0;
    }

    &.left {
      left: 0;
    }

    .modal-content {
      border: 1px solid $border-color;
      background-color: $light; // the modals background color
      color: $body-color; // the modals text color
      box-shadow: $box-shadow-lg; // the modals shadow
      padding: 0;
      // width: 95%;
      max-width: 700px;
      border-radius: 0.2rem;

      .modal-header {
        padding: 1rem;
        border-bottom: $border-color; // bootstrap-like lines

        h3 {
          margin: 0;
          font-size: 130%;
          font-weight: 500;
          position: relative;
          top: 0.2rem;
        }
      }

      .modal-body {
        padding: 1rem 1rem;
        line-height: 1.3;

        a {
          color: $primary;

          &:hover {
            color: $link-hover-color;
          }
        }
      }

      .modal-footer {
        padding: 1rem 0.5rem 0.5rem 0.5rem;
        // border-top: 1px solid rgba(0,0,0,0.1); // bootstrap-like lines

        .buttons {
          display: flex;
          justify-content: flex-end;
          flex-wrap: wrap;

          .btn {
            padding: $input-btn-padding-y $input-btn-padding-x;
            border: 1px solid $gray-900;
            border-radius: 0.2rem;
            margin-left: 0.5rem;
            margin-right: 0.5rem;
            margin-bottom: 0.5rem;
            font-size: 1rem;
            line-height: 1.5;

            // "accept all" button
            &.btn-primary {
              background-color: $primary;
              color: $white;
              border-color: $primary;

              &:hover {
                background-color: $link-hover-color;
                border-color: $link-hover-color;
              }
            }

            // "accept necessary" button
            &.btn-secondary {
              background-color: $secondary;
              color: $white;
              border-color: $secondary;

              &:hover {
                background-color: darken($secondary, 10%);
                border-color: darken($secondary, 10%);
              }
            }
          }
        }
      }
    }
  }

  @media screen and (max-width: 620px) {
    .btn {
      width: 100%;
    }
  }

  &.block-access {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.5); // the fullscreen background layer
    padding-top: 20vh; // modals vertical position in desktop mode
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    @media screen and (max-width: 620px) {
      padding-top: 0;
    }

    .modal-content-wrap {
      position: relative;
      margin: 2.5% auto;

      .modal-content {
        border: none;
        margin: 0 auto;
      }

      bottom: auto;
      width: 95%;
    }
  }
}
