/**
 * trust-marks.css
 */

/* Component: Trust Marks */
.trust-marks {
  position: relative;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--border-radius-default);
  background: var(--color-white-dark);

  /* Positioned with a z-index, so the text always paints above the image it may overlap. */
  .trust-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;

    .trust-item {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--color-grey-dark);
      font-size: var(--font-size-small);

      &::before {
        content: '';
        flex: none;
        width: 20px;
        height: 20px;
        background: var(--color-green);
        mask: url('../../images/icons/icon-check-48x48.png') no-repeat center / contain;
        -webkit-mask: url('../../images/icons/icon-check-48x48.png') no-repeat center / contain;
      }

      strong {
        color: var(--color-black-light);
        font-weight: 700;
      }
    }
  }

  .trust-image {
    position: absolute;
    z-index: 0;
    bottom: 0;
    right: 0;
    height: calc(100% + 16px);
    width: auto;
    max-width: 30%;
    aspect-ratio: 1 / 1;
    border-radius: 0 0 var(--border-radius-default) 0;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;

    .trust-photo {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: right bottom;
    }
  }
}

/* Component: Trust Marks Payments */
.trust-pay {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  list-style: none;

  .trust-pay-item {
    position: relative;
    display: flex;
    margin: 0;
    border-radius: 4px;
    overflow: hidden;

    /* An image cannot carry an inset border, so an overlay draws it above the icon. Semi-transparent black stays a darker shade of whatever sits behind the icon. */
    &::after {
      content: '';
      position: absolute;
      inset: 0;
      border: 1px solid var(--color-black-transparent);
      border-radius: 4px;
      pointer-events: none;
    }

    .trust-pay-icon {
      display: block;
      height: 24px;
      width: auto;
      border-radius: 4px;
    }
  }
}

/* Mobile: Trust Marks */
@media (max-width: 767px) {
  .trust-marks .trust-image {
    right: 0;
  }
}
