.nut-theme-dark {
  .nut-grid-item {
    &__content {
      color: $dark-color;
      background: $dark-background;
      border: 0 solid $dark-background2;
    }

    &__text {
      color: $dark-color;
    }
  }
}

.nut-grid-item {
  position: relative;
  box-sizing: border-box;

  $block: &;

  &__text {
    margin: $grid-item-text-margin 0 0 0;
    font-size: $grid-item-text-font-size;
    line-height: 1.5;
    color: $grid-item-text-color;
    word-break: break-all;
  }

  &__content {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: $grid-item-content-padding;
    background: $grid-item-content-bg-color;
    border: 0 solid $grid-border-color;

    &--border {
      border-right-width: 1px;
      border-bottom-width: 1px;
    }

    &--surround {
      border-top-width: 1px;
      border-left-width: 1px;
    }

    &--center {
      align-items: center;
      justify-content: center;
    }

    &--square {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
    }

    &--reverse {
      flex-direction: column-reverse;

      #{$block}__text {
        margin: 0 0 $grid-item-text-margin;
      }
    }

    &--horizontal {
      flex-direction: row;

      #{$block}__text {
        margin: 0 0 0 $grid-item-text-margin;
      }
    }

    &--horizontal#{&}--reverse {
      flex-direction: row-reverse;

      #{$block}__text {
        margin: 0 $grid-item-text-margin 0 0;
      }
    }

    &--clickable {
      cursor: pointer;

      &::before {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        content: "";
        background-color: $black;
        border: inherit;
        border-color: $black;
        border-radius: inherit;
        opacity: 0;
        transform: translate(-50%, -50%);
      }

      &:active::before {
        opacity: 0.1;
      }
    }
  }
}
