@import 'normalize.scss';
@import 'paper.scss';
@import 'milligram.scss';

a {
  color: #000;
}

.signature-pad {
  position: relative;
  margin: 1em 0;
  height: 130px;
  border: 2px dashed #057986;
  border-radius: 5px;
  background: rgba(05, 121, 134, 0.05);

  canvas {
    width: 100%;
    height: 130px;
    position: relative;
  }

  &:before {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    line-height: 130px;
    content: 'Sign here';
    text-align: center;
    opacity: 0.1;
    font-size: 50px;
  }
}

.signature-pad-submit {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 210mm;
  margin: 0 auto;

  button {
    display: block;
    border-radius: 5px;
    background: #057986;
    color: #fff;
    text-transform: uppercase;
    width: 50%;
    height: 64px;
    line-height: 64px;
    padding: 0;
    text-align: center;
    border: none;
    outline: none;
    cursor: pointer;
    margin: 0;
    font-weight: bold;
    font-size: 20px;

    &:first-child {
      margin-right: 20px;
      background: rgba(5, 121, 134,0.5);
    }

    &:last-child {
      margin-left: 20px;
    }
  }
}

.print {
  .signature-pad {
    background: none;
    border: none;
    height: 65px;

    canvas {
      width: 50%;
      height: 65px;
    }

    &:before {
      display: none;
    }
  }
}

.loading {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #e0e0e0;
  z-index: 1000;
  display: none;
}

.spinner {
  height: 18px;
  width: 70px;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -9px -35px;

  div {
    width: 18px;
    height: 18px;
    background-color: #057986;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
  }

  .bounce1 {
    animation-delay: -0.32s;
  }

  .bounce2 {
    animation-delay: -0.16s;
  }
}

@keyframes sk-bouncedelay {
  0%, 80%, 100% {
    -webkit-transform: scale(0);
    transform: scale(0);
  } 40% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
  }
}

.loaded {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #e0e0e0;
  z-index: 1001;
  display: none;

  &-content {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .icon {
      width: 60px;
      height: 60px;
      background: url(../images/icon-active.svg) no-repeat center;
      background-size: cover;
      margin: 0 0 2em 0;
    }

    a {
      text-decoration: underline;
      color: #057986;
    }
  }
}
