/*
 * A feed post, in the shape one network draws it. The card is BANDED — header,
 * body, footer each carry their own gutter — so the surface itself takes none.
 *
 * The measure is the network's, not the page's: a feed column is ~520 wide
 * everywhere, and a preview wider than that stops previewing.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-social-post-preview {
    width: 100%;
    max-width: 520px;
  }

  .lotics-social-post-preview__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
    gap: var(--lotics-space-10);
    padding-inline: var(--lotics-space-16);
    padding-top: var(--lotics-space-12);
  }

  .lotics-social-post-preview__identity {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 0%;
    min-width: 0;
  }

  .lotics-social-post-preview__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 0;
    gap: var(--lotics-space-12);
    padding-inline: var(--lotics-space-16);
    padding-block: var(--lotics-space-12);
  }

  /* A lone video plays at the feed's own aspect, edge to edge in the column. */
  .lotics-social-post-preview__video {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--lotics-radius-control) - var(--lotics-space-2));
    overflow: hidden;
    background-color: var(--lotics-black);
  }

  .lotics-social-post-preview__link {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 0;
    gap: var(--lotics-space-2);
    padding-inline: var(--lotics-space-12);
    padding-block: var(--lotics-space-10);
    border: 1px solid var(--border);
    border-radius: calc(var(--lotics-radius-control) - var(--lotics-space-2));
    background-color: var(--muted);
  }

  /* The count and every refusal, under a rule: what the network would say back. */
  .lotics-social-post-preview__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 0;
    gap: var(--lotics-space-2);
    padding-inline: var(--lotics-space-16);
    padding-block: var(--lotics-space-8);
    border-top: 1px solid var(--border);
  }
}
