@use "./material-fixes";
@use "./old-variables" as old-vars;
@import "~normalize.css/normalize.css";

@mixin stark-base() {
  html,
  body {
    height: 100%;
  }

  .stark-app {
    visibility: visible;
    /* class added by translate-cloak directive while loading translations */
    &.translate-cloak {
      visibility: hidden;
    }

    .stark-section {
      margin-bottom: 64px;
    }

    .mat-drawer {
      z-index: 120; /* z-index of header is 110. z-index of mat-drawer should be bigger */
    }

    .mat-drawer-content {
      z-index: initial; // fix safari not showing fixed header

      display: flex;
      flex-direction: column;

      overflow: auto;

      main.stark-main-container {
        flex: 1 0 auto;
        align-self: center;

        width: 100%;
        max-width: old-vars.$stark-max-content-width;

        box-sizing: border-box;
        padding: 64px 15px;
      }
    }
  }

  .stark-loading {
    margin: 16px auto;
    box-sizing: border-box;
    border-radius: 8px;
    text-align: center;
  }

  .stark-loading-icon {
    margin: 0 auto 8px auto;
    display: block;
    width: 64px;
    height: 64px;
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgeD0iMCIgeT0iMCIgdmlld0JveD0iMCAwIDUwIDUwIj48cGF0aCBmaWxsPSIjN2ZiYWUzIiBkPSJNMjUuMjUxLDYuNDYxYy0xMC4zMTgsMC0xOC42ODMsOC4zNjUtMTguNjgzLDE4LjY4M2g0LjA2OGMwLTguMDcxLDYuNTQzLTE0LjYxNSwxNC42MTUtMTQuNjE1VjYuNDYxeiI+PC9wYXRoPjwvc3ZnPg==");
    /*	Base64 created from SVG on this site: https://www.opinionatedgeek.com/codecs/base64encoder	and from this source:
      <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" x="0" y="0" viewBox="0 0 50 50"><path fill="#7fbae3" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"></path></svg>
      */
    fill: currentColor;
    transform-origin: 50% 50%;
    animation: spin 0.8s linear infinite;

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

  /* utility class to fill to max. size in flex systems */
  .flex-fill {
    flex: 1;
  }

  .stark-hide {
    display: none;
  }
}
