@layer app {
  /* ============================================================
     Invites
     ============================================================ */

  .invite-card {
    input[readonly] {
      background-color: rgba(255, 255, 255, 0.6);
      cursor: text;
    }
  }

  .invite-qr {
    max-width: 280px;

    svg {
      width: 100%;
      height: auto;
    }
  }

  .invite-form {
    .roommate-filter__list {
      list-style: none;
      margin-bottom: 0;
    }
  }

  /* .badge carries Bootstrap's own sizing, so this matches .location-members-tag
     exactly; only the interactive trimmings are added here. */
  .invite-badge {
    display: inline-flex;

    form {
      display: inline-flex;
    }
  }

  .invite-badge__share {
    align-items: center;
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    border: 0;
    border-radius: 999px;
    color: var(--color-primary);
    display: inline-flex;
    font-weight: 600;
    gap: 0.35rem;

    &:hover {
      background: color-mix(in srgb, var(--color-primary) 18%, transparent);
    }
  }

  .invite-dialog {
    background: transparent;
    border: 0;
    max-width: min(24rem, calc(100vw - 2rem));
    padding: 0;

    &::backdrop {
      backdrop-filter: blur(2px);
      background: color-mix(in srgb, var(--color-dark) 45%, transparent);
    }
  }

  .invite-dialog__body {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1.5rem 3rem color-mix(in srgb, var(--color-dark) 20%, transparent);
    padding: 1.5rem;
  }

  .invite-dialog__header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }

  .invite-dialog__qr {
    max-width: 200px;

    img {
      height: auto;
      width: 100%;
    }
  }

  /* One unbroken line: the URL scales down to fit the dialog rather than wrapping. */
  .invite-dialog__url {
    font-size: clamp(0.625rem, 3.2vw, 0.875rem);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .invite-dialog__copy {
    align-items: center;
    display: flex;
    justify-content: center;
  }
}
