/* CL_REQUETEUR_P0_MOBILE_OVERFLOW_FIX_V1 */

/* Grid children must be allowed to shrink below their intrinsic desktop width. */
@media (max-width: 1024px) {
  body[data-cl-rq-vnext-base="v1"] .cl-p1-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-cl-rq-vnext-base="v1"] .cl-p1-grid > .cl-p1-panel,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--proof,
  body[data-cl-rq-vnext-base="v1"] #cl-p1-proof-panel,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config .row,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config .field {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-cl-rq-vnext-base="v1"] .cl-p1-grid > .cl-p1-panel,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--proof,
  body[data-cl-rq-vnext-base="v1"] #cl-p1-proof-panel {
    width: 100% !important;
  }

  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config input,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config select,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config textarea,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-panel--config button,
  body[data-cl-rq-vnext-base="v1"] #shareLink {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

@media (max-width: 720px) {
  /* Leave a dedicated line for the active-state badge. */
  body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[data-cl-step2-active="1"],
  body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[data-cl-coherence-active="1"],
  body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card.is-active,
  body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[aria-selected="true"] {
    min-height: 108px !important;
    padding-bottom: 40px !important;
  }
}

/* The badge stays legible in the light theme and follows the page language. */
html[data-theme="light"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[data-cl-step2-active="1"]::after,
html[data-theme="light"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[data-cl-coherence-active="1"]::after,
html[data-theme="light"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card.is-active::after,
html[data-theme="light"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[aria-selected="true"]::after {
  background: #eaf2ff !important;
  border-color: #a8c8ff !important;
  color: #1e4f9a !important;
}

html[lang="en"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[data-cl-step2-active="1"]::after,
html[lang="en"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[data-cl-coherence-active="1"]::after,
html[lang="en"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card.is-active::after,
html[lang="en"] body[data-cl-rq-vnext-base="v1"] .cl-p1-preset-card[aria-selected="true"]::after {
  content: "Selected" !important;
}
