/*
 * Fruchttaubenprojekt Manager – Frontend CSS Foundation 0.38.32
 *
 * Collision-free migration namespace:
 * - All new editable-public-page components use ftpm-public-*.
 * - Astra owns outer width, typography, text colours and normal buttons.
 * - FTPM owns only component structure and the red danger state.
 * - Migrated pages store ftpm-public-* classes natively; pages not yet migrated
 *   may still receive additive aliases until their own cleanup release.
 */

:where(body.ftpm-public-page) :where(
  .ftpm-public-hero,
  .ftpm-public-section,
  .ftpm-public-card-grid,
  .ftpm-public-card,
  .ftpm-public-button-group
) {
  box-sizing: border-box;
  min-width: 0;
}



/* Shared public-hero colour contract.
 * Astra still owns normal page typography and colours. FTPM owns these colours
 * because every public hero sits on a dark, plugin-controlled background.
 */
:where(body.ftpm-public-page) {
  --ftpm-public-hero-title-color: #fff;
  --ftpm-public-hero-intro-color: rgba(255, 255, 255, .94);
  --ftpm-public-hero-eyebrow-color: #fff4bd;
  --ftpm-public-hero-title-width: 16ch;
}

:where(body.ftpm-public-page) .ftpm-public-hero__title {
  max-width: var(--ftpm-public-hero-title-width);
  color: var(--ftpm-public-hero-title-color) !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

:where(body.ftpm-public-page) .ftpm-public-hero__intro {
  color: var(--ftpm-public-hero-intro-color) !important;
}

:where(body.ftpm-public-page) .ftpm-public-hero__eyebrow,
body.single-fruchttaube .ftpm-public-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 16px;
  padding: .42rem .8rem;
  border: 1px solid rgba(241, 212, 85, .48);
  border-radius: 999px;
  background: rgba(241, 212, 85, .12);
  color: var(--ftpm-public-hero-eyebrow-color, #fff4bd) !important;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

:where(body.ftpm-public-page) .ftpm-public-hero {
  position: relative;
  width: 100%;
}

:where(body.ftpm-public-page) .ftpm-public-hero__content,
:where(body.ftpm-public-page) .ftpm-public-section {
  min-width: 0;
  max-width: 100%;
}

:where(body.ftpm-public-page) .ftpm-public-card-grid {
  display: grid;
  min-width: 0;
}

:where(body.ftpm-public-page) .ftpm-public-card {
  min-width: 0;
}

:where(body.ftpm-public-page) .ftpm-public-button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* Primary and secondary actions intentionally inherit Astra/Gutenberg. */
:where(body.ftpm-public-page) :where(.ftpm-public-action--primary, .ftpm-public-action--secondary) {
  font: inherit;
}



/* 0.38.32 – Global frontend action sizing.
 * Astra/Gutenberg still own colour, radius, border, typography family and hover colours.
 * FTPM owns only consistent height, spacing and responsive action density.
 */
:where(body:not(.wp-admin)) :where(
  .wp-block-button__link,
  .wp-element-button,
  .ftpm-ui-button
) {
  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

body:not(.wp-admin) :where(
  .ftpm-action-size--large > .wp-block-button__link,
  .ftpm-action-size--large.wp-block-button__link,
  .wp-block-button__link.ftpm-action-size--large,
  button.ftpm-action-size--large,
  input.ftpm-action-size--large,
  .ftpm-ui-button.ftpm-action-size--large
) {
  min-height: 50px;
  padding-block: 12px;
  padding-inline: 24px;
  font-size: 1rem;
  line-height: 1.2;
}

body:not(.wp-admin) :where(
  .ftpm-action-size--default > .wp-block-button__link,
  .ftpm-action-size--default.wp-block-button__link,
  .wp-block-button__link.ftpm-action-size--default,
  button.ftpm-action-size--default,
  input.ftpm-action-size--default,
  .ftpm-ui-button.ftpm-action-size--default
) {
  min-height: 44px;
  padding-block: 9px;
  padding-inline: 18px;
  font-size: .95rem;
  line-height: 1.2;
}

body:not(.wp-admin) :where(
  .ftpm-action-size--compact > .wp-block-button__link,
  .ftpm-action-size--compact.wp-block-button__link,
  .wp-block-button__link.ftpm-action-size--compact,
  button.ftpm-action-size--compact,
  input.ftpm-action-size--compact,
  .ftpm-ui-button.ftpm-action-size--compact,
  .ftpm-ui-button--compact
) {
  min-height: 38px;
  padding-block: 7px;
  padding-inline: 14px;
  font-size: .9rem;
  line-height: 1.2;
}

body:not(.wp-admin) :where(
  .ftpm-action-size--compact > .wp-block-button__link,
  .wp-block-button__link.ftpm-action-size--compact,
  .ftpm-ui-button.ftpm-action-size--compact,
  .ftpm-ui-button--compact
) {
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  body:not(.wp-admin) :where(
    .wp-block-button__link,
    .wp-element-button,
    .ftpm-ui-button
  ):hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.wp-admin) :where(
    .wp-block-button__link,
    .wp-element-button,
    .ftpm-ui-button
  ) {
    transition: none;
  }

  body:not(.wp-admin) :where(
    .wp-block-button__link,
    .wp-element-button,
    .ftpm-ui-button
  ):hover {
    transform: none;
  }
}

/* The only visual button exception owned by FTPM is destructive red. */
:where(body.ftpm-public-page, .ftpm-generated-page, .ftpm-system-page) .ftpm-action--danger,
:where(body.ftpm-public-page, .ftpm-generated-page, .ftpm-system-page) .ftpm-ui-button--danger {
  background-color: #b42318 !important;
  border-color: #b42318 !important;
  color: #fff !important;
}

:where(body.ftpm-public-page, .ftpm-generated-page, .ftpm-system-page) .ftpm-action--danger:hover,
:where(body.ftpm-public-page, .ftpm-generated-page, .ftpm-system-page) .ftpm-action--danger:focus-visible,
:where(body.ftpm-public-page, .ftpm-generated-page, .ftpm-system-page) .ftpm-ui-button--danger:hover,
:where(body.ftpm-public-page, .ftpm-generated-page, .ftpm-system-page) .ftpm-ui-button--danger:focus-visible {
  background-color: #8f1c13 !important;
  border-color: #8f1c13 !important;
  color: #fff !important;
}
