/**
 * @file Text-block visual primitive (Phase 6.5).
 *
 * Schema reference: §14 text_blocks (5 tokens).
 *
 * Visual contract:
 *   - Padding (uniform OR with overridable bottom)
 *   - Flex-column layout (vertical stack of text elements)
 *   - Text alignment (centered by default; left via modifier)
 *   - Line-height (default 1.5)
 *
 * NOT in this atom (never on base):
 *   - No `position`. Consumers manage their own positioning.
 *   - No `transform`. Transform-driven motion is the hover-lift atom's job.
 *   - No `background`, `border-radius`, `box-shadow`. That's the surface atom's job.
 *   - No `margin`. Spacing-between-blocks is the parent's responsibility.
 *
 * Composition pattern:
 *   `<div class="basic-card-content dck-text-block dck-text-block--grow">…`
 *   The legacy class (e.g. `.basic-card-content`) stays on the DOM for
 *   live content; this atom adds the same visual + layout shape via
 *   §14 tokens. Atoms + legacy aliases share token vocabulary.
 *
 * Modifiers:
 *   --compact         padding → --txt-padding-compact (1.25rem)
 *   --editorial       padding → --txt-padding-editorial (2.5rem)
 *   --left            text-align: left (default centered)
 *   --grow            flex-grow: 1
 *   --card-bottom     padding-bottom → --txt-padding-bottom-card (1.75rem)
 *
 * Internal vars (atom-defined, consumer-overridable via inline style):
 *   --txt-padding-x          horizontal padding (defaults to --txt-padding-default)
 *   --txt-padding-y          vertical (top) padding (defaults to --txt-padding-default)
 *   --txt-padding-bottom     bottom padding (defaults to --txt-padding-y)
 *   --txt-text-align         text-align value (defaults to center)
 *   --txt-line-height        line-height value (defaults to --txt-line-height-default)
 *
 * Cross-kind safety: padding tokens are gated by schema `applies_to` to
 * padding properties; line-height tokens to line-height. The tokenize
 * tool's safety net asserts this.
 */

.dck-text-block {
  --txt-padding-x: var(--txt-padding-default);
  --txt-padding-y: var(--txt-padding-default);
  --txt-padding-bottom: var(--txt-padding-y);
  --txt-text-align: center;
  --txt-line-height: var(--txt-line-height-default);

  display: flex;
  flex-direction: column;
  padding: var(--txt-padding-y) var(--txt-padding-x) var(--txt-padding-bottom);
  text-align: var(--txt-text-align);
  line-height: var(--txt-line-height);
}

/* Padding presets ----------------------------------------------------- */

.dck-text-block.dck-text-block--compact {
  --txt-padding-x: var(--txt-padding-compact);
  --txt-padding-y: var(--txt-padding-compact);
}

.dck-text-block.dck-text-block--editorial {
  --txt-padding-x: var(--txt-padding-editorial);
  --txt-padding-y: var(--txt-padding-editorial);
}

/* Asymmetric bottom override (basic-card pattern: standard sides + larger bottom) */
.dck-text-block.dck-text-block--card-bottom {
  --txt-padding-bottom: var(--txt-padding-bottom-card);
}

/* Alignment ----------------------------------------------------------- */

.dck-text-block.dck-text-block--left {
  --txt-text-align: left;
}

/* Layout ------------------------------------------------------------- */

.dck-text-block.dck-text-block--grow {
  flex-grow: 1;
}

/* `align-items: center` is needed when the text-block contains heading +
   subtitle + paragraph that should each be horizontally centred WITHIN
   the flex container (text-align: center alone centres the inline content
   but not the block-level boxes). Used by basic-card-content. */
.dck-text-block.dck-text-block--align-center {
  align-items: center;
}
