@use "@styles/mixins/bem" as *;
@use "@styles/mixins/function" as *;
@use "@styles/mixins/namespace" as *;

@include b(layout-mode) {
  @include e(item) {
    position: relative;
    width: calc(100% / 3 - 10px);
    cursor: pointer;

    @include e(box) {
      height: 55px;
      padding: 6px;
      border-radius: 8px;
      box-shadow: 0 2px 8px 0 cssVar(gray-400);
      transition: box-shadow cssVar(transition-duration-fast);

      &:hover {
        box-shadow: 0 2px 8px 0 cssVar(gray-600);
      }

      @include is(active) {
        box-shadow: 0 0 0 2px cssVar(color-primary) !important;
      }

      .dark {
        background-color: cssVar(color-primary);
        border-radius: 3px;
      }

      .light {
        background-color: cssVarEl(color-primary-light-5);
        border-radius: 3px;
      }

      .content {
        background-color: cssVarEl(color-primary-light-8);
        border: 1px dashed cssVar(color-primary);
        border-radius: 3px;
      }
    }
  }

  @include m(icon) {
    position: absolute;
    top: 30px;
    right: 10px;
    color: cssVar(color-primary);
    transition: all cssVar(transition-duration-fast);
  }

  @include m(name) {
    margin: 10px 0;
    font-size: 14px;
    text-align: center;
  }

  @include joins(vertical) {
    display: flex;
    justify-content: space-between;

    .dark {
      width: 20%;
    }

    .container {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 72%;

      .light {
        height: 20%;
      }

      .content {
        height: 67%;
      }
    }
  }

  @include joins(classic) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .dark {
      height: 22%;
    }

    .container {
      display: flex;
      justify-content: space-between;
      height: 70%;

      .light {
        width: 20%;
      }

      .content {
        width: 70%;
      }
    }
  }

  @include joins(horizontal) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .dark {
      height: 20%;
    }

    .content {
      height: 67%;
    }
  }

  @include joins(columns) {
    display: flex;
    justify-content: space-between;

    .dark {
      width: 14%;
    }

    .light {
      width: 17%;
    }

    .content {
      width: 55%;
    }
  }

  @include joins(mixins) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .dark {
      height: 22%;
    }

    .container {
      display: flex;
      justify-content: space-between;
      height: 70%;

      .dark {
        width: 20%;
        height: 100%;
      }

      .content {
        width: 70%;
      }
    }
  }

  @include joins(iframe) {
    display: flex;
    justify-content: space-between;

    .dark {
      width: 22%;
    }

    .content {
      width: 70%;
    }
  }
}
