/*
 * MAK Store v3.15
 * Compact parent/child product models table on desktop/tablet.
 * Mobile keeps horizontal scrolling because all columns cannot remain readable
 * on a narrow phone screen.
 */

@media (min-width: 769px) {
  .mak-child-list .models-scroll {
    overflow-x: hidden;
  }

  .mak-child-list .models-table {
    width: 100%;
    min-width: 0;
  }

  .mak-child-list .models-head,
  .mak-child-list .model-row {
    width: 100%;
    min-width: 0 !important;
    grid-template-columns:
      minmax(48px, .72fr)
      minmax(0, 1.45fr)
      minmax(62px, .95fr)
      minmax(72px, .82fr)
      minmax(68px, .90fr)
      30px;
    column-gap: 6px;
  }

  .mak-child-list.models--two-attributes .models-head,
  .mak-child-list.models--two-attributes .model-row {
    width: 100%;
    min-width: 0 !important;
    grid-template-columns:
      minmax(46px, .68fr)
      minmax(0, 1.25fr)
      minmax(54px, .78fr)
      minmax(54px, .78fr)
      minmax(68px, .78fr)
      minmax(64px, .84fr)
      28px;
    column-gap: 5px;
  }

  .mak-child-list .models-head {
    font-size: 9px;
    line-height: 1.2;
  }

  .mak-child-list .model-row {
    font-size: 10px;
  }

  .mak-child-list .model-row strong {
    font-size: 10px;
    white-space: nowrap;
  }

  .mak-child-list .model-row em {
    white-space: nowrap;
  }

  .mak-child-list .models-head > span,
  .mak-child-list .model-row > span,
  .mak-child-list .model-row > strong,
  .mak-child-list .model-row > em {
    min-width: 0;
  }

  .mak-child-list .model-row button {
    width: 28px;
    height: 28px;
  }
}

/* On phones preserve the existing horizontal scroll instead of crushing text. */
@media (max-width: 768px) {
  .mak-child-list .models-scroll {
    overflow-x: auto;
  }
}
