/*
 * QrCode: a square filling its host's width, with zag's SVG frame scaled to fit (its viewBox keeps the modules
 * square). The pattern takes the current text colour, so the host sets the colour and the ground stays transparent.
 * An overlay icon sits on the code's own ground colour, a fifth of its width, inside what the error correction covers.
 */

@layer dx-components {
  .dx-qr-code {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    min-width: 0;
  }

  .dx-qr-code-frame {
    display: block;
    width: 100%;
    height: 100%;
  }

  .dx-qr-code-pattern {
    fill: currentColor;
  }

  .dx-qr-code-overlay {
    display: grid;
    place-items: center;
    width: 20%;
    aspect-ratio: 1;
    border-radius: var(--radius-md, 0.375rem);
    background: var(--color-base-surface);
  }
  .dx-qr-code-overlay > .dx-icon {
    width: 70%;
    height: 70%;
  }
}
