/* v1.8.2 mobile detail layout guard.
   Keep CAD/IES actions in their own flow area so they never cover the drawing. */
@media (max-width: 900px) {
  .web-reference-sheet .reference-drawing-box {
    height: auto;
    min-height: 330px;
    padding: 48px 14px 14px;
    overflow: visible;
  }

  .web-reference-sheet .reference-drawing-media {
    height: 250px;
    min-height: 0;
    margin-bottom: 12px;
  }

  .web-reference-sheet .reference-drawing-media img {
    width: 100%;
    height: 100%;
    padding: 8px 10px 12px;
    object-fit: contain;
  }

  .web-reference-sheet .reference-cad-action {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .web-reference-sheet .reference-cad-action a,
  .web-reference-sheet .reference-cad-action span {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 7px 10px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .web-reference-sheet .reference-drawing-media {
    height: 225px;
  }

  .web-reference-sheet .reference-cad-action {
    grid-template-columns: 1fr;
  }
}
