/* ==========================================================================
   Image List Component (.lm-image-list)
   Unsorted list with icon images and rich text content
   ========================================================================== */

/* ==========================================================================
   List Base
   ========================================================================== */

@layer utilities {
  .lm-image-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* ==========================================================================
    Row Layout Variant
    ========================================================================== */

  .lm-image-list.image-list--row {
    position: relative;
    display: grid;
    align-items: center;
    gap: 64px;
  }

  .lm-image-list.image-list--row .lm-image-list__item {
    margin-bottom: unset;
  }

  .lm-image-list.image-list--row .lm-image-list__item:last-of-type::before {
    content: "";
    position: absolute;
    display: block;
    height: 2px;
    width: 83%;
    background-color: var(--color-blue-bright);
    left: 50%;
    top: -38px;
    transform: translateX(-50%);
  }

  @media screen and (max-width: 768px) {
    .lm-image-list.image-list--row .lm-image-list__item:last-of-type {
      position: relative;
    }
  }

  @media screen and (min-width: 767px) {
    .lm-image-list.image-list--row {
      grid-template-columns: 1fr 1fr;  
    }
    .lm-image-list.image-list--row .lm-image-list__item:last-of-type::before {
      height: 100%;
      width: 2px;
      background-color: var(--color-blue-bright);
      left: 50%;
      top: 0;
      transform: translateX(-50%);
    }  
  }

  /* ==========================================================================
    List Item Base
    ========================================================================== */

  .lm-image-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-4, 1rem);
  }

  /* ==========================================================================
    Vertical Alignment Variants
    ========================================================================== */

  .lm-image-list__item--valign-center {
    align-items: center;
  }

  .lm-image-list__item--valign-top {
    align-items: flex-start;
  }

  /* ==========================================================================
    Gap Variants (margin-bottom after item)
    ========================================================================== */

  .lm-image-list__item--gap-2xs {
    margin-bottom: 12px;
  }

  .lm-image-list__item--gap-xs {
    margin-bottom: 16px;
  }

  .lm-image-list__item--gap-sm {
    margin-bottom: 20px;
  }

  .lm-image-list__item--gap-md {
    margin-bottom: 36px;
  }

  .lm-image-list__item--gap-lg {
    margin-bottom: 64px;
  }

  /* Remove margin from last item */
  .lm-image-list__item:last-child {
    @media (max-width: 767px) {
      margin-bottom: 0;
    }
  }

  /* ==========================================================================
    Icon Container
    ========================================================================== */

  .lm-image-list__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lm-image-list__icon-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
  }

  /* ==========================================================================
    Icon Size Variants
    ========================================================================== */

  .lm-image-list__item--icon-xs .lm-image-list__icon {
    width: 36px;
    min-width: 36px;
  }

  .lm-image-list__item--icon-xs .lm-image-list__icon-img {
    max-width: 36px;
    max-height: 36px;
  }

  .lm-image-list__item--icon-sm .lm-image-list__icon {
    width: 40px;
    min-width: 40px;
  }

  .lm-image-list__item--icon-sm .lm-image-list__icon-img {
    max-width: 40px;
    max-height: 40px;
  }

  .lm-image-list__item--icon-md-sm .lm-image-list__icon {
    width: 48px;
    min-width: 48px;
  }

  .lm-image-list__item--icon-md-sm .lm-image-list__icon-img {
    max-width: 48px;
    max-height: 48px;
  }


  .lm-image-list__item--icon-md .lm-image-list__icon {
    width: 56px;
    min-width: 56px;
  }

  .lm-image-list__item--icon-md .lm-image-list__icon-img {
    max-width: 56px;
    max-height: 56px;
  }

  .lm-image-list__item--icon-md .lm-image-list__icon {
    width: 68px;
    min-width: 68px;
  }

  .lm-image-list__item--icon-md-deep .lm-image-list__icon-img {
    max-width: 68px;
    max-height: 68px;
  }

  .lm-image-list__item--icon-lg .lm-image-list__icon {
    width: 72px;
    min-width: 72px;
  }

  .lm-image-list__item--icon-lg .lm-image-list__icon-img {
    max-width: 72px;
    max-height: 72px;
  }

  /* ==========================================================================
    Content Area
    ========================================================================== */

  .lm-image-list__content {
    flex: 1;
    min-width: 0;
    color: var(--color-black, #313131);
    font-size: var(--theme-font-size-base, 1rem);
    line-height: var(--theme-line-height-md, 1.2);
  }

  /* ==========================================================================
    Font Size Variants
    ========================================================================== */

  .lm-image-list--font-sm .lm-image-list__content {
    font-size: 18px;
    line-height: 1.2;
  }

  .lm-image-list--font-md .lm-image-list__content {
    font-size: 20px;
    line-height: 1.2;
  }

  /* Headings in content */
  .lm-image-list__content strong,
  .lm-image-list__content b {
    font-weight: 700;
  }

  /* Nested lists in content */
  .lm-image-list__content ul,
  .lm-image-list__content ol {
    margin: 0.5em 0 0 0;
    padding-left: 1.25em;
  }

  .lm-image-list__content li {
    margin-bottom: 0.25em;
  }

  .lm-image-list__content li::before {
    content: "•";              /* or an SVG via background-image */
    position: absolute;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: -16px;       /* adjust based on bullet size */
  }

  .lm-image-list__content li:last-child {
    margin-bottom: 0;
  }

  /* Links in content */
  .lm-image-list__content a {
    color: var(--color-blue, #0077c8);
    text-decoration: none;
    font-weight: 600;
  }

  .lm-image-list__content a:hover {
    text-decoration: underline;
  }

  /* Superscript references */
  /* .lm-image-list__content sup {
    font-size: 0.65em;
    vertical-align: super;
    line-height: 0;
  } */

  /* ==========================================================================
    Highlight Variant (light blue background)
    ========================================================================== */

  .lm-image-list__item--highlight {
    background-color: var(--color-blue-50, #e8f4fc);
    padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
    border-radius: var(--radius-lg, 12px);
  }

  /* Adjust spacing for highlighted items */
  .lm-image-list__item--highlight .lm-image-list__content {
    font-weight: 600;
    color: var(--color-navy, #003366);
  }

  /* ==========================================================================
    Responsive Adjustments
    ========================================================================== */

  @media (max-width: 640px) {
    .lm-image-list__item--icon-lg .lm-image-list__icon {
      width: 56px;
      min-width: 56px;
    }
    
    .lm-image-list__item--icon-lg .lm-image-list__icon-img {
      max-width: 56px;
      max-height: 56px;
    }
    
    .lm-image-list__item--gap-lg {
      margin-bottom: 48px;
    }
  }

  /* ==========================================================================
    Button Container
    ========================================================================== */

  /* .lm-image-list__button {
    margin-top: 0.25em;
  } */

  /* ==========================================================================
    Content Width Variants
    ========================================================================== */

  @media (min-width: 767px) {
    .lm-image-list__item--width-280 .lm-image-list__content {
      max-width: 280px;
    }

    .lm-image-list__item--width-360 .lm-image-list__content {
      max-width: 360px;
    }
  }
}