/**
 * SaasRole 角色管理组件样式
 */
.saas-role {
  height: 100%;
  width: 100%;
  overflow: hidden;

  &-layout {
    height: 100%;
  }

  /**
   * 左侧角色列表区域
   */
  &-sider {
    background: transparent;
    border-right: 1px solid #e8e8e8;
    height: 100%;
    overflow: hidden;
    padding: 24px 16px;

    > div {
      display: flex;
      flex-direction: column;
      height: 100%;
      gap: 16px;
    }
  }

  &-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #262626;
    }

    .ant-btn {
      height: 32px;
    }
  }

  &-list {
    flex: 1;
    overflow-y: auto;

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #d9d9d9;
      border-radius: 3px;

      &:hover {
        background: #bfbfbf;
      }
    }
  }

  /**
   * 角色卡片
   */
  &-card {
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
      border-color: var(--theme-color, #7f56d9);
      box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
    }

    &-selected {
      background: var(--theme-color-light, #f5f3ff);
      border-color: var(--theme-color, #7f56d9);
      box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
    }

    .pisell-lowcode-card-body {
      padding: 16px;
      display: flex;
      align-self: start;
    }

    &-content {
      user-select: none;
      flex: 1;
      overflow: hidden;
    }

    &-title {
      margin: 0 0 4px 0;
      font-size: 14px;
      font-weight: 600;
      color: #262626;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    &-count {
      margin: 0;
      font-size: 12px;
      color: #8c8c8c;
    }
  }

  /**
   * 右侧内容区域
   */
  &-content {
    background: transparent;
    padding: 24px;
    height: 100%;
    overflow: auto;
  }

  &-empty {
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
  }

  /**
   * 角色详情
   */
  &-detail {
    background: #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    padding: 24px;

    &-header {
      margin-bottom: 16px;
      padding-bottom: 16px;
      border-bottom: 2px solid #e8e8e8;
    }

    &-title {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;

      h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        color: #262626;
      }
    }

    &-description {
      margin: 0;
      font-size: 14px;
      color: #8c8c8c;
      line-height: 1.5;
    }

    .pisell-lowcode-tabs-nav {
      &::before {
        display: none;
      }
    }
  }

  /**
   * 成员列表
   */
  &-members {
    height: 100%;
    display: flex;
    flex-direction: column;

    &-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      gap: 16px;
    }
  }
}
