/* An invitation in a thread that asks its reader (emails/_invitation_card;
   the canvas's 8 and 8b, calendar-and-events.md S5): under the mail's head,
   on the column of the sender's name as the canvas sets it — the card and
   the line under it as one, so a smaller line keeps the same edge — one
   framed row at the float radius as the canvas draws it (HANSHI,
   Deviations): the event's date block, what it is and when, and at its far
   end "Going?" over No, Maybe and Yes; answered, what was said and Change. */
@layer components {
  /* The name's column: the head's face and the gap after it (mails.css). */
  .invitation-card {
    margin-inline-start: calc(var(--avatar-size, 1.75rem) + var(--inline-space));
  }

  .invitation-card__box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--block-space);
    padding: var(--block-space);
    border: var(--border);
    border-radius: var(--border-radius-float);
  }

  .invitation-card__what {
    flex: 1 1 16rem;
    min-inline-size: 0;
  }

  .invitation-card__title {
    font-weight: 600;
    text-decoration: none;
  }

  /* Its chip the line's height, a notch under it (the canvas's 12.5px), as
     the agenda draws its own (calendar-agenda.css). */
  .invitation-card .badge {
    --text-notch: 0.125rem;

    padding-block: 0;
  }

  .invitation-card__who {
    margin-block-start: 0.375rem;
  }

  /* The answers keep to the card's far end, wrapped under the rest too:
     an action row right-aligns (HANSHI 02). */
  .invitation-card__answer {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 0.375rem;
    margin-inline-start: auto;
  }

  /* Answered, the chip and Change stand in one row; Change opens the three
     again in its place. */
  .invitation-card__answer--given {
    flex-direction: row;
    align-items: center;
    gap: var(--inline-space);
  }

  /* Change (the canvas's 8b): the answer's verb underlined in ink
     (.btn--underlined) — the screen's one filled button stays the thread's
     Reply. */
  .invitation-card__change > summary {
    --btn-padding: 0.125rem 0.375rem;
  }

  .invitation-card__change[open] > summary {
    display: none;
  }

  /* Where the answer goes, under the card, at the chip's size. */
  .invitation-card__where {
    --text-notch: 0.125rem;

    margin-block-start: var(--block-space-half);
  }
}
