/*
 * simplecrm — default stylesheet for the page HTML of GET /api/v1/page
 *
 * Canonical source. Consumers copy this into their own static/ and edit freely.
 * Re-fetching via GET /api/v1/page/default.css overwrites the copy — deliberate.
 *
 * Public class contract (rename = breaking change = new /api/v2/ endpoint):
 *   .crm-page          outer wrapper around the rendered body
 *   .crm-row           one structure row (holds 1–4 columns)
 *   .crm-row-N         row variant with N columns (1, 2, 3, or 4)
 *   .crm-col           a single column
 *   .crm-col-{N}-12    column spanning N of 12 grid units (e.g. crm-col-6-12 = 50%)
 *   .crm-element       any content block inside a column
 *   .crm-wysiwyg       rich-text block (admin Quill output, preserves its own markup)
 *   .crm-plaintext     preformatted text block
 *   .crm-unknown       fallback for unrecognised element types (best-effort render)
 */

.crm-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--def-fg, #1f2937);
  line-height: 1.6;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Page banner (above body) ─────────────────────────────────
 * Fed by cms_page_banner (headline/subheadline/CTA) + cms_page_images
 * where image_type='banner' (or 'og' as fallback). Category-type menu
 * items fall back to their category's banner when the page has none.
 */
.crm-page-banner {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.crm-page-banner-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.crm-page-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.55));
  color: #ffffff;
  gap: 0.5rem;
}

.crm-page-banner-center .crm-page-banner-overlay { align-items: center; text-align: center; }
.crm-page-banner-left   .crm-page-banner-overlay { align-items: flex-start; text-align: left; }
.crm-page-banner-right  .crm-page-banner-overlay { align-items: flex-end; text-align: right; }

.crm-page-banner-headline {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.crm-page-banner-subheadline {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.95;
  max-width: 48rem;
}

.crm-page-banner-cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: #f5c518;
  color: #000000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
}

.crm-page-banner-cta:hover {
  background: #e3b617;
}

.crm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.crm-col {
  flex: 1 1 0;
  min-width: 0;
}

/* 12-column grid widths — match Bootstrap-style "col-X-12" semantics. */
.crm-col-1-12  { flex: 0 0 calc(1/12*100% - 1.5rem); }
.crm-col-2-12  { flex: 0 0 calc(2/12*100% - 1.5rem); }
.crm-col-3-12  { flex: 0 0 calc(3/12*100% - 1.5rem); }
.crm-col-4-12  { flex: 0 0 calc(4/12*100% - 1.5rem); }
.crm-col-5-12  { flex: 0 0 calc(5/12*100% - 1.5rem); }
.crm-col-6-12  { flex: 0 0 calc(6/12*100% - 1.5rem); }
.crm-col-7-12  { flex: 0 0 calc(7/12*100% - 1.5rem); }
.crm-col-8-12  { flex: 0 0 calc(8/12*100% - 1.5rem); }
.crm-col-9-12  { flex: 0 0 calc(9/12*100% - 1.5rem); }
.crm-col-10-12 { flex: 0 0 calc(10/12*100% - 1.5rem); }
.crm-col-11-12 { flex: 0 0 calc(11/12*100% - 1.5rem); }
.crm-col-12-12 { flex: 0 0 100%; }
.crm-col-1-1   { flex: 0 0 100%; }

/* Layout safety: prevent long headings, wide images or absolute-positioned
 * editor content from escaping the column bounds (especially in 3-/4-col or
 * narrow 2-col splits). The theme can still override for special cases. */
.crm-row,
.crm-col {
  position: relative;
  overflow: hidden;
}
.crm-col {
  min-width: 0; /* flex item safety for long unbreakable content */
}
.crm-wysiwyg,
.crm-wysiwyg img {
  max-width: 100%;
}
/* Rich text is sanitized (shared/htmlsafe) but may position things, e.g. the
   video blot's play overlay. The positioned, clipped .crm-col above is the
   containing box; .crm-wysiwyg itself must stay unpositioned, because theme
   forks size a photo to the column with position: absolute and the wysiwyg
   block alone has no height. */
.crm-wysiwyg img {
  height: auto;
  display: block;
}

/* Wrapper chrome variants — opt-in via the row/column layout-style setting in
 * the page editor. Reads theme tokens so light + dark forks both work; theme
 * forks can override these rules outright. */
.crm-row--card,
.crm-col--card {
  background: var(--def-card-bg, var(--bg-card, #ffffff));
  border: 1px solid var(--def-line, var(--border, #e5ecf3));
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem;
}

.crm-element {
  margin-bottom: 1rem;
}

.crm-wysiwyg img {
  max-width: 100%;
  height: auto;
}

.crm-wysiwyg h1, .crm-wysiwyg h2, .crm-wysiwyg h3,
.crm-wysiwyg h4, .crm-wysiwyg h5, .crm-wysiwyg h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
  color: var(--def-fg, #111827);
  max-width: 100%;
  overflow-wrap: break-word;
  /* keep editor headings reasonable inside narrow columns (3-col, 4-col, 33% splits) */
  font-size: clamp(1.1rem, 2.4vw, 1.65rem);
}

.crm-wysiwyg p {
  margin: 0 0 1em;
}

.crm-wysiwyg a {
  color: var(--def-accent, #2563eb);
}

.crm-plaintext {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  background: var(--def-bg-2, #f9fafb);
  color: var(--def-fg, #111827);
  border: 1px solid var(--def-line, #e5e7eb);
  border-radius: 4px;
  padding: 0.75rem 1rem;
}

/* ── Gallery (element type: gallery) ──────────────────────────
 * Reads --crm-gallery-columns and --crm-gallery-gap from inline style.
 * `.glightbox` co-class is emitted when config.lightbox=true so the
 * GLightbox JS library binds without extra work on the consumer.
 */
.crm-gallery {
  display: grid;
  grid-template-columns: repeat(var(--crm-gallery-columns, 4), 1fr);
  gap: var(--crm-gallery-gap, 8px);
}

.crm-gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.crm-gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .crm-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Webform (element type: webform) ──────────────────────────
 * Form posts to /api/save-form on the CMS. Consumers either proxy
 * that path or rewrite the action client-side.
 *
 * Uses --frb-* design tokens shipped by themechrome/base.scss so the
 * forms inherit the site's light/dark palette + accent colour. Inputs
 * are underline-only (no border box), textarea is the only field that
 * keeps a bordered box for visible multi-line area.
 */
/* The outcome of a submit, rendered above the form after save-form's
   redirect back (api/page addWebformNote): sent, or failed. */
.crm-webform-note {
  margin: 0 0 var(--frb-s-5, 1.25rem);
  padding: var(--frb-s-4, 1rem) var(--frb-s-5, 1.25rem);
  border: 1px solid var(--frb-border, #e5e7eb);
  border-left: 4px solid var(--frb-accent, #0ea5e9);
  border-radius: var(--frb-radius, 8px);
  background: var(--frb-surface-2, #f8fafc);
  color: var(--frb-fg, #111827);
  font-size: var(--frb-text-base, 1rem);
  line-height: 1.4;
}

.crm-webform-note--sent {
  border-left-color: var(--frb-success, #16a34a);
}

.crm-webform-note--failed {
  border-left-color: var(--frb-error, #dc2626);
}

.crm-webform {
  display: flex;
  flex-direction: column;
  gap: var(--frb-s-5, 1.25rem);
}

.crm-webform-field {
  display: flex;
  flex-direction: column;
  gap: var(--frb-s-2, 0.5rem);
}

.crm-webform-label {
  font-size: var(--frb-text-xs, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--frb-fg-muted, #52525b);
}

.crm-webform-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--frb-border-strong, #d4d4d8);
  border-radius: 0;
  padding: 12px 0;
  font-size: var(--frb-text-base, 1rem);
  font-family: inherit;
  color: var(--frb-fg, #18181b);
  transition: border-color 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.crm-webform-input::placeholder {
  color: var(--frb-fg-subtle, #71717a);
  opacity: 1;
}

.crm-webform-input:hover {
  border-bottom-color: var(--frb-fg-subtle, #71717a);
}

.crm-webform-input:focus {
  outline: none;
  border-bottom-color: var(--frb-accent, #0ea5e9);
  border-bottom-width: 2px;
  padding-bottom: 11px;
}

.crm-webform-textarea {
  border: 1px solid var(--frb-border-strong, #d4d4d8);
  border-radius: var(--frb-radius, 8px);
  padding: 12px 14px;
  min-height: 120px;
  resize: vertical;
}

.crm-webform-textarea:focus {
  border-color: var(--frb-accent, #0ea5e9);
  border-bottom-width: 1px;
  padding-bottom: 12px;
  box-shadow: 0 0 0 3px var(--frb-focus-ring, rgba(14, 165, 233, 0.45));
}

.crm-webform-checkbox-group,
.crm-webform-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--frb-s-2, 0.5rem);
}

.crm-webform-checkbox,
.crm-webform-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--frb-s-2, 0.5rem);
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg, #18181b);
}

.crm-webform-divider {
  border: 0;
  border-top: 1px solid var(--frb-border, #e4e4e7);
  margin: var(--frb-s-2, 0.5rem) 0;
}

.crm-webform-submit {
  align-self: flex-start;
  padding: 12px 28px;
  background: var(--frb-accent, #0ea5e9);
  color: var(--frb-accent-fg, #ffffff);
  border: none;
  border-radius: var(--frb-radius, 8px);
  font-size: var(--frb-text-base, 1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.crm-webform-submit:hover,
.crm-webform-submit:focus {
  background: var(--frb-accent-hover, #0284c7);
  box-shadow: 0 4px 12px -2px var(--frb-focus-ring, rgba(14, 165, 233, 0.45));
}

/* ── Category (element type: category) ───────────────────────── */
.crm-category-listing {
  margin: 0;
  padding: 0;
}

.crm-category-grid {
  display: grid;
  grid-template-columns: repeat(var(--crm-category-columns, 5), minmax(0, 1fr));
  gap: 1rem;
}

.crm-category-cards {
  display: grid;
  grid-template-columns: repeat(var(--crm-category-columns, 4), minmax(0, 1fr));
  gap: 1.5rem;
}

.crm-category-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-category-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.crm-category-list .crm-category-item {
  flex-direction: row;
  align-items: stretch;
}

.crm-category-item-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.crm-category-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crm-category-list .crm-category-item-image {
  flex: 0 0 auto;
  width: 320px;
  max-width: 40%;
  height: 200px;
  aspect-ratio: auto;
}

.crm-category-list .crm-category-item-image img {
  height: 200px;
}

.crm-category-item-body {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.crm-category-list .crm-category-item-body {
  padding: 1rem 1.25rem;
  justify-content: center;
}

.crm-category-item-title {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.crm-category-list .crm-category-item-title,
.crm-category-cards .crm-category-item-title {
  font-size: 1.15rem;
}

.crm-category-item-title a {
  color: inherit;
  text-decoration: none;
}

.crm-category-item-title a:hover {
  text-decoration: underline;
}

.crm-category-item-desc {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.crm-category-grid .crm-category-item-desc {
  display: none;
}

/* ── Subcategory cards (used by Category menu item body) ────── */
.crm-subcategory-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.crm-subcategory-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.crm-subcategory-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.crm-subcategory-title {
  font-size: 1rem;
  margin: 0.75rem 1rem 0.25rem;
}

.crm-subcategory-desc {
  color: #6b7280;
  margin: 0 1rem 1rem;
  font-size: 0.9rem;
}

/* ── WST classes live in the WST module stylesheet (api/wst/default.css).
 * Consumers that use WST load /api/v1/wst/default.css separately. */

/* ── MrTravel (element type: mrtravel) ──────────────────────── */
.crm-mrtravel-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.crm-mrtravel-category {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  text-decoration: none;
}

.crm-mrtravel-category img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crm-mrtravel-category-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
}

.crm-mrtravel-category-overlay h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1rem;
}

.crm-mrtravel-grid {
  display: grid;
  grid-template-columns: repeat(var(--crm-mrtravel-columns, 4), 1fr);
  gap: 1.25rem;
}

/* Carousel template: one horizontal scroll-snap row instead of a grid.
 * CSS-only fallback (no arrows) — MrT themes replace the whole module
 * block with their own slider markup. */
.crm-mrtravel-grid.crm-mrtravel-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.crm-mrtravel-carousel .crm-mrtravel-tile,
.crm-mrtravel-carousel .crm-wish-tile {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.crm-wish-tile > .crm-mrtravel-tile {
  height: 100%;
}

.crm-mrtravel-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.crm-mrtravel-tile-bubble {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #dc2626;
  color: #ffffff;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}

.crm-mrtravel-tile-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.crm-mrtravel-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crm-mrtravel-tile-badges {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
}

.crm-mrtravel-tile-badge {
  background: rgba(14, 48, 86, 0.85);
  color: #ffffff;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

.crm-mrtravel-tile-policy {
  background: rgba(5, 150, 105, 0.9);
}

.crm-mrtravel-tile-body {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.crm-mrtravel-tile-title {
  font-size: 1rem;
  margin: 0;
  color: #0e3056;
  line-height: 1.3;
}

.crm-mrtravel-tile-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.crm-mrtravel-tile-stars {
  color: #f59e0b;
}

.crm-mrtravel-tile-score {
  font-weight: 700;
  color: #0e3056;
}

.crm-mrtravel-tile-reviews,
.crm-mrtravel-tile-bookings {
  color: #6b7280;
}

.crm-mrtravel-tile-highlights {
  list-style: disc inside;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: #446e87;
  line-height: 1.5;
}

.crm-mrtravel-tile-recent {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
  align-self: flex-start;
}

.crm-mrtravel-tile-recent strong {
  font-weight: 700;
  color: #111827;
}

.crm-mrtravel-tile-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.5rem;
}

.crm-mrtravel-tile-price-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
}

.crm-mrtravel-tile-price-rrp {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.85rem;
}

.crm-mrtravel-tile-price-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0e3056;
}

.crm-mrtravel-tile-guarantee {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 600;
}

@media (max-width: 768px) {
  .crm-mrtravel-grid {
    /* Collapse to 2-up on phones, but never widen a 1-column module. */
    grid-template-columns: repeat(min(var(--crm-mrtravel-columns, 4), 2), 1fr);
  }
}

@media (max-width: 768px) {
  /* nowrap: a wrapping column sizes its line to the widest child's
     max-content, so a wide descendant pushed the column past the viewport. */
  .crm-row {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .crm-col,
  .crm-col-1-12, .crm-col-2-12, .crm-col-3-12, .crm-col-4-12,
  .crm-col-5-12, .crm-col-6-12, .crm-col-7-12, .crm-col-8-12,
  .crm-col-9-12, .crm-col-10-12, .crm-col-11-12, .crm-col-12-12 {
    flex: 0 0 100%;
  }
}

/* ── MrTravel product detail page ────────────────────────────────────
 * Class names owned by the API contract (helper_mrtravel_product.go);
 * themes opt-in via .<theme>-body .crm-product-* overrides. Baseline
 * here is theme-agnostic — neutral spacing, system fonts, no palette.
 * ──────────────────────────────────────────────────────────────────── */
.crm-product {
  display: block;
  margin: 0;
}

.crm-product-hero {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  margin: 0 0 1.5rem;
  border-radius: 8px;
  background: #f3f4f6;
}

.crm-product-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crm-product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

.crm-product-main {
  min-width: 0;
}

.crm-product-side {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-product-header {
  margin: 0 0 1rem;
}

.crm-product-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.crm-product-title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  line-height: 1.15;
}

/* Share (native share sheet, else copies the link; mrtravel.js) */
.crm-product-share {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--frb-fg-muted, #4b5563);
  font-size: 0.95rem;
  cursor: pointer;
}

.crm-product-share .material-icons {
  font-size: 20px;
}

.crm-product-share:hover,
.crm-product-share:focus-visible {
  background: transparent; /* theme button hovers must not paint it a pill */
  color: var(--frb-fg, #111827);
}

.crm-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.crm-product-meta strong { color: #111827; }

.crm-product-brief,
.crm-product-content,
.crm-product-section {
  margin: 0 0 2rem;
}

/* Supplier HTML (htmlsafe.SupplierText) renders inside these. A positioned
   wrapper is the containing box for anything positioned in that HTML, so it
   stays within the block instead of the page. */
.crm-product-brief,
.crm-product-content,
.crm-product-section,
.crm-product-includes-card,
.crm-product-departure-point,
.crm-article-brief,
.crm-article-content,
.crm-tours-intro,
.crm-tourcard-desc {
  position: relative;
}

.crm-product-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.crm-product-includes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}

.crm-product-includes-card {
  padding: 1.25rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.crm-product-includes-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.crm-product-includes-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.crm-product-faq {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
}

.crm-product-faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}

.crm-product-faq summary::-webkit-details-marker { display: none; }

.crm-product-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-weight: 400;
}

.crm-product-faq[open] summary::after { content: "−"; }

.crm-product-faq-answer {
  padding: 0.75rem 0 0;
  color: #4b5563;
}

.crm-product-reviews-summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
}

.crm-product-reviews-score {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.crm-product-reviews-stars { color: #f59e0b; font-size: 1.5rem; }

.crm-product-reviews-list {
  display: grid;
  gap: 1rem;
}

.crm-product-review {
  padding: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.crm-product-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 0.5rem;
}

.crm-product-review-rating { color: #f59e0b; font-weight: 600; }

.crm-product-review-text { margin: 0; }

.crm-product-price-card {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-align: center;
}

.crm-product-price-from {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 0.75rem;
}

.crm-product-price-from small {
  font-size: 0.85rem;
  color: #6b7280;
}

.crm-product-price-from strong {
  font-size: 1.75rem;
}

.crm-product-book-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: #0e3056;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.crm-product-book-btn[disabled] {
  background: #9ca3af;
  cursor: not-allowed;
}

.crm-product-price-hint {
  display: block;
  margin: 0.5rem 0 0;
  color: #6b7280;
  font-size: 0.8rem;
}

.crm-product-price-options {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.crm-product-price-options h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.crm-product-price-option {
  padding: 0.75rem 0;
  border-top: 1px solid #f3f4f6;
}

.crm-product-price-option:first-of-type { border-top: 0; padding-top: 0; }

.crm-product-price-option-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.crm-product-price-option-prices {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.crm-product-price-option-rrp {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.9rem;
}

.crm-product-price-option-value {
  font-weight: 700;
  color: #0e3056;
}

.crm-product-side-icons {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.crm-product-side-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.crm-product-side-icon img { width: 24px; height: 24px; }

.crm-product-crosssells {
  margin: 2.5rem 0 0;
}

.crm-product-crosssells-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.crm-product-crosssell {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.crm-product-crosssell-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f3f4f6;
}

.crm-product-crosssell-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crm-product-crosssell-body {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.crm-product-crosssell-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.crm-product-crosssell-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.crm-product-crosssell-price {
  margin-top: auto;
  font-size: 0.95rem;
}

.crm-product-crosssell-price strong { font-size: 1.1rem; }

@media (max-width: 960px) {
  .crm-product-layout {
    grid-template-columns: 1fr;
  }
  .crm-product-side {
    position: static;
  }
  .crm-product-includes-grid,
  .crm-product-crosssells-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .crm-product-title { font-size: 1.5rem; }
}

/* ── Tour list page additions (helper_mrtravel_tour.go) ───────────────
 * The tour card itself is skinned by each MrT theme (.crm-tourcard-*);
 * these are neutral defaults for the pieces the collections sync added:
 * stats bar, highlight bubble, operator line, rating row, cancellation pill.
 * ──────────────────────────────────────────────────────────────────── */
.crm-tours-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--frb-s-2, 0.5rem);
  margin: 0 0 1.25rem;
}

.crm-tours-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 7rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--frb-border, #e4e4e7);
  border-radius: var(--frb-radius, 8px);
  background: var(--frb-surface, #ffffff);
}

.crm-tours-stat-icon {
  color: var(--frb-accent, #0e3056);
}

.crm-tours-stat-text {
  display: flex;
  flex-direction: column;
}

.crm-tours-stat strong {
  font-size: var(--frb-text-lg, 1.125rem);
  color: var(--frb-fg, #18181b);
}

.crm-tours-stat-text span {
  font-size: var(--frb-text-xs, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--frb-fg-muted, #52525b);
}

/* Departure search (dates + guest stepper) and the sort select. */
.crm-tours-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--frb-s-3, 0.75rem) var(--frb-s-5, 1.25rem);
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--frb-border, #e4e4e7);
  border-radius: var(--frb-radius, 8px);
}

.crm-tours-search-field,
.crm-tours-search-dates,
.crm-tours-guests {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.crm-tours-search-label,
.crm-tours-sort-label {
  font-weight: 600;
  color: var(--frb-fg, #18181b);
}

.crm-tours-search-input,
.crm-tours-sort-select {
  height: 2.25rem;
  padding: 0 0.6rem;
  border: 1px solid var(--frb-border, #e4e4e7);
  border-radius: var(--frb-radius-sm, 4px);
  background: var(--frb-surface, #ffffff);
  color: var(--frb-fg, #18181b);
}

.crm-tours-guests {
  gap: 0;
  border: 1px solid var(--frb-border, #e4e4e7);
  border-radius: var(--frb-radius-sm, 4px);
}

.crm-tours-guests-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: none;
  color: var(--frb-accent, #0e3056);
  cursor: pointer;
}

.crm-tours-guests-count {
  width: 3rem;
  height: 2.25rem;
  border: 0;
  text-align: center;
  -moz-appearance: textfield;
}

.crm-tours-guests-count::-webkit-inner-spin-button,
.crm-tours-guests-count::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.crm-tours-search-submit,
.crm-tourcard-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 2.25rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: var(--frb-radius-sm, 4px);
  background: var(--frb-accent, #0e3056);
  color: var(--frb-accent-fg, #ffffff);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.crm-tours-toolbar {
  display: flex;
  align-items: center;
  margin: 0 0 1rem;
}

.crm-tours-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

/* Departures on the card: one tile per date, scrolling sideways. */
.crm-tourcard-dates {
  margin: 0.75rem 0 0;
}

.crm-tourcard-dates-title {
  margin: 0 0 0.4rem;
  font-weight: 600;
  color: var(--frb-fg, #18181b);
}

.crm-tourcard-dates-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.crm-tourcard-dates-tiles {
  display: flex;
  flex: 1 1 auto;
  gap: 0.4rem;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.crm-tourcard-date {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  min-width: 4.25rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--frb-border, #e4e4e7);
  border-radius: var(--frb-radius-sm, 4px);
  color: var(--frb-fg, #18181b);
  text-decoration: none;
  scroll-snap-align: start;
}

.crm-tourcard-date-day {
  font-size: var(--frb-text-lg, 1.125rem);
  font-weight: 700;
  line-height: 1.1;
}

.crm-tourcard-date-month,
.crm-tourcard-date-status {
  font-size: var(--frb-text-xs, 0.75rem);
}

.crm-tourcard-date--few .crm-tourcard-date-status {
  color: #c25e00;
}

.crm-tourcard-date--low .crm-tourcard-date-status {
  color: #b42318;
}

.crm-tourcard-date--soldout {
  opacity: 0.5;
}

.crm-tourcard-cta {
  margin: 0.75rem 0 0;
}

/* The duration reads "2 Days 2 Nights"; the bare counts are for themes that
 * show icon + number on small cards. */
.crm-tourcard-duration-count {
  display: none;
}

.crm-tours-outside {
  margin: 2rem 0 0;
}

.crm-tours-outside-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--frb-fg-muted, #52525b);
}

.crm-tourcard-media {
  position: relative;
}

.crm-tourcard-bubble {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--frb-accent, #0e3056);
  color: var(--frb-accent-fg, #ffffff);
  font-size: var(--frb-text-xs, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-tourcard-operator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0;
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #52525b);
}

.crm-tourcard-operator-icon,
.crm-tourcard-cancel-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.crm-tourcard-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0.3rem 0;
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #52525b);
}

.crm-tourcard-stars {
  color: #f5a623;
}

.crm-tourcard-score {
  font-weight: 700;
  color: var(--frb-fg, #18181b);
}

.crm-tourcard-booked::before {
  content: "·";
  margin-right: 0.3rem;
}

.crm-tourcard-cancel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #e8f6ee;
  color: #146c43;
  font-size: var(--frb-text-sm, 0.875rem);
  font-weight: 600;
}

.crm-mrtravel-tile-operator {
  margin: 0;
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #52525b);
}

/* ── Wishlist (shared/assets/wishlist.js, shared/wishlist) ────────────
 * Hearts sit in a .crm-wish-host next to the card link (never inside
 * it); .crm-wish-tile is the wrapper for a card that fills its grid
 * cell. Header buttons carry [data-wishlist-open]; the script builds the
 * drawer and the toast at the end of <body>.
 * ──────────────────────────────────────────────────────────────────── */
.crm-wish-host {
  position: relative;
}

/* min-width: 0 lets the wrapper shrink like the overflow-hidden card it
 * replaces as the grid/flex item; without it long words widen the column. */
.crm-wish-tile {
  height: 100%;
  min-width: 0;
}

.crm-wish {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1e3568;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 150ms ease;
}

.crm-wish-host--left > .crm-wish {
  right: auto;
  left: 10px;
}

.crm-wish:hover {
  transform: scale(1.08);
}

.crm-wish:focus-visible,
.crm-wishlist-open:focus-visible,
.crm-cart-open:focus-visible {
  outline: 2px solid var(--frb-focus-ring, #2563eb);
  outline-offset: 2px;
}

.crm-wish svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.crm-wish.is-saved {
  color: #e0245e;
}

.crm-wish.is-saved svg path {
  fill: currentColor;
}

.crm-wishlist-open,
.crm-cart-open {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.crm-wishlist-count,
.crm-cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e0245e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.crm-wishlist-count[hidden] {
  display: none;
}

html.crm-wishlist-locked {
  overflow: hidden;
}

.crm-wishlist-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  background: var(--frb-overlay, rgba(15, 23, 42, 0.45));
}

.crm-wishlist-overlay[hidden] {
  display: none;
}

.crm-wishlist-drawer {
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: var(--frb-bg-elevated, #ffffff);
  color: var(--frb-fg, #18181b);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}

.crm-wishlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--frb-border, #e4e4e7);
}

.crm-wishlist-title {
  margin: 0;
  font-size: var(--frb-text-xl, 1.25rem);
}

.crm-wishlist-close,
.crm-wishlist-remove {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--frb-fg-muted, #52525b);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.crm-wishlist-close:hover,
.crm-wishlist-remove:hover {
  background: var(--frb-surface-2, #f4f4f5);
  color: var(--frb-fg, #18181b);
}

.crm-wishlist-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem 1.25rem;
}

.crm-wishlist-empty {
  margin: 2rem 0;
  text-align: center;
  color: var(--frb-fg-muted, #52525b);
}

.crm-wishlist-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-wishlist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--frb-border, #e4e4e7);
}

.crm-wishlist-link {
  display: flex;
  flex: 1;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.crm-wishlist-thumb {
  flex: 0 0 88px;
  width: 88px;
  height: 66px;
  border-radius: 6px;
  object-fit: cover;
}

.crm-wishlist-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  font-size: var(--frb-text-sm, 0.875rem);
}

.crm-wishlist-name {
  font-weight: 700;
  color: var(--frb-fg, #18181b);
}

.crm-wishlist-rating,
.crm-wishlist-meta {
  color: var(--frb-fg-muted, #52525b);
}

.crm-wishlist-cancel {
  color: #146c43;
  font-weight: 600;
}

.crm-wishlist-price {
  font-weight: 700;
  color: var(--frb-fg, #18181b);
}

.crm-wishlist-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2100;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: calc(100% - 32px);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #1e293b;
  color: #ffffff;
  font-size: var(--frb-text-sm, 0.875rem);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

.crm-wishlist-toast[hidden] {
  display: none;
}

.crm-wishlist-toast-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────
 * WST cart page (pk/modules/wst cart block + js_wst_cart.js).
 * The script prints the lines with these classes and no inline
 * styles; this is the default look, a theme restyles the same
 * classes from its own stylesheet.
 * ───────────────────────────────────────────────────────────── */
.crm-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.crm-cart-title {
  margin: 0;
  font-weight: 700;
}

.crm-cart-remove-all {
  padding: 0;
  border: 0;
  background: transparent;
  color: #dc3545;
  font-weight: 700;
  cursor: pointer;
}

.crm-cart-loading,
.crm-cart-error {
  padding: 24px 0;
  text-align: center;
  color: var(--frb-fg-muted, #6c757d);
}

.crm-cart-error {
  color: #dc3545;
}

.crm-cart-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--frb-fg-muted, #6c757d);
}

.crm-cart-empty-icon {
  font-size: 48px;
  opacity: 0.3;
}

.crm-cart-empty-text {
  margin: 8px 0 12px;
}

.crm-cart-item {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--frb-border, #dee2e6);
  border-radius: 12px;
  background: var(--frb-bg-elevated, #ffffff);
}

.crm-cart-item-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--frb-border, #dee2e6);
}

.crm-cart-item-img {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.crm-cart-item-title {
  flex-grow: 1;
}

.crm-cart-item-name,
.crm-cart-item-fare {
  font-weight: 700;
}

.crm-cart-item-fare {
  margin-top: 8px;
}

.crm-cart-item-meta,
.crm-cart-item-date,
.crm-cart-label,
.crm-cart-item-subtotal {
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #6c757d);
}

.crm-cart-item-meta .material-icons {
  font-size: 14px;
  vertical-align: middle;
}

.crm-cart-item-date {
  margin-bottom: 8px;
}

.crm-cart-item-remove {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--frb-fg-muted, #6c757d);
  cursor: pointer;
}

.crm-cart-item-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid var(--frb-border, #dee2e6);
  border-radius: 8px;
}

.crm-cart-amount {
  font-size: 1.1rem;
  font-weight: 700;
}

.crm-cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-cart-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--frb-accent, #f5c518);
  color: var(--frb-accent-fg, #000000);
  font-weight: 700;
  cursor: pointer;
}

.crm-cart-qty-value {
  min-width: 20px;
  font-weight: 700;
  text-align: center;
}

.crm-cart-item-subtotal {
  margin-top: 4px;
  text-align: right;
}

.crm-cart-summary {
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
}

.crm-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.crm-cart-total-label {
  font-size: 1.1rem;
  font-weight: 700;
}

.crm-cart-total-amount {
  font-size: 1.3rem;
  font-weight: 700;
}

.crm-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.crm-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.crm-cart-btn--primary {
  padding: 12px 40px;
  background: var(--frb-accent, #f5c518);
  color: var(--frb-accent-fg, #000000);
}

.crm-cart-btn--secondary {
  border-color: var(--frb-border-strong, #6c757d);
  color: var(--frb-fg-muted, #6c757d);
}

/* ─────────────────────────────────────────────────────────────
 * WST checkout page (pk/modules/wst checkout block +
 * js_wst_checkout.js). The script prints the guest cards, their
 * fields and the order lines with these classes and no inline
 * styles; this is the default look, a theme restyles the same
 * classes from its own stylesheet.
 * ───────────────────────────────────────────────────────────── */
.crm-checkout-title {
  margin: 0 0 24px;
  font-weight: 700;
}

.crm-checkout-error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #dc3545;
  border-radius: 8px;
  color: #dc3545;
}

.crm-checkout-loading {
  padding: 24px 0;
  text-align: center;
  color: var(--frb-fg-muted, #6c757d);
}

.crm-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 991px) {
  .crm-checkout-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.crm-checkout-form {
  min-width: 0;
}

.crm-checkout-card {
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid var(--frb-border, #dee2e6);
  border-radius: 12px;
  background: var(--frb-bg-elevated, #ffffff);
}

.crm-checkout-card-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
}

.crm-checkout-card-meta {
  margin: -8px 0 16px;
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #6c757d);
}

/* The divider that opens one cart line's group of cards when the cart has
 * several lines: the product as the headline, its fare and date under it. */
.crm-checkout-product {
  margin: 32px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--frb-border, #dee2e6);
}

.crm-checkout-product-name {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
}

.crm-checkout-product-meta {
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #6c757d);
}

.crm-checkout-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.crm-checkout-field {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.crm-checkout-field--title {
  flex: 0 0 110px;
}

/* A line under a field (the lead email's abandoned-booking note). */
.crm-checkout-field-note {
  margin-top: 6px;
  font-size: var(--frb-text-sm, 0.875rem);
  line-height: 1.4;
  color: var(--frb-fg-muted, #6c757d);
}

.crm-checkout-field--wide {
  flex: 1 1 100%;
}

.crm-checkout-label {
  font-size: var(--frb-text-sm, 0.875rem);
  font-weight: 700;
}

.crm-checkout-input,
.crm-checkout-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--frb-border, #dee2e6);
  border-radius: 8px;
  background: var(--frb-bg-elevated, #ffffff);
  color: inherit;
  font: inherit;
}

.crm-checkout-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236c757d' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
}

.crm-checkout-input:focus,
.crm-checkout-select:focus {
  outline: 0;
  border-color: var(--frb-border-strong, #6c757d);
}

.crm-checkout-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--frb-accent, #f5c518);
  color: var(--frb-accent-fg, #000000);
  font-weight: 700;
  cursor: pointer;
}

.crm-checkout-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Native payment lane: the "Secure Payment" step of the MrTravel booking
 * form (webapi pk/bookform styles, the flagship's look) as the checkout's.
 * A numbered title, the payment-method options (one bordered box each,
 * the radio + scheme marks + name in a 15/20 row, the card widget in a
 * muted panel under the chosen one), the 28px terms box with the
 * underlined sentence, the full-width uppercase Book Now button with its
 * lock, and the 3D Secure overlay. A processor adapter mounts into
 * #checkout-card / #checkout-wallet-buttons; the widget iframe sizes
 * itself. */
.crm-checkout-step-title {
  display: flex;
  align-items: center;
  margin: 0 0 20px;
  text-transform: uppercase;
}

.crm-checkout-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-right: 18px;
  border-radius: 50%;
  background: var(--frb-accent, #f5c518);
  color: var(--frb-accent-fg, #000000);
  font-weight: 700;
}

.crm-checkout-pay-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 0;
  border-top: 2px solid #dc3545;
  border-radius: var(--frb-radius-sm, 5px);
  background: rgba(220, 53, 69, 0.12);
  font-weight: 600;
}

.crm-checkout-pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-checkout-pay-option {
  border: 1px solid var(--frb-border, #dee2e6);
  border-radius: var(--frb-radius-sm, 5px);
  overflow: hidden;
}

.crm-checkout-pay-choice {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 15px 20px;
  cursor: pointer;
}

.crm-checkout-pay-choice input {
  appearance: auto;
  flex: 0 0 auto;
  margin: 0;
}

.crm-checkout-pay-logos {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.crm-checkout-pay-logos img {
  width: 37px;
  height: auto;
  margin: 0 3px;
}

.crm-checkout-pay-logos .crm-checkout-pay-logo-amex {
  width: 24px;
}

.crm-checkout-pay-logos .crm-checkout-pay-logo-wallet {
  width: auto;
  height: 25px;
  margin: 0 8px 0 0;
}

.crm-checkout-pay-name {
  margin-left: 10px;
  font-size: 15px;
  font-weight: 600;
}

.crm-checkout-pay-note {
  margin: 0;
  padding: 0 20px 15px;
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #6c757d);
}

.crm-checkout-pay-option input:not(:checked) ~ .crm-checkout-pay-logos,
.crm-checkout-pay-option input:not(:checked) ~ .crm-checkout-pay-name {
  opacity: 0.85;
}

.crm-checkout-pay-panel {
  position: relative;
  min-height: 240px;
  padding: 17px 20px 20px;
  background: var(--frb-surface-2, #f5f5f5);
}

.crm-checkout-pay-option:has(input:not(:checked)) .crm-checkout-pay-panel {
  display: none;
}

.crm-checkout-card-mount {
  min-height: 200px;
}

.crm-checkout-card-mount iframe {
  width: 100%;
  min-height: 219px;
  border: 0;
}

/* The processing state replaces the step's content (widget, terms, wallet
 * and button are taken out of flow while .is-busy is on) from the card
 * token to the confirmation page, so the customer sees the spinner and the
 * stage and never a silent form, wherever the 3DS challenge left the
 * scroll position. The hidden widget stays in the DOM for a retry. */
.crm-checkout-pay-busy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border-radius: var(--frb-radius-sm, 5px);
  background: var(--frb-surface-2, #f5f5f5);
}

/* By id so a theme's own button rule cannot bring the parts back. */
#checkout-payment-step.is-busy .crm-checkout-pay-options,
#checkout-payment-step.is-busy .crm-checkout-terms,
#checkout-payment-step.is-busy .crm-checkout-wallet,
#checkout-payment-step.is-busy .crm-checkout-book {
  display: none;
}

.crm-checkout-pay-busy-text {
  margin-top: 22px;
  font-weight: 600;
}

.crm-checkout-spinner {
  width: 50px;
  height: 50px;
  border: 8px solid var(--frb-border, #dee2e6);
  border-top-color: var(--frb-accent, #f5c518);
  border-radius: 50%;
  animation: crm-checkout-spin 2s linear infinite;
}

@keyframes crm-checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

.crm-checkout-terms {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 14px 0 14px 4px;
  cursor: pointer;
}

.crm-checkout-terms input {
  width: 28px;
  height: 28px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--frb-border-strong, #999999);
  border-radius: 4px;
  cursor: pointer;
}

.crm-checkout-terms-text {
  font-size: 12px;
  line-height: 17px;
  text-decoration: underline;
}

.crm-checkout-wallet {
  position: relative;
  margin: 0 0 14px;
}

.crm-checkout-wallet-gate {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
}

.crm-checkout-book {
  width: 100%;
  padding: 11px 20px;
  border-radius: var(--frb-radius-sm, 5px);
  font-size: 16px;
  text-transform: uppercase;
}

.crm-checkout-book .material-icons {
  font-size: 19px;
  margin-right: 8px;
}

.crm-checkout-3ds {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.crm-checkout-3ds-dialog {
  width: min(480px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--frb-bg-elevated, #ffffff);
  color: var(--frb-fg, inherit);
}

.crm-checkout-3ds-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.crm-checkout-3ds-mount {
  min-height: 400px;
}

.crm-checkout-summary {
  position: sticky;
  top: 20px;
  overflow: hidden;
  border: 1px solid var(--frb-border, #dee2e6);
  border-radius: 12px;
  background: var(--frb-bg-elevated, #ffffff);
}

.crm-checkout-summary-img {
  line-height: 0;
}

.crm-checkout-summary-img img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.crm-checkout-summary-body {
  padding: 24px;
}

.crm-checkout-summary-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
}

.crm-checkout-line + .crm-checkout-line {
  margin-top: 16px;
}

.crm-checkout-line-name {
  font-weight: 700;
}

/* A cart of several lines: each line shows its own photo beside its name
   (one line keeps the hero photo above the card instead). */
.crm-checkout-line-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crm-checkout-line-img {
  flex: 0 0 64px;
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.crm-checkout-line-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--frb-border, #dee2e6);
}

.crm-checkout-line-fare,
.crm-checkout-line-date,
.crm-checkout-line-qty {
  font-size: var(--frb-text-sm, 0.875rem);
  color: var(--frb-fg-muted, #6c757d);
}

/* "Change" on the fare row: back to the product page's calendar. */
.crm-checkout-line-fare {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.crm-checkout-line-change {
  flex: 0 0 auto;
  color: var(--frb-accent, #0d6efd);
  text-decoration: underline;
}

.crm-cart-item-name a {
  color: inherit;
  text-decoration: none;
}

.crm-cart-item-name a:hover,
.crm-cart-item-name a:focus-visible {
  text-decoration: underline;
}

.crm-checkout-line-qty {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.crm-checkout-line-total {
  font-weight: 700;
}

.crm-checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--frb-border, #dee2e6);
  font-weight: 700;
}

.crm-checkout-total-amount {
  font-size: 1.25rem;
}

