/* Regole circoscritte a prezzi, posti e scelte nella scheda. */
#course-master .sf-course-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
#course-master .sf-course-actions .sf-hero-purchase{display:inline-flex;align-items:center;gap:.5em;min-height:44px;padding:8px 16px;border-radius:7px;border:1px solid #e9bb69;background:#ffda93;color:#152e37;text-decoration:none;line-height:1.35;font-weight:750}
#course-master .sf-hero-purchase:hover{background:#ffe5af}
#course-master .sf-hero-purchase:focus-visible,#cm-purchase summary:focus-visible,#cm-purchase a:focus-visible{outline:3px solid #1680a4;outline-offset:3px}
#course-master .cm-mode-option b small{font-size:.82em;white-space:nowrap;font-weight:600}
#course-master.sf-home-aligned .sf-purchase-refined #cm-totals>div:not(.cm-total){display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:.91rem;color:#334e50}
#course-master.sf-home-aligned .sf-purchase-refined #cm-totals .cm-total{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid #9db8b6;padding-top:8px;margin-top:8px;gap:8px}
#course-master.sf-home-aligned .sf-purchase-refined #cm-totals dd{text-align:right;min-width:0;overflow-wrap:anywhere}
#course-master.sf-home-aligned .sf-purchase-refined #cm-totals .cm-total dd{color:#153e47;font-weight:800}
#course-master #cm-purchase .sf-unit-line{font-weight:650;font-size:.94rem;line-height:1.4;color:#1f4650;margin:4px 0 7px}
#course-master #cm-purchase .sf-seat-guide{margin:9px 0 3px;padding:8px 0 0;border-top:1px solid #c0ccbe;font-size:.91rem;color:#304b50;line-height:1.45}
#course-master #cm-purchase .sf-rspp-route{margin:0 0 7px;color:#244c49;line-height:1.4}
#course-master #cm-purchase .sf-rspp-options{margin:4px 0 8px;min-width:0;grid-column:1/-1}
#course-master #cm-purchase .sf-rspp-options summary{min-height:44px;padding:10px 1px;cursor:pointer;font-weight:700;text-decoration:underline;text-underline-offset:3px;color:#175773}
#course-master #cm-purchase .sf-rspp-route{grid-column:1/-1}
#course-master #cm-purchase .sf-rspp-options [role=group]{margin:8px 0}
#course-master #cm-purchase .sf-rspp-options .cm-mode-option{margin:4px 0}
#course-master #cm-purchase [hidden], #course-master .cm-mobile-buy [hidden]{display:none!important}
#course-master .cm-mobile-buy #cm-mobile-ordinary{display:none!important}
#course-master .cm-mobile-buy .sf-mobile-vat{color:#2f5555;font-size:12px;white-space:nowrap}
#course-master .cm-mobile-buy #cm-mobile-label{font-size:12px;line-height:1.35;color:#294e54}
#course-master .cm-mobile-buy #cm-mobile-price{font-size:clamp(17px,4.8vw,24px);line-height:1.18}
#course-master .cm-mobile-buy>div>div{gap:2px 5px}
#course-master .sf-quick-start a{font-weight:700;text-underline-offset:2px}
#course-master .sf-purchase-refined.sf-quote-selection .sf-rate-note{display:none!important}
@media(max-width:520px){#course-master .cm-mobile-buy{gap:6px;padding-block:6px;padding-bottom:max(6px,env(safe-area-inset-bottom))}#course-master .cm-mobile-buy .cm-primary{max-width:40%;min-height:44px;padding:7px 10px;line-height:1.2}#course-master .cm-mobile-buy>div{min-width:0}}
@media print{#course-master .cm-mobile-buy,.sf-hero-purchase{display:none!important}}

/* The actual return control has its own column in the sticky header. Horizontal
   scrolling applies only to catalogue links; the return link stays in view. */
#sf-global-header .sf-course-header-nav {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(8px, 1.5vw, 22px);
  max-width: 1440px;
  margin-inline: auto;
  border-top: 1px solid #8f999344;
}
#sf-global-header .sf-course-header-nav .sf-return-nav {
  grid-column: 1;
  grid-row: 1;
  min-height: 44px;
  padding: 0;
  margin: 0;
  max-width: 100%;
  z-index: auto;
}
#sf-global-header .sf-course-header-nav .sf-return-nav [data-sf-back] {
  position: static;
  margin: 0;
  min-height: 44px;
  padding: 4px 10px;
  background: transparent;
  color: #163e4c;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  font-size: 14px;
}
#sf-global-header .sf-course-header-nav .sf-return-nav [data-sf-back]:is(:hover, :focus-visible) {
  background: #dae8e8;
  color: #103b55;
}
#sf-global-header .sf-course-header-nav .sf-return-nav [data-sf-back]:focus-visible {
  outline: 2px solid #08748d;
  outline-offset: -2px;
}
#sf-global-header .sf-course-header-nav .shop-nav {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  border-top: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}
/* Preserve the global controller's optional recovery links on a full row. */
#sf-global-header .sf-course-header-nav .sf-return-nav:has([data-sf-return-edit]:not([hidden]), [data-sf-return-hint]:not([hidden])) {
  grid-column: 1 / -1;
  grid-row: 2;
}
#sf-global-header .sf-course-header-nav:has([data-sf-return-edit]:not([hidden]), [data-sf-return-hint]:not([hidden])) .shop-nav {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  #sf-global-header .sf-course-header-nav .sf-return-nav [data-sf-back] { padding-inline: 5px 8px; }
}
