/**
 * @file
 * Styles for Siteimprove Alfa Scan Button component.
 */

[data-component-id="siteimprove_accessibility:alfa_scan_button"] {
  &.floating-si {
    position: fixed;
    top: 15%;
    right: 10px;
    z-index: 999;
  }

  &.floating-si-border-wrap {
    border: 1px solid #ccc;
    background-color: #fff;
    filter: drop-shadow(-6px 5px 8px #ccc);
  }

  .alfa-scan-block-wrapper {
    .alfa-scan-button {
      all: unset;
    }

    .alfa-scan-button,
    .alfa-scan-report {
      display: flex;
      align-items: center;
      font-weight: bold;

      &.hidden {
        display: none;
      }

      .alfa-scan-close {
        cursor: pointer;
      }

      svg {
        margin-right: 10px;
        filter: drop-shadow(-6px 5px 8px #ccc);
      }
    }

    .alfa-scan-report {
      max-width: 300px;
      max-height: calc(100vh - 120px);
      overflow-y: auto;
    }

    .alfa-scan-button {
      cursor: pointer;

      &.preview-autoscan {
        display: none;
      }
    }

    .alfa-scan-report {
      display: none;
    }
  }

  .spr-heading-wrapper-flex {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    background-color: #0d4cd3;
    color: #fff;
    align-items: center;
  }

  .spr-wrapper {
    padding: 15px;
    margin-top: 20px;
  }

  .hidden {
    display: none;
  }

  .alfa-scan-throbber {
    width: 100px;
    height: 90px;

    .spinner {
      border: 8px solid #f3f3f3;
      border-top: 8px solid #007bff;
      border-radius: 50%;
      width: 60px;
      height: 60px;
      animation: spin 1s linear infinite;
      margin: 20px auto;
    }
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

}
