.screen-choice-page {
  max-width: 880px;
}

.screen-choice-page > .form {
  max-width: none;
}

.screen-choice-page__title {
  font-family: var(--font-family-bricolage);
}

.screen-choice-page__subtitle {
  margin: 0;
}

.screen-choice {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xs);
}

.screen-choice__option {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  margin: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  background: white;
  box-shadow: 0 0 0 1px var(--color-border-neutral), 2px 4px 7.2px 0 rgb(0 0 0 / 2%);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.screen-choice__option:hover {
  border-color: var(--sky-border);
}

/* Picked the way the design system's radio button group marks its choice. */
.screen-choice__option:has(.screen-choice__input:checked) {
  border-color: var(--sky-border);
}

.screen-choice__option:has(.screen-choice__input:checked) .screen-choice__text {
  background: var(--sky-gradient);
}

.screen-choice__option:has(.screen-choice__input:focus-visible) {
  outline: 2px solid var(--sky-border);
  outline-offset: 2px;
}

.screen-choice__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.screen-choice__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  overflow: hidden;
}

/* The guest screens are drawn at their real width and shrunk as a whole. */
.screen-choice__panel--a {
  background: #eef7e6;
}

.screen-choice__panel--b {
  background: #e6f3fb;
}

.screen-choice__zoom {
  display: block;
  zoom: 0.4;
  pointer-events: none;
}

.screen-choice__screen {
  display: flex;
  flex-direction: column;
  width: 340px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 6%), 0 12px 28px rgb(22 51 0 / 16%);
}

.screen-choice__screen .pots__pot-card__header {
  min-height: 40px;
}

.screen-choice__screen .pots__pot-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding-top: var(--spacing-md);
}

/* Screen B's fee part, set off like screen A's contribution. */
.screen-choice__fee {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding-top: var(--spacing-xs);
  border-top: 1px solid var(--color-border-soft);
}

.screen-choice__other {
  --btn-font-size: var(--font-sm);
  --btn-padding-block: var(--spacing-2xs);
}



.screen-choice__screen .dark-pattern-recap__card,
.screen-choice__screen .dark-pattern-recap__contribution {
  display: flex;
  flex-direction: column;
}

/* Both screens open on the same row at the same height. */
.screen-choice__screen .dark-pattern-recap__card {
  padding: 0;
}

.screen-choice__screen .btn {
  display: flex;
}

.screen-choice__text {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xs);
  padding: var(--spacing-sm) var(--spacing-xs);
}

/* Opens the option's screen, full size, in the modal. */
.screen-choice__expand {
  position: absolute;
  top: var(--spacing-2xs);
  left: var(--spacing-2xs);
  z-index: 1;
  box-shadow: 0 1px 4px rgb(0 0 0 / 12%);
}

.screen-choice__check {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #cfcfcf;
  border-radius: var(--rounded-full);
  background: white;
  color: transparent;
}

.screen-choice__check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.screen-choice__option:has(.screen-choice__input:checked) .screen-choice__check {
  border-color: var(--interactive-primary);
  background: var(--interactive-primary);
  color: white;
}

.screen-choice__title {
  font-family: var(--font-family-bricolage);
  font-size: var(--font-lg);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
}


@media (min-width: 48rem) {
  .screen-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    column-gap: var(--spacing-md);
    row-gap: 0;
  }

  /* Side by side, each option stacks its screen, at its real size, over its text. */
  .screen-choice__option {
    grid-template-columns: minmax(0, 1fr);
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
    border-radius: 18px;
  }

  .screen-choice__panel {
    align-items: flex-start;
    height: auto;
    padding: var(--spacing-xl) var(--spacing-lg);
  }

  .screen-choice__zoom {
    zoom: 1;
  }

  .screen-choice__text {
    gap: var(--spacing-xs);
    padding: var(--spacing-lg);
  }

  .screen-choice__expand {
    top: var(--spacing-sm);
    left: auto;
    right: var(--spacing-sm);
  }

  .screen-choice__check {
    width: 26px;
    height: 26px;
  }

  .screen-choice__title {
    font-size: var(--text-2xl);
  }


  .screen-choice-page__submit {
    align-self: center;
    width: 360px;
  }
}

/* The full-size preview is staged on a grey backdrop, so it reads as a picture of the guest's page. */
.screen-choice-page .modal__body {
  padding: var(--spacing-lg);
  background: #edebe5;
}

@media (max-width: 26rem) {
  .screen-choice-page .modal__body {
    padding: var(--spacing-md);
  }
}

.pot-experiment {
  max-width: 32rem;
  margin-top: var(--spacing-lg);
}
