/* ==========================================================================
   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-center:not(.md\:flex-col) {
    @media (min-width: 768px) {
      align-items: stretch;
    }
  }

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

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

  .lm-image-list__item--gap-none {
    margin-bottom: 0;
  }

  .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 {
    margin-bottom: 0;
  }

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

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

  .lm-image-list__item--icon-right .lm-image-list__item--themed .lm-image-list__icon {
    z-index: 0;
  }

  .lm-image-list__icon-img {
    display: block;
    width: auto;
    height: auto;
    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 .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;
  }

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

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

  /* Extra Large (120px) */
  .lm-image-list__item--icon-xl .lm-image-list__icon {
    width: 120px;
    min-width: 120px;
  }

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

  /* 2XL (140px) */
  .lm-image-list__item--icon-2xl .lm-image-list__icon {
    width: 140px;
    min-width: 140px;
  }

  .lm-image-list__item--icon-2xl .lm-image-list__icon-img {
    max-width: 140px;
    max-height: 140px;
  }

  /* 3XL (148px) */
  .lm-image-list__item--icon-3xl .lm-image-list__icon {
    width: 148px;
    min-width: 148px;
  }

  .lm-image-list__item--icon-3xl .lm-image-list__icon-img {
    max-width: 148px;
    max-height: 148px;
  }

  /* 4XL (184px) */
  .lm-image-list__item--icon-4xl .lm-image-list__icon {
    width: 184px;
    min-width: 184px;
  }

  .lm-image-list__item--icon-4xl .lm-image-list__icon-img {
    max-width: 184px;
    max-height: 184px;
  }

  @media screen and (max-width: 767px) {
    .lm-image-list__item--icon-xl .lm-image-list__icon {
      width: 88px;
      min-width: 88px;
    }

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

    .lm-image-list__item--icon-2xl .lm-image-list__icon {
      width: 120px;
      min-width: 120px;
    }

    .lm-image-list__item--icon-2xl .lm-image-list__icon-img {
      max-width: 120px;
      max-height: 120px;
    }

    .lm-image-list__item--icon-3xl .lm-image-list__icon {
      width: 128px;
      min-width: 128px;
    }

    .lm-image-list__item--icon-3xl .lm-image-list__icon-img {
      max-width: 128px;
      max-height: 128px;
    }

    .lm-image-list__item--icon-4xl .lm-image-list__icon {
      width: 164px;
      min-width: 164px;
    }

    .lm-image-list__item--icon-4xl .lm-image-list__icon-img {
      max-width: 164px;
      max-height: 164px;
    }
  }

  /* ==========================================================================
    Icon Right (inverted position)
    ========================================================================== */

  .lm-image-list__item--icon-right {
    flex-direction: row-reverse;
  }

  @media screen and (min-width: 768px) {
    .lm-image-list__item--icon-right .lm-image-list__content.lm-image-list__item--themed {
      padding: 40px 60px 40px 40px;
      margin-right: -60px;
    }
  }

  @media screen and (max-width: 767px) {
    .lm-image-list__item:has(.lm-image-list__item--themed) {
      flex-direction: column;
      gap: 0;
    }
  }

  /* ==========================================================================
    Theme Variants (round-box backgrounds)
    ========================================================================== */

  .lm-image-list__item--themed {
    border-radius: 20px;
    z-index: 0;
  }

   .lm-image-list__item:not(.lm-image-list__item--icon-right) .lm-image-list__content.lm-image-list__item--themed {
    padding: 20px 28px 20px 60px;
    margin-left: -60px;
  }

  @media screen and (max-width: 767px) {
    .lm-image-list__item:not(.lm-image-list__item--icon-right) .lm-image-list__content.lm-image-list__item--themed,
    .lm-image-list__item.lm-image-list__item--icon-right .lm-image-list__content.lm-image-list__item--themed,
    .lm-image-list__item--content-extra-classes .lm-image-list__content.lm-image-list__item--themed {
      padding: 60px 20px 40px;
      margin-left: 0;
      margin-top: -40px;
    }

    .lm-image-list__item--icon-4xl .lm-image-list__icon{
      max-width: 120px;
      max-height: 120px;
    }

    .lm-image-list__item--icon-4xl .lm-image-list__icon img {
      max-width: 120px;
      height: auto;
    }
  }
  /* ==========================================================================
    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-sm, 1.2);
    display: flex;
    align-items: center;
  }

  /* ==========================================================================
    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 {
    text-decoration: underline;
    font-weight: 400;
  }

  .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;
    }

    .lm-image-list__item--icon-md-deep.lm-image-list__item--icon-responsive .lm-image-list__icon-img {
      width: 60px;
      min-width: 60px;
    }

    .lm-image-list__item--icon-lg-deep.lm-image-list__item--icon-responsive .lm-image-list__icon {
      min-width: 80px;
      max-width: 80px;
      max-height: 80px;
    }

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

  /* ==========================================================================
    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;
    }
  }
}