/* Keep square QR codes square while allowing uploaded contact cards to keep their ratio. */
.advisor-qr {
  grid-template-columns: minmax(170px, 240px) 1fr;
}

.advisor-qr-frame {
  width: 100%;
  min-height: 170px;
  aspect-ratio: auto;
  height: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.advisor-qr-frame:has(img:not([hidden])) {
  min-height: 0;
}

.advisor-qr-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .advisor-qr {
    grid-template-columns: minmax(140px, 200px) 1fr;
  }

  .advisor-qr-frame {
    max-width: 200px;
  }
}

@media (max-width: 540px) {
  .advisor-qr-frame {
    width: min(100%, 240px);
    max-width: none;
  }
}
