@import 'variables';
@import 'fonts';

html,
body {
  margin: 0;
  padding: 0;
  position: relative;
  background: white;
  @include font-sans-regular;
  color: $brand-text--dark;
}

#root {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.iframe-container {
  flex: 1 1 auto;
  position: relative;
}

p.not-available {
  flex: 1 1 auto;
  text-align: center;
  margin: 0;
  padding-top: 40vh;
}

iframe {
  border: 0;
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
}

footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border-top: 1px solid $dark-accent--medium;

  .logo {
    display: block;
    margin: 1rem;
    line-height: 0;
  }

  .metadata {
    flex: 1 1 auto; // take up all space, to right-align embed button
    line-height: 1;

    h1 {
      font: inherit;
      font-size: 1rem;
      margin: 0;

      a {
        color: inherit;
        text-decoration: none;
        &:hover {
          color: $link-hover-success;
        }
      }
    }

    ul {
      font: inherit;
      margin: 0.5rem 0 0;
      padding: 0;
      list-style: none;
      font-size: 0.8rem;
      color: $brand-text--medium;
    }

    li {
      display: inline;
      margin: 0;
      padding: 0;

      &:not(:first-child)::before {
        // add " - " in between items
        content: '-';
        padding: 0 0.5rem;
      }
    }
  }

  button[name='embed'] {
    margin: 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid $light-gray;
    background: white;
    line-height: 0;
    padding: 0.5rem;

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

.embed-share-links {
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  .embed-share-links--list {
    padding: 0;
    margin: 0;
    li {
      display: inline-block;
    }
  }

  .code-snippet {
    padding: 1.5rem;
    border-radius: 3px;
    background-color: white;
    width: 75%;
    display: flex;
    justify-content: center;
    font-size: 1.5rem;
    margin-top: 1rem;
    .embed--share-code {
      color: $brand-workspace;
    }
  }
}

.embed-overlay {
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  &.open {
    display: flex;
  }
}

.not-available {
}
