/*
 * The blocks of SobioCmsBlocks: what they look like out of the box.
 *
 * Colours go through the `--cms-*` tokens of the TheliaCMS socle, which borrows the theme palette
 * where it can, so the block follows the site rather than a palette of its own. Everything lives
 * in the `cms` cascade layer: a rule the theme writes outside one wins over it whatever order the
 * stylesheets are loaded in.
 */
@layer cms {
  .sobio-featured-coupon {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px dashed var(--cms-color-accent);
    border-radius: 0.75rem;
    background: var(--cms-color-accent-surface);
    color: var(--cms-color-text);
    text-align: center;
  }

  .sobio-featured-coupon__kicker {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cms-color-text-muted);
  }

  .sobio-featured-coupon__heading {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .sobio-featured-coupon__summary {
    margin: 0;
    max-width: 40rem;
    color: var(--cms-color-text-muted);
  }

  .sobio-featured-coupon__code {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    margin: 0.5rem 0 0;
  }

  .sobio-featured-coupon__code-label {
    font-size: 0.875rem;
    color: var(--cms-color-text-subtle);
  }

  /* The code is what a visitor came for: large, spaced out, and selected whole on a tap. */
  .sobio-featured-coupon__code-value {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    background: var(--cms-color-accent);
    color: var(--cms-color-on-accent);
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    user-select: all;
  }

  .sobio-featured-coupon__validity {
    margin: 0;
    font-size: 0.875rem;
    color: var(--cms-color-text-subtle);
  }

  .sobio-reassurance-card {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 1rem;
    height: 100%;
    padding: 1.875rem;
    border-radius: 0.5rem;
    background: var(--cms-color-accent-surface);
    color: var(--cms-color-text);
  }

  .sobio-reassurance-card--center {
    justify-items: center;
    text-align: center;
  }

  .sobio-reassurance-card__image {
    display: block;
    width: 5.25rem;
    height: 5.25rem;
    object-fit: cover;
  }

  .sobio-reassurance-card__title {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.4;
  }

  .sobio-reassurance-card__text {
    margin: 0;
    color: inherit;
  }

  .sobio-reassurance-card__link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--cms-color-accent);
    color: var(--cms-color-on-accent);
    font-weight: 600;
    text-decoration: none;
  }

  .sobio-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 2.5rem;
  }

  .sobio-page-header__content {
    display: grid;
    flex: 1 1 20rem;
    justify-items: start;
    gap: 1rem;
  }

  .sobio-page-header__reading-time {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
  }

  .sobio-page-header__title {
    margin: 0;
  }

  .sobio-page-header__intro {
    margin: 0;
  }

  .sobio-page-header__image {
    flex: 1 1 20rem;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
  }

  .sobio-step {
    display: grid;
    justify-items: start;
    gap: 0.5rem;
  }

  .sobio-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    background: var(--cms-color-accent);
    color: var(--cms-color-on-accent);
    font-weight: 700;
  }

  .sobio-step__title,
  .sobio-step__text {
    margin: 0;
  }

  .sobio-recipe-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 2rem;
    margin: 0;
    padding: 1.5rem 1rem;
    list-style: none;
    background: var(--cms-color-surface);
    color: var(--cms-color-text);
  }

  .sobio-cross-content {
    display: grid;
    gap: 1.5rem;
    padding: 2.5rem 1.5rem;
    color: var(--cms-color-text);
  }

  .sobio-cross-content--paper {
    background: var(--cms-color-accent-surface);
  }

  .sobio-cross-content--white {
    background: var(--cms-color-surface);
  }

  .sobio-cross-content__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .sobio-cross-content__title {
    margin: 0;
  }

  /* The link beside the title: an outlined pill, the accent colour kept for the text. */
  .sobio-cross-content__link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--cms-color-accent);
    border-radius: 999px;
    color: var(--cms-color-accent);
    font-weight: 600;
    text-decoration: none;
  }

  .sobio-cross-content__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .sobio-cross-content__card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    padding-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background: var(--cms-color-accent);
    color: var(--cms-color-on-accent);
    font-weight: 700;
    text-decoration: none;
  }

  .sobio-cross-content__image {
    width: 100%;
    height: 11rem;
    object-fit: cover;
  }

  .sobio-cross-content__card-title {
    padding-inline: 1rem;
  }

  /* Recipe selection: the header of the other contents section over cards two to a row, photo
     beside the text when the card is wide enough. */
  .sobio-recipe-selection {
    display: grid;
    gap: 1.5rem;
    padding-block: 2.5rem;
    color: var(--cms-color-text);
  }

  .sobio-recipe-selection__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .sobio-recipe-selection__title {
    margin: 0;
  }

  .sobio-recipe-selection__link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--cms-color-accent);
    border-radius: 999px;
    color: var(--cms-color-accent);
    font-weight: 600;
    text-decoration: none;
  }

  .sobio-recipe-selection__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .sobio-recipe-selection__card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1.25rem;
    height: 100%;
    padding: 1.25rem;
    border-radius: 0.5rem;
    background: var(--cms-color-surface);
    color: var(--cms-color-text);
    text-decoration: none;
  }

  .sobio-recipe-selection__image {
    width: 100%;
    height: 100%;
    min-height: 11rem;
    border-radius: 0.5rem;
    object-fit: cover;
  }

  .sobio-recipe-selection__body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .sobio-recipe-selection__card-title {
    margin-bottom: 1.125rem;
    font-weight: 700;
  }

  .sobio-recipe-selection__cue {
    margin-top: 1.125rem;
    color: var(--cms-color-accent);
    font-weight: 600;
  }
}
