/* Native selects and disclosure widgets remain usable without catalogue JavaScript. */
body:has(.campaign-cover) {
  & .press-show .press-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background: #fff;
    border-block: 1px solid #31251c;
  }
  & .press-show .press-switch button {
    flex: 1 1 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .36em;
    padding: 8px 5px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #34251c;
    background: transparent;
    font-size: clamp(12px, 1vw, 15px);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
  }
  & .press-show .press-switch button:is([aria-selected="true"], [aria-pressed="true"]),
  & .at-finder .offer-genres button[aria-pressed="true"] {
    color: #fff;
    border-color: #a32119;
    background: #b3291e;
  }

  /* A check mark is part of the selected shape. The state is also exposed to AT. */
  & .press-show .press-switch button:is([aria-selected="true"], [aria-pressed="true"])::before,
  & .at-finder .offer-genres button[aria-pressed="true"]::before {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    width: .66em;
    height: .35em;
    margin-top: -.16em;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
  }
  & .at-finder .offer-genres { gap: 7px; }
  & .at-finder .offer-genres :is(a, button) {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    min-height: 44px;
    padding: 6px 13px;
    border: 1px solid #a28c75;
    border-radius: 3px;
    background: #fff;
    color: #33251a;
    font: 700 14px/1.4 var(--rd-font, sans-serif);
    text-decoration: none;
    cursor: pointer;
  }
  & .at-finder .at-count #at-clear {
    min-height: 44px;
    padding-inline: .25em;
    color: #97291d;
    text-decoration: underline;
    text-underline-offset: .24em;
    font-weight: 700;
  }

  & .at-finder :is(.catalog-directory, .at-extra, #at-drafts, #at-pages details, #at-preview) > summary {
    display: flex;
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    gap: .25em .55em;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 48px 10px 5px;
    list-style: none;
    color: #33251a;
    cursor: pointer;
  }
  & .at-finder :is(.catalog-directory, .at-extra, #at-drafts, #at-pages details, #at-preview) > summary::-webkit-details-marker {
    display: none;
  }
  & .at-finder :is(.catalog-directory, .at-extra, #at-drafts, #at-pages details, #at-preview) > summary::after {
    content: "";
    position: absolute;
    inset-inline-end: 5px;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    box-sizing: border-box;
    border: 1px solid #715344;
    border-radius: 50%;
    background:
      linear-gradient(#6e2e21, #6e2e21) center / 12px 2px no-repeat,
      linear-gradient(#6e2e21, #6e2e21) center / 2px 12px no-repeat;
  }
  & .at-finder :is(.catalog-directory, .at-extra, #at-drafts, #at-pages details, #at-preview)[open] > summary::after {
    border-color: #a32b21;
    background: linear-gradient(#fff, #fff) center / 12px 2px no-repeat #b3291e;
  }
  & .at-finder .catalog-directory > summary { min-height: 60px; }
  & .at-finder .catalog-directory > summary span {
    margin: 0;
    color: #87271e;
    white-space: nowrap;
  }
  & .at-finder .at-filters select {
    display: block;
    min-height: 46px;
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1px solid #836a55;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    color: #33251a;
    background:
      linear-gradient(45deg, transparent 49%, #3f3023 50%, #3f3023 70%, transparent 71%) right 20px center / 7px 7px no-repeat,
      linear-gradient(135deg, transparent 29%, #3f3023 30%, #3f3023 50%, transparent 51%) right 14px center / 7px 7px no-repeat,
      #fff;
    font: inherit;
    line-height: 1.5;
  }
  & .press-switch button:focus-visible,
  & .at-finder :is(.offer-genres button, .offer-genres a, summary, .at-filters select, #at-clear):focus-visible {
    outline: 3px solid #ae2e20;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #fff;
  }
}

@media (hover: hover) {
  body:has(.campaign-cover) .press-show .press-switch button:not([aria-selected="true"], [aria-pressed="true"]):hover,
  body:has(.campaign-cover) .at-finder .offer-genres button:not([aria-pressed="true"]):hover {
    border-color: #735343;
    background: #f1f1f1;
  }
}
@media (forced-colors: active) {
  body:has(.campaign-cover) .at-finder .at-filters select { appearance: auto; background: Canvas; }
  body:has(.campaign-cover) .at-finder details > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    color: ButtonText;
    background: ButtonFace;
    font: 700 18px/1 sans-serif;
  }
  body:has(.campaign-cover) .at-finder details[open] > summary::after { content: "−"; }
}

/* Let visitors start the application or ask the team before they choose a template. */
.campaign-examples .catalog-intro h2 {
  font-size:clamp(30px,3.36vw,54px);
  line-height:1.2;
}
.campaign-examples .catalog-intro h2 br {display:block;}
.campaign-examples .catalog-intro h2 em {display:inline-block;}
.at-finder #at-brief {
  margin:clamp(24px,4vw,60px) 0 0;
  padding:0;
  background:#fff;
  border-radius:0;
}
.finder-decision {
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
  border:2px solid #291c17;
}
.finder-decision > div {min-width:0; padding:clamp(18px,3vw,46px);}
.finder-application {background:#ae261d;color:white;}
.finder-help {background:white;color:#291c17;}
#at-brief .finder-decision h3 {
  margin:0 0 .45em;
  font-size:clamp(21px,2.05vw,33px);
  font-weight:850;
  line-height:1.32;
  letter-spacing:-.04em;
}
#at-brief .finder-decision p {margin:0;line-height:1.7;font-size:clamp(14px,1.15vw,17px);}
#at-brief .finder-decision a:focus-visible {outline:3px solid #17629b;outline-offset:3px;}
#at-brief .finder-decision a, .mh-sticky .campaign-sticky-link {box-sizing:border-box;text-decoration:none;}
#at-brief .finder-application .finder-apply {
  display:flex;align-items:center;gap:10px;max-width:360px;
  background:white;color:#271d17!important;border:2px solid #271d17;box-shadow:3px 3px #291c17;
  padding:12px 17px;margin:clamp(13px,1.5vw,23px) 3px 10px 0;
  font-weight:850;font-size:clamp(16px,1.5vw,22px);line-height:1.4;
}
#at-brief .finder-application small {display:block;color:#fff;font-size:13px;line-height:1.55;}
#at-brief .finder-help-links {margin-top:clamp(12px,1.4vw,21px);display:flex;flex-wrap:wrap;gap:9px;}
#at-brief .finder-help-links a {
  display:inline-flex;gap:7px;align-items:center;padding:8px 11px;min-height:44px;
  border:1px solid #594a42;color:#281b16;background:white;font-weight:700;font-size:14px;
}
.finder-help-links a>span,.finder-apply>span,.campaign-sticky-link>span {margin-left:auto;}
.finder-decision .mh-ico {flex:none;width:22px;height:22px;}
#at-brief #at-choice {color:#fff;font-weight:700;}
#at-brief #at-drafts {margin:18px 0 0;border:0;border-bottom:1px solid #aaa;}
#at-brief #at-drafts>summary {width:fit-content;font-size:14px;}
#body_wrap .mh .mh-sticky[data-mh-sticky] {
  display:block;position:fixed;z-index:55;inset:auto max(22px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) auto;
  width:max-content;max-width:calc(100% - 24px);
  transition:transform .2s ease,opacity .2s ease;
}
#body_wrap .mh .mh-sticky .campaign-sticky-link {
  display:flex;align-items:center;justify-content:center;gap:10px;min-height:49px;
  width:auto;margin:0;padding:11px 18px;border:2px solid #231a16;border-radius:4px;
  background:#ffdc55;color:#241a14;box-shadow:3px 3px 0 #241a14;
  font:800 clamp(15px,1.25vw,18px)/1.4 var(--rd-font,sans-serif);
}
#body_wrap .mh .mh-sticky .campaign-sticky-link .mh-ico {width:21px;height:21px;flex:none;}
#body_wrap .mh .mh-sticky[data-mh-sticky].is-hidden {
  opacity:0;visibility:hidden;pointer-events:none;
}
@media(hover:hover) {
  #at-brief .finder-help-links a:hover {background:#f2f2f2;}
  #at-brief .finder-application .finder-apply:hover {box-shadow:1px 1px #291c17;transform:translate(1px,1px);}
}
@media(max-width:700px) {
  .finder-decision {grid-template-columns:minmax(0,1fr);}
  .finder-decision > div {padding:19px 16px;}
  #at-brief .finder-application .finder-apply {max-width:none;}
  #body_wrap .mh .mh-sticky[data-mh-sticky] {right:max(13px,env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));}
  #body_wrap .mh .mh-sticky .campaign-sticky-link {min-height:46px;padding:8px 13px;}
  html:has(.campaign-cover) {scroll-padding-bottom:74px;}
}
@media(prefers-reduced-motion:reduce) {
  #body_wrap .mh .mh-sticky[data-mh-sticky] {transition:none;}
}
.campaign-sticky-link .dock-short {display:none;}
@media(max-width:959px) {
  /* Place the shortcut between the logo and the header tools so it never covers the catalogue. */
  #body_wrap.rd:has(.campaign-cover) #header:has([data-mh-sticky]) {
    position:sticky!important;top:var(--wp-admin--admin-bar--height,0px);translate:0 0;
  }
  #body_wrap.rd #header .mh-sticky[data-mh-sticky] {
    position:static;display:flex;align-items:center;justify-content:center;flex:1;
    min-width:0;width:auto;height:100%;margin:0 4px;box-shadow:none;transform:none;transition:none;
  }
  #body_wrap.rd #header .mh-sticky.is-hidden {visibility:hidden;pointer-events:none;}
  #body_wrap.rd #header .campaign-sticky-link {
    display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;
    max-width:100%;padding:5px 9px;border:1.5px solid #251d16;border-radius:3px;box-sizing:border-box;
    background:#ffdc55;color:#241a14!important;text-decoration:none;
    font:800 14px/1.2 var(--rd-font,sans-serif);white-space:nowrap;
  }
  #header .campaign-sticky-link .mh-ico {display:none;}
  #header .campaign-sticky-link .dock-arrow {margin:0;}
  #header .campaign-sticky-link:focus-visible {outline:3px solid #17629b;outline-offset:1px;}
}
@media(max-width:400px) {
  #header .campaign-sticky-link .dock-full {display:none;}
  #header .campaign-sticky-link .dock-short {display:inline;}
}
@media(max-width:350px) {
  #body_wrap.rd #header .campaign-sticky-link {padding-inline:6px;}
  #header .campaign-sticky-link .dock-arrow {display:none;}
}
