@import "./hairline.less";

.fxm-grid {

  .fxm-flexbox:nth-child(2) {
    padding-top: 10px;
  }

  .fxm-flexbox {

    background: unset !important;

    .fxm-flexbox-item {
      margin-left: 0;

      &.fxm-grid-item {
        position: relative;
      }

      &.fxm-grid-item-active {
        .fxm-grid-item-content {
          background-color: #ddd;
        }
      }

      .fxm-grid-item-content {
        text-align: center;
        width: 100%;
        height: 100%;
        padding: unset !important;
        // padding: 24px 0;

        .fxm-grid-item-inner-content {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;

          .fxm-grid-icon {
            max-width: 100%;
          }

          .fxm-grid-text {
            margin-top: 8px;
            font-size: 12px;
            color: #262626;
            text-align: center;
          }

          &.column-num-3 {
            .fxm-grid-text {
              font-size: 16px;
            }
          }

          &.column-num-2 {
            .fxm-grid-text {
              margin-top: 24px;
              font-size: 18px;
            }
          }
        }
      }
    }
  }

  &.fxm-grid-line {
    position: relative;

    &:not(.fxm-grid-carousel) {
      .hairline('top');
      .hairline('right');
    }

    .fxm-flexbox {
      position: relative;
      .hairline('bottom');

      .fxm-flexbox-item {
        position: relative;

        &:first-child {
          .hairline('left');
        }

        &:not(:last-child) {
          .hairline('right');
        }
      }
    }

    &.fxm-grid-carousel {
      .fxm-grid-carousel-page {
        .hairline('top');
        .hairline('right');
      }
    }
  }

  .fxm-carousel {
    .fxm-carousel-wrap-dot>span {
      background: #dcdee3;
    }

    .fxm-carousel-wrap-dot-active>span {
      background: #0ae;
    }
  }

  &.fxm-grid-square {
    .fxm-grid-item {
      &:before {
        display: block;
        content: ' ';
        padding-bottom: 100%;
      }

      .fxm-grid-item-content {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
      }

      .fxm-grid-item-inner-content {
        height: 100%;

        .fxm-grid-icon {
          margin-top: 8px;
          width: 28% !important;
        }
      }
    }
  }

  &.fxm-grid-hasDecorator {
    padding-bottom: 15px;
  }
}
