@import '~@payloadcms/ui/scss';

@layer payload-default {
  .feature-card {
    background: var(--theme-elevation-150);
    width: 100%;
    min-height: base(4);
    position: relative;
    transition-property: border, box-shadow, background;
    transition-duration: 100ms;
    transition-timing-function: cubic-bezier(0, 0.2, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: start;
    gap: base(1.5);
    border-radius: var(--style-radius-s);
    border: 1px solid var(--theme-elevation-150);
    padding: 32px 32px;

    &__title {
      @extend %h5;
      letter-spacing: 0;
      font-weight: 600;
      line-height: base(0.8);
      width: 100%;
      margin: base(0.1) 0;
      font-size: base(0.8);
      color: var(--theme-elevation-700);
    }

    &__actions {
      position: relative;
      z-index: 2;
      display: inline-flex;
      .btn {
        margin: 0;
        flex-shrink: 0;
      }

      .btn__icon {
        border: 1px solid var(--theme-border-color);
        transition-property: border, box-shadow, color, background;
        transition-duration: 100ms;
        transition-timing-function: cubic-bezier(0, 0.2, 0.2, 1);

        &:hover {
          border: 1px solid var(--theme-elevation-500);
          background-color: var(--theme-elevation-0);
          color: currentColor;
          @include shadow-sm;
        }
      }
    }

    &--has-onclick {
      cursor: pointer;

      &:hover {
        border: 1px solid var(--theme-elevation-250);
        box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.05);
      }
    }

    &__click {
      z-index: 1;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      position: absolute;
      margin: 0;
    }

    &__count {
      font-weight: 400;
    }
  }
}