@use 'mixins/amixin' as *;
.feature-cover {
  &:before {
    content: '';
    height: 16px;
    left: 10px;
    position: absolute;
    top: 16px;
    width: 1px;
    z-index: 1;
    opacity: 0;
    background-color: var(--mat-sys-background);
    @include transition(all, 0.4s, ease);
  }
  &:after {
    content: '';
    height: 1px;
    left: 10px;
    position: absolute;
    top: 16px;
    width: 16px;
    opacity: 0;
    background-color: var(--mat-sys-background);
    @include transition(all, 0.4s, ease);
  }
  .feature-inner {
    &:before {
      content: '';
      height: 16px;
      right: 10px;
      position: absolute;
      bottom: 16px;
      width: 1px;
      z-index: 1;
      opacity: 0;
      background-color: var(--mat-sys-background);
      @include transition(all, 0.4s, ease);
    }
    &:after {
      content: '';
      height: 1px;
      right: 10px;
      position: absolute;
      bottom: 16px;
      width: 16px;
      opacity: 0;
      background-color: var(--mat-sys-background);
      @include transition(all, 0.4s, ease);
    }
  }
  .btns {
    .mat-icon {
      line-height: 40px;
    }
    @include middle-center();
    > a {
      @apply flex justify-center items-center h-10 w-10 text-base;
      line-height: 40px;
      transform: scale(0);
      @include transition(all, 0.4s, ease);
      @include border-radius(3px, 3px, 3px, 3px);
      margin-right: 10px;
      background-color: var(--mat-sys-background);
      color: var(--mat-sys-primary);
      &:last-child {
        @apply mr-0;
      }
      &.icon-link {
        background: rgba(0, 0, 0, 0.8);
        color: var(--mat-sys-on-primary);
      }
    }
  }
  .feature-inner-ling {
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
    &:before {
      content: '';
      height: 100%;
      left: -15%;
      position: absolute;
      top: 0;
      width: 130%;
      box-shadow: 0px -5px 3px rgba(0, 0, 0, 0.1) inset;
      @include transition(all, 0.4s, ease);
    }
    &:after {
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      content: '';
      opacity: 0;
      background: var(--mat-sys-primary);
      @include transition(all, 0.4s, ease);
    }
    .media {
      background-color: var(--mat-sys-background);
    }
    .title {
      color: var(--mat-sys-on-primary);
      @include transition(all, 0.4s, ease);
    }
  }
  &:hover {
    &:before,
    &:after {
      opacity: 1;
      @include transition(all, 0.4s, ease);
    }
    .feature-inner {
      &:before,
      &:after {
        opacity: 1;
        @include transition(all, 0.4s, ease);
      }
    }
    .feature-inner-ling {
      .title {
        opacity: 1;
        z-index: 10;
        @include transition(all, 0.4s, ease);
      }
    }
    .btns {
      > a {
        transform: scale(0);
        @include transition(all, 0.4s, ease);
        &:not([class*='download']):hover {
          z-index: 1;
          @include transform(45deg, 1.2, 0, 0);
          @include transition(all, 0.4s, ease);
        }
      }
    }
    .feature-inner-ling:after {
      opacity: 0.8;
      @include transition(all, 0.4s, ease);
    }
  }
}
img {
  @apply w-full h-auto;
}

.feature-float {
  .btns {
    @apply absolute right-[10px] top-[10px] z-10 flex flex-col opacity-0;
    transition: all 0.5s ease;
    transform: translateX(100px);
    .btn {
      @apply h-9 w-9 rounded-full flex justify-center items-center box-border;
      transition: all 0.3s;
      font-weight: 600;
      padding: 0.375rem 0.75rem;
      margin-bottom: 0.8rem;
      ::ng-deep {
        .mat-icon {
          height: 16px !important;
          width: 16px !important;
          font-size: 16px !important;
          line-height: 16px !important;
        }
      }
    }
    .btn-full {
      color: var(--mat-sys-primary);
      border: 1px solid var(--mat-sys-primary-fixed-dim);
      background-color: var(--mat-sys-primary-fixed);
      box-shadow: var(--mat-sys-level1);

      &:hover {
        background-color: var(--mat-sys-primary);
        color: var(--mat-sys-on-primary);
      }
    }

    .btn-open {
      color: var(--mat-sys-error-container);
      border: 1px solid var(--mat-sys-error);
      background-color: var(--mat-sys-error-container);
      box-shadow: var(--mat-sys-level1);

      &:hover {
        background-color: var(--mat-sys-error-container);
        color: var(--mat-sys-on-primary);
      }
    }
  }
  .title {
    @apply absolute bottom-0 text-center block box-border left-1/2 text-xs rounded-xl w-auto opacity-0;
    transform: translateX(-50%);
    background-color: var(--mat-sys-surface-dim);
    color: var(--mat-sys-on-primary);
    @include transition(all, 0.4s, ease);
  }
  &:hover {
    .btns {
      @apply opacity-100;
      transform: translateX(0px);
    }
    .feature-inner-ling {
      .title {
        @apply opacity-100 z-10 bottom-[2px];
        @include transition(all, 0.4s, ease);
      }
    }
  }
}
