/*
 * Remote access (Einstellungen › Fernzugriff, pages/settings/remote-section.js).
 * Reads tokens only; touch targets from --touch-min; nothing below 13 px.
 *
 * The QR code is always dark on white, also at night: a phone's camera
 * reads the standard's dark-on-light reliably, an inverted code not on
 * every phone. The white ground carries the code's own quiet zone. Its
 * shapes (dots, round cores) come from core/qr.js qrDesign, the drop with
 * its own blues from illustrations/brand-drop.js.
 */
@layer pages {
  .remote-state {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-3) 0 0;
    font-size: var(--type-body-size);
    color: var(--text-primary);
  }

  .remote-state[data-tone="ok"] .remote-state-icon {
    color: var(--success);
  }

  .remote-state[data-tone="warning"] .remote-state-icon {
    color: var(--warning);
  }

  .remote-state-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
  }

  .remote-pair {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-5);
    margin-top: var(--space-4);
  }

  .remote-pair[hidden] {
    display: none;
  }

  .remote-qr {
    width: 208px;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
  }

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

  .remote-qr-ground {
    fill: #ffffff;
  }

  .remote-qr-modules {
    fill: #000000;
  }

  .remote-pair-title {
    margin: 0;
    font-size: var(--type-title3-size);
    font-weight: 600;
  }

  .remote-pair-lead {
    margin: var(--space-2) 0 0;
    color: var(--text-secondary);
  }

  .remote-pair-code-label {
    margin: var(--space-4) 0 0;
    font-size: var(--type-caption-size);
    color: var(--text-secondary);
  }

  /* The short code read off the screen and typed into a phone: large, even figures, the two groups apart. */
  .remote-pair-code {
    margin: var(--space-1) 0 0;
    font-size: var(--type-display-s-size);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
  }

  .remote-links {
    margin-top: var(--space-4);
  }

  /* Phones: the code above its text, centred (the app's own width, styles/base.css). */
  @container app (max-width: 699px) {
    .remote-pair {
      grid-template-columns: minmax(0, 1fr);
      justify-items: center;
      text-align: center;
    }
  }
}
