@import '../../../styles/core.scss';

.TutorialCard {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  color: get('color' slate);
  display: inline-flex;
  flex-direction: column;
  line-height: 1.5;
  max-width: 360px;
  min-width: 340px;
  position: relative;

  &_unpublished {
    background: #f8f8f8;
  }

  &-Status {
    align-items: center;
    background: get('color' slate);
    border-radius: 25px;
    color: #fff;
    display: flex;
    font-size: 12px;
    font-weight: 600;
    height: 25px;
    right: 10px;
    padding: 0 8px;
    position: absolute;
    top: 10px;

    &-Icon {
      margin-right: 3px;
    }
  }

  &-Top {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 20px;
  }

  &-Avatar {
    margin-bottom: 15px;
  }

  &-Title {
    font-size: 16px;
    font-weight: 600;
  }

  &-Description {
    font-size: 14px;
    margin-right: 40px;
    margin-top: 5px;
  }

  &-Steps {
    color: get('color' shale);
    flex: 1 1 auto;
    font-size: 14px;
    margin-top: 10px;
  }

  &-Button {
    background: var(--project-color-primary, get(color 'blue'));
    margin-top: 15px;
  }

  &-Toolbar {
    align-items: center;
    background: #f8f8f8;
    border-radius: 0 0 6px 6px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    height: 40px;
    justify-content: center;

    &:empty {
      display: none;
    }

    &-Button,
    &-Arrow {
      align-items: center;
      background: none;
      border: 0;
      color: get('color' graphite);
      cursor: pointer;
      display: flex;
      font-family: inherit;
      font-weight: 600;
      padding: 0 8px;
      position: relative;

      &:focus {
        outline: none;
      }

      &:disabled {
        color: rgba(get('color' graphite), 0.5);
        cursor: not-allowed;
      }

      + .TutorialCard-Toolbar-Button {
        margin-left: 4px;

        &::before {
          background: #c4c4c4;
          border-radius: 4px;
          content: '';
          display: block;
          height: 4px;
          left: -4px;
          position: absolute;
          width: 4px;
        }
      }
    }

    &-Button {
      font-size: 13px;
      text-decoration: underline;

      &:not(:disabled):hover,
      &:not(:disabled):active,
      &:not(:disabled):focus {
        text-decoration: none;
      }

      &_red {
        color: #e95f6a;

        &:disabled {
          color: rgba(#e95f6a, 0.5);
        }
      }
    }

    &-Arrow {
      font-size: 11px;
      opacity: 0.9;
      text-decoration: none;

      &:not(:disabled):hover,
      &:not(:disabled):active,
      &:not(:disabled):focus {
        opacity: 1;
      }
    }
  }
}
