/* cxrrent Affiliate — scoped under .cxr so the theme's styles stay in charge of everything else */
.cxr {
  --cxr-accent: #ff7a1f;        /* cxrrent.com orange; the plugin prints the chosen colour over these three */
  --cxr-accent-ink: #111111;    /* text on the accent */
  --cxr-accent-text: #c24e00;   /* the accent as text / outline on white */
  --cxr-text: #0f172a;
  --cxr-muted: #64748b;
  --cxr-line: #e2e8f0;
  --cxr-bg: #ffffff;
  --cxr-soft: #f8fafc;
  --cxr-radius: 14px;
  color: var(--cxr-text);
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}
.cxr *, .cxr *::before, .cxr *::after { box-sizing: inherit; }
.cxr img { max-width: 100%; height: auto; display: block; }

/* buttons */
.cxr .cxr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .55em 1.1em; border-radius: 999px; border: 1px solid var(--cxr-accent);
  background: var(--cxr-accent); color: var(--cxr-accent-ink) !important; font-weight: 600; text-decoration: none !important;
  line-height: 1.2; cursor: pointer; white-space: nowrap; transition: filter .15s;
}
.cxr .cxr-btn:hover { filter: brightness(1.08); }
.cxr .cxr-btn--ghost { background: transparent; border-color: var(--cxr-accent-text); color: var(--cxr-accent-text) !important; }
.cxr .cxr-btn--lg { padding: .8em 1.5em; font-size: 1.05em; }

/* grid + cards */
.cxr-grid { display: grid; gap: 20px; grid-template-columns: repeat(var(--cxr-cols, 3), minmax(0, 1fr)); }
@media (max-width: 960px) { .cxr-grid { grid-template-columns: repeat(min(var(--cxr-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 600px) { .cxr-grid { grid-template-columns: 1fr; } }
/* list: one car per row, photo on the left — laid out by the list's own width (stacks like a card when narrow) */
.cxr-list { display: flex; flex-direction: column; gap: 16px; container-type: inline-size; }
@container (min-width: 480px) {
  .cxr-list .cxr-card { flex-direction: row; }
  .cxr-list .cxr-card__media { flex: 0 0 min(38%, 280px); aspect-ratio: auto; min-height: 190px; }
}
@container (min-width: 760px) {
  .cxr-list .cxr-card__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; column-gap: 24px; align-content: start; padding: 16px 20px; }
  .cxr-list .cxr-card__body > * { grid-column: 1; }
  .cxr-list .cxr-card__foot { grid-column: 2; grid-row: 1 / 5; margin: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--cxr-line); flex-direction: column; flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; min-width: 190px; }
  .cxr-list .cxr-price { justify-content: flex-end; text-align: right; }
  .cxr-list .cxr-card__actions { flex-direction: column; align-items: stretch; width: 100%; }
}
.cxr-card { display: flex; flex-direction: column; background: var(--cxr-bg); border: 1px solid var(--cxr-line); border-radius: var(--cxr-radius); overflow: hidden; }
.cxr-card[hidden] { display: none; }
.cxr-card__media { display: block; aspect-ratio: 16 / 10; background: var(--cxr-soft); overflow: hidden; }
.cxr-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cxr-card:hover .cxr-card__media img { transform: scale(1.03); }
.cxr-card__noimg { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 48px; opacity: .4; }
.cxr-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.cxr-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85em; color: var(--cxr-muted); }
.cxr .cxr-card__title { margin: 0; font-size: 1.1em; line-height: 1.3; }
.cxr-specs, .cxr-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cxr-specs li { font-size: .85em; color: var(--cxr-muted); }
.cxr-specs li + li::before { content: "·"; margin-right: 6px; }
.cxr-badges li { font-size: .78em; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--cxr-accent) 14%, transparent); color: var(--cxr-accent-text); font-weight: 600; }
.cxr-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--cxr-line); }
.cxr-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cxr-rating { color: #b45309; font-weight: 600; }
.cxr-rating--new { color: var(--cxr-muted); font-weight: 500; }

/* price */
.cxr-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.cxr-price__main { font-size: 1.3em; font-weight: 700; }
.cxr-price__from, .cxr-price__unit { font-size: .85em; color: var(--cxr-muted); }
.cxr-price__sub { flex-basis: 100%; font-size: .8em; color: var(--cxr-muted); }
.cxr-price__was { font-size: .8em; color: var(--cxr-muted); }

/* category tabs */
.cxr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cxr .cxr-tab { border: 1px solid var(--cxr-line); background: var(--cxr-bg); color: var(--cxr-text); border-radius: 999px; padding: .4em 1em; cursor: pointer; font: inherit; }
.cxr .cxr-tab span { color: var(--cxr-muted); font-size: .85em; }
.cxr .cxr-tab.is-active { background: var(--cxr-accent); border-color: var(--cxr-accent); color: var(--cxr-accent-ink); }
.cxr .cxr-tab.is-active span { color: inherit; opacity: .75; }

/* search form — laid out by the width it really gets (theme content columns are often ~650px), not the screen */
.cxr-search-wrap { container-type: inline-size; margin-bottom: 20px; }
.cxr-search { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: end; padding: 16px; border: 1px solid var(--cxr-line); border-radius: var(--cxr-radius); background: var(--cxr-bg); box-shadow: 0 8px 24px rgba(15, 23, 42, .06); margin: 0; }
@container (min-width: 520px) {
  .cxr-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cxr-search .cxr-field--location, .cxr-search .cxr-btn { grid-column: 1 / -1; }
}
@container (min-width: 900px) {
  .cxr-search { grid-template-columns: minmax(170px, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .cxr-search .cxr-field--location, .cxr-search .cxr-btn { grid-column: auto; }
}
.cxr-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
.cxr-field > span:first-child { font-size: .8em; font-weight: 600; color: var(--cxr-muted); white-space: nowrap; }
.cxr-dt { display: flex; gap: 6px; min-width: 0; }
.cxr .cxr-input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--cxr-line); border-radius: 10px; background: #fff; color: var(--cxr-text); font: inherit; margin: 0; max-width: none; }
.cxr .cxr-dt .cxr-input { flex: 1 1 auto; }
/* date field: dd/mm/yyyy text with the browser's date input invisible on top (Render::date_input) */
.cxr .cxr-date { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.cxr-date__text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cxr-date.is-empty .cxr-date__text { color: var(--cxr-muted); }
.cxr-date__icon { flex: none; color: var(--cxr-muted); pointer-events: none; }
.cxr .cxr-date__native { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; cursor: pointer; min-height: 0; background: none; }
.cxr .cxr-date__native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cxr .cxr-date:focus-within { border-color: var(--cxr-accent-text); box-shadow: 0 0 0 1px var(--cxr-accent-text); }
.cxr .cxr-input--time { width: auto; flex: 0 0 auto !important; }
.cxr-search .cxr-btn { min-height: 44px; width: 100%; }
@container (min-width: 900px) { .cxr-search .cxr-btn { width: auto; } }

.cxr-results__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.cxr-results__head a { color: var(--cxr-accent-text); }
.cxr-empty, .cxr-notice, .cxr-error { padding: 14px 16px; border-radius: var(--cxr-radius); background: var(--cxr-soft); border: 1px dashed var(--cxr-line); color: var(--cxr-muted); }
.cxr-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* car page */
.cxr-vehicle { display: flex; flex-direction: column; gap: 18px; }
.cxr-gallery__main { aspect-ratio: 16 / 9; border-radius: var(--cxr-radius); overflow: hidden; background: var(--cxr-soft); }
.cxr-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.cxr-gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.cxr .cxr-gallery__thumb { flex: 0 0 88px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; opacity: .75; }
.cxr .cxr-gallery__thumb.is-active { border-color: var(--cxr-accent); opacity: 1; }
.cxr-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cxr-vehicle__head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.cxr .cxr-vehicle__title { margin: 4px 0 0; font-size: 36px; line-height: 1.2; }
.cxr-vehicle__book { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px; border: 1px solid var(--cxr-line); border-radius: var(--cxr-radius); min-width: 240px; }
.cxr-muted { color: var(--cxr-muted); margin: 0; }
.cxr-small { font-size: .8em; }
.cxr-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0; }
.cxr-facts > div { padding: 10px 12px; background: var(--cxr-soft); border-radius: 10px; }
.cxr-facts dt { font-size: .78em; color: var(--cxr-muted); }
.cxr-facts dd { margin: 0; font-weight: 600; }
.cxr-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cxr .cxr-h4 { margin: 0 0 6px; font-size: 1em; }
.cxr-items { margin: 0; padding-left: 1.2em; }
.cxr-items--yes { list-style: "✓  "; }
.cxr-items--no { list-style: "✕  "; }

/* company card (one car's company) */
.cxr-shop { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--cxr-line); border-radius: var(--cxr-radius); }
.cxr-shop__logo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.cxr-shop__body { flex: 1; min-width: 180px; }
.cxr-shop__name { font-size: 1.1em; }
.cxr-verified { color: var(--cxr-accent-text); font-weight: 600; }

/* the company of each car (an affiliate's site lists many rental companies) */
.cxr-card__company { font-size: .85em; color: var(--cxr-muted); }
.cxr-card__company strong { color: var(--cxr-text); font-weight: 600; }

/* provinces and rental companies ([cxrrent_aff_provinces], [cxrrent_aff_partners]) */
.cxr-tiles { display: grid; gap: 14px; grid-template-columns: repeat(var(--cxr-cols, 4), minmax(0, 1fr)); }
@media (max-width: 960px) { .cxr-tiles { grid-template-columns: repeat(min(var(--cxr-cols, 4), 2), minmax(0, 1fr)); } }
@media (max-width: 480px) { .cxr-tiles { grid-template-columns: 1fr; } }
.cxr .cxr-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--cxr-line); border-radius: var(--cxr-radius); background: var(--cxr-bg); color: var(--cxr-text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.cxr .cxr-tile:hover { border-color: var(--cxr-accent-text); box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.cxr-tile__name { font-weight: 700; font-size: 1.05em; }
.cxr-tile__meta { font-size: .85em; color: var(--cxr-muted); }
.cxr .cxr-tile--company { flex-direction: row; align-items: center; gap: 12px; }
.cxr-tile__logo { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: cover; background: var(--cxr-soft); }
