/* ============================================================
   Stellenbosch Wine Tours CRO layer (2026-09-26 rollout).
   Palette "Oak & Pinotage" via the site's own tokens in styles.css
   (this file loads after it). Versioned ?v= in the renderer.
   Key surfaces: .cro-intro opening card, .cro-context text/image
   section cards, .cro-end single end booking module, .cro-float
   sticky/mobile slide-in, .cro-exit desktop exit dialog.
   ============================================================ */
body[data-cro-article] { padding-bottom: 0 !important; }
.cro { font-size: 16px; line-height: 1.6; box-sizing: border-box; color: var(--ink, #241B14); }
.cro [hidden], .cro[hidden] { display: none !important; }
.cro p { margin: 0 0 .8rem; }
.cro h2, .cro h3 { font-family: var(--display, inherit); line-height: 1.22; letter-spacing: -.01em; color: var(--ink); }

/* ---- Opening recommendation card (site-matched background, border, padding,
   radius, clear hierarchy; explicit gap between the affiliate CTA and the
   end-module navigation button, stacked on mobile) ---- */
.cro-intro {
  background: var(--surface, #fff); border: 1px solid var(--line, #E3D8C4);
  border-left: 4px solid var(--accent, #6D1F3C); border-radius: var(--radius, 10px);
  padding: 1.1rem 1.3rem 1.2rem; margin: 1.6rem 0 2.2rem;
  box-shadow: 0 1px 2px rgba(36,27,20,.04);
}
.cro-intro .cro-kicker { margin-bottom: .45rem; }
.cro-intro p.cro-intro-copy { margin: 0 0 .35rem; }
.cro-intro .cro-intro-proof { display: block; font-size: .84rem; color: var(--ink-soft, #574636); margin: 0 0 .4rem; }
.cro-intro .gold { color: var(--gold, #B0862A); font-weight: 700; }
.cro-actions { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; margin-top: .9rem; }
.cro-actions .cro-jump {
  font: inherit; font-weight: 700; cursor: pointer; min-height: 46px;
  border: 1.5px solid var(--brand, #6D1F3C); border-radius: var(--radius-sm, 6px);
  background: var(--surface, #fff); color: var(--brand, #6D1F3C); padding: .6rem 1rem;
}
.cro-actions .cro-jump:hover { background: var(--paper-2, #ECE3D2); }

.cro-kicker { font-size: .74rem; line-height: 1.5; letter-spacing: .08em; font-weight: 750; text-transform: uppercase; color: var(--slate, #465A4E); }

/* ---- Section conversion cards ---- */
.cro-context { margin: 2rem 0 2.4rem; padding: 1.15rem 1.3rem; border-left: 4px solid var(--slate, #465A4E); background: var(--paper-2, #ECE3D2); border-radius: 0 var(--radius, 10px) var(--radius, 10px) 0; }
.cro-text { background: transparent; padding: .9rem 0 .9rem 1.1rem; border-color: var(--line, #E3D8C4); }
.cro-image {
  display: grid; grid-template-columns: 200px 1fr; gap: 0; border: 1px solid var(--line, #E3D8C4);
  padding: 0; overflow: hidden; border-radius: var(--radius, 10px); background: var(--surface, #fff); border-left: 4px solid var(--slate, #465A4E);
}
.cro-image > img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; margin: 0; display: block; }
.cro-image > div { padding: 1.1rem 1.2rem; }

/* ---- Actions ---- */
.cro .cro-book {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; max-width: 100%;
  padding: .68rem 1.05rem; border-radius: var(--radius-sm, 6px); color: var(--accent-ink, #fff) !important;
  background: var(--accent, #6D1F3C); text-decoration: none !important; font-weight: 750; line-height: 1.35;
  text-align: center; border: 2px solid transparent; box-sizing: border-box;
}
.cro .cro-book:hover { background: var(--accent-deep, #571530); }
.cro a:focus-visible, .cro button:focus-visible, .cro input:focus-visible, .cro select:focus-visible, .cro summary:focus-visible { outline: 3px solid var(--gold, #B0862A); outline-offset: 3px; }
.cro button { cursor: pointer; font: inherit; }
.cro-facts, .cro small { display: block; color: var(--ink-soft, #574636); font-size: .8rem; line-height: 1.55; margin-top: .6rem; }

/* ---- End booking module (the single one, after editorial + FAQ) ---- */
.cro-end {
  border: 1px solid var(--line, #E3D8C4); border-top: 4px solid var(--accent, #6D1F3C); border-radius: var(--radius, 10px);
  background: var(--surface-2, #FBF7EF); padding: 1.7rem !important; margin: 3rem auto !important; scroll-margin-top: 100px;
}
.cro-end h2 { font-size: 1.6rem; margin: 0 0 1rem; }
.cro-end h3 { font-size: 1.15rem; margin: 1.1rem 0 .6rem; }
.cro-initial { font-size: .85rem; color: var(--ink-soft, #574636); margin: -.4rem 0 1rem; }
.cro-support { border-block: 1px solid var(--line, #E3D8C4); margin: 1rem 0; padding: .9rem 0; }
.cro-support summary { font-weight: 700; cursor: pointer; min-height: 44px; }
.cro-selector { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin: 1rem 0; }
.cro label { display: flex; flex-direction: column; gap: .25rem; font-size: .84rem; font-weight: 650; min-width: 0; }
.cro select, .cro input { width: 100%; min-height: 44px; min-width: 0; font: inherit; font-size: 16px; border: 1px solid var(--line, #E3D8C4); border-radius: var(--radius-sm, 6px); padding: .55rem; background: var(--surface, #fff); color: var(--ink); box-sizing: border-box; }
.cro-result { padding: .9rem; background: var(--surface, #fff); border: 1px solid var(--line, #E3D8C4); border-radius: var(--radius-sm, 6px); font-size: .92rem; }
.cro-alternatives { padding-left: 1.2rem; font-size: .9rem; }
.cro-alternatives li { margin-bottom: .8rem; }
.cro-cost { padding-top: 1rem; border-top: 1px solid var(--line, #E3D8C4); }
.cro-cost label { margin: .5rem 0; }
.cro-cost output { display: block; font-weight: 700; margin-top: .8rem; }

/* ---- Provider schedule calendar + native GYG widget ---- */
.cro-calendar { padding: .8rem 0; }
.cro-date-status { font-size: .85rem; margin: .5rem 0 !important; }
.cro-native { min-height: 160px; }
.cro-native iframe { max-width: 100%; }
.cro-current { border-top: 1px solid var(--line, #E3D8C4); padding-top: .4rem; }
.cro-current-title { margin-top: 1.1rem; margin-bottom: .4rem; }
.cro-current-caution, .cro-screen-note { font-size: .84rem; color: var(--ink-soft, #574636); }

/* ---- Floating prompt: desktop corner card / mobile bottom slide-in ---- */
.cro-float {
  position: fixed; right: 22px; bottom: 22px; width: 340px; max-width: calc(100vw - 32px); z-index: 80;
  background: var(--surface, #fff); border: 1px solid var(--line, #E3D8C4); border-radius: var(--radius, 10px);
  padding: 1rem 1.2rem; box-shadow: 0 8px 40px rgba(42,22,34,.16);
}
.cro-float p { font-size: .84rem; margin: 0 22px .45rem 0; }
.cro-float-title { font-weight: 750; }
.cro-float .cro-book { width: 100%; font-size: .9rem; }
.cro-dismiss, .cro-exit-close { position: absolute; right: 6px; top: 4px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 24px !important; color: var(--ink-soft, #574636); }

/* ---- Desktop exit dialog ---- */
.cro-exit { border: 1px solid var(--line, #E3D8C4); border-radius: 12px; width: min(460px, calc(100vw - 32px)); padding: 2rem; box-shadow: 0 16px 90px rgba(42,22,34,.3); background: var(--surface, #fff); color: var(--ink); }
.cro-exit::backdrop { background: rgba(42,22,34,.55); }
.cro-exit h2 { font-size: 1.5rem; margin: .3rem 0 .8rem; }
.cro-exit-product { font-weight: 700; }

body[data-cro-article] .prose table { display: block; max-width: 100%; overflow-x: auto; }
body[data-cro-article] .prose [data-editorial-heading] { scroll-margin-top: 100px; }

@media (max-width: 650px) {
  .cro-context { padding: 1rem; margin: 1.6rem 0 2rem; }
  .cro-image { display: block; padding: 0; }
  .cro-image > img { height: 190px; min-height: 0; }
  .cro-image > div { padding: 1rem; }
  .cro-intro { padding: 1rem; }
  /* stacked actions keep the explicit gap: row gap survives the wrap */
  .cro-actions { flex-direction: column; align-items: stretch; gap: .8rem; }
  .cro-actions .cro-book, .cro-actions .cro-jump { width: 100%; }
  .cro-end { padding: 1.1rem !important; margin: 2rem 16px !important; width: auto; }
  .cro-selector { grid-template-columns: 1fr; }
  .cro-float { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; max-width: none; padding: .8rem 1rem; }
  .cro-float p:not(.cro-float-title) { display: none; }
  .cro-float .cro-book { min-height: 44px; }
  .cro-end h2 { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
