/* Klant uitnodigen: zelfde opbouw als het dashboard (kop over de foto, vlakken onderaan het eerste
   scherm), met drie vlakken: formulier, voorbeeld van de mail en de openstaande uitnodigingen. Alleen tokens. */

.masthead__lede { max-width: 34rem; color: var(--ink-2); font-size: var(--step-0); line-height: 1.5; }

.invdeck { display: grid; gap: 0.625rem; align-items: stretch; }
.invcard { display: grid; grid-template-rows: auto; align-content: start; gap: var(--s-3); padding: var(--s-4) var(--s-5) var(--s-4); }

/* Formulier */
.invform { display: grid; gap: var(--s-3); }
.invform .field { margin: 0; }
.invform__names { display: grid; gap: var(--s-3); }
.invform__send { justify-self: start; }
.invform__send .i { margin-right: var(--s-2); }
.invcard:first-child { display: flex; flex-direction: column; }
.invfacts { display: grid; gap: var(--s-2); margin: auto 0 0; padding: var(--s-3) 0 0; border-top: var(--hair) solid var(--line); list-style: none; color: var(--ink-2); font-size: var(--step--1); }
.invfacts li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: var(--s-2); align-items: start; }
.invfacts .i { width: 1rem; height: 1rem; margin-top: 0.15rem; color: var(--ok); }

/* Voorbeeld van de mail: de hele mail, verkleind, met dezelfde tekst als de echte e-mail (ClientInvites).
   Past hij niet in het vlak, dan scrolt alleen het voorbeeld. */
.invcard--preview { display: flex; flex-direction: column; }
.mailprev { flex: 1 1 auto; min-height: 0; overflow-y: auto; border: var(--hair) solid var(--line); border-radius: var(--radius-lg); background: var(--sheet); box-shadow: 0 18px 40px -28px color-mix(in srgb, var(--ink) 40%, transparent); scrollbar-width: thin; }
.mailprev__top { padding: var(--s-3) var(--s-4); border-bottom: 3px solid var(--accent); }
.mailprev__top .logo { height: 0.75rem; }
.mailprev__body { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-4) var(--s-4); font-size: 0.75rem; line-height: 1.5; }
.mailprev__title { font-size: var(--step-0); font-weight: 600; line-height: 1.3; }
.mailprev__box { display: grid; gap: var(--s-1); padding: var(--s-2) var(--s-3); border-radius: var(--radius-lg); background: var(--sheet-2); }
.mailprev__label { font-weight: 600; }
.mailprev__steps { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; counter-reset: stap; }
.mailprev__steps li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: var(--s-2); counter-increment: stap; }
.mailprev__steps li::before { content: counter(stap); display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-size: 0.625rem; font-weight: 700; }
.mailprev__btn { justify-self: start; padding: 0.45rem 0.85rem; border-radius: 8px; background: var(--logo); color: var(--sheet); font-weight: 600; }
.mailprev__muted { color: var(--muted); }
.mailprev__small { font-size: 0.6875rem; }
.mailprev__foot { padding: var(--s-2) var(--s-4) var(--s-3); border-top: var(--hair) solid var(--line); color: var(--muted); font-size: 0.6875rem; text-align: center; }

/* Openstaande uitnodigingen */
.invcard:last-child { grid-template-rows: auto minmax(0, 1fr) auto; }
.invlist { display: grid; align-content: start; gap: 2px; min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.invlist__item { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-2); border-bottom: var(--hair) solid var(--line); }
.invlist__item:last-child { border-bottom: 0; }
.invlist__who { display: grid; gap: 0.1rem; min-width: 0; }
.invlist__name { font-size: var(--step--1); font-weight: 500; }
.invlist__meta { overflow: hidden; color: var(--muted); font-size: var(--step--2); text-overflow: ellipsis; white-space: nowrap; }
.invlist__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.invlist__actions form { display: flex; }
.invempty { align-self: center; padding: var(--s-4) var(--s-2); }

@media (min-width: 40rem) {
  .invform__names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .invdeck { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr); }
  .invcard { overflow: hidden; }
}

/* De vlakken hebben dezelfde vaste hoogte als op het dashboard: is het scherm niet hoog genoeg voor de
   uitleg, dan valt die weg en blijven formulier, voorbeeld en lijst over */
@media (min-width: 64rem) and (max-height: 62rem) {
  .invfacts { display: none; }
  .invcard { gap: var(--s-2); padding-block: var(--s-3); }
  .invform { gap: var(--s-2); }
}
@media (min-width: 64rem) and (max-height: 46rem) {
  .invcard .field__label, .invcard label { margin-bottom: 0.15rem; }
}
