/*
 * vBooking Directory (Joomla): what the box, the prices and the bar need on a tourism website,
 * after the WordPress plugin's vbk-fares.css and vbk-directory.css, which stay byte-equal to the
 * plugin's (docs/joomla-plan.md, section 6, the JD's Pattern 1: "J"). Nothing is marked important: a theme rule
 * with an id is answered with :is(#vbkdir, .vbk-fares), which has an id's weight and matches the
 * family's own class.
 */

/* The cards at most 760 px wide, the widest box measured; the prices 12 px under the box. */
.vbk.vbk-fares.vbk-op,
.vbk.vbk-fares.vbk-pb {
  max-width: 760px;
  text-align: start;
}
.vbk.vbk-fares.vbk-op:has(+ .vbk-pb) {
  margin-bottom: 0;
}
.vbk.vbk-fares.vbk-op + .vbk-pb {
  margin-top: 12px;
}

/* The page's own heading styles (borders, bands, marks before and after) stay off the cards'. */
:is(#vbkdir, .vbk-fares) :is(.vbk-op__head, .vbk-pb__head, .vbk-pb__listhead) {
  border: 0;
  background: none;
  box-shadow: none;
  text-align: start;
  text-transform: none;
}
:is(#vbkdir, .vbk-fares) :is(.vbk-op__head, .vbk-pb__head, .vbk-pb__listhead)::before,
:is(#vbkdir, .vbk-fares) :is(.vbk-op__head, .vbk-pb__head, .vbk-pb__listhead)::after {
  content: none;
  display: none;
}

/*
 * The dock on a computer, from 1,024 px, always (owner, 2026-11-27): Gantry's 1,200 px container
 * leaves no empty margin, so the dock floats over the lower corner of the side column, which
 * scrolls under it; the page keeps the dock's height at its end, so nothing stays hidden.
 */
.vbk.vbk-fares.vbk-bar {
  --vbk-col: 0px;
}

/*
 * E1 on Gantry (the JD's must-fix 2): Gantry's #g-page-surround has overflow: hidden, which makes it
 * the box's scroll container; it never scrolls, so the bar's step-aside timeline never moved and
 * the bar stayed hidden on a phone for good (seen on Helium, Gantry 5.6.7). overflow: clip clips
 * the same and is no scroll container, so the window's scrolling drives the timeline again.
 */
html:not(.g-offcanvas-open) body.gantry #g-page-surround {
  overflow: clip;
}

/* Hidden while Gantry's off-canvas menu is open (Gantry puts g-offcanvas-open on <html>). */
html.g-offcanvas-open .vbk.vbk-fares.vbk-bar {
  display: none;
}

/*
 * Enquiries (J4; plan, section 5 and the JD's Pattern 1). The sheet is vbk-fares.css's and
 * vbk-directory.css's as on WordPress; what it takes there from the plugin's vbk-layouts.css (not
 * copied here) comes first, scoped to the family: the form's grid, a field's label over its box,
 * the status line hidden while empty, and the bots' field out of sight.
 */
.vbk-fares .vbk-form {
  display: grid;
  gap: 12px;
  margin: 0;
}
.vbk-fares .vbk-form__field {
  display: grid;
  gap: 4px;
  margin: 0;
}
.vbk-fares .vbk-form :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  font: inherit;
}
.vbk-fares .vbk-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(9.5em, 100%), 1fr));
  gap: 12px;
}
.vbk-fares .vbk-form__actions,
.vbk-fares .vbk-form__status,
.vbk-fares .vbk-form__note,
.vbk-fares .vbk-form__done {
  margin: 0;
}
.vbk-fares .vbk-form__status:empty,
.vbk-fares .vbk-form__note:empty,
.vbk-fares [data-vbk-tour][hidden] {
  display: none;
}
.vbk-fares .vbk-form__actions .vbk-act[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.vbk-fares .vbk-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Gantry styles every fold: the sheet's stays closed until opened, and "Expand All" leaves it so. */
.vbk-fares .vbk-more {
  margin: 0;
  padding: 0;
  background: none;
}
.vbk-fares .vbk-more > summary {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

/*
 * The contact page's form ({vbkdir form}, the JD's must-fix 5): the family's card, at most 34em,
 * 16 px padding (20 px from 560 px), the sheet's field rules (46 px, 16 px text, an edge at 3:1),
 * who it goes to just above a filled button, full width under 560 px.
 */
.vbk.vbk-fares.vbkdir-form {
  box-sizing: border-box;
  max-width: 34em;
  margin: 0 0 1.5em;
  padding: 16px;
  border: 1px solid var(--vbk-line);
  border-radius: calc(var(--vbk-radius) + 4px);
  background: var(--vbk-surface);
  color: var(--vbk-text);
  font-size: max(16px, 1em);
  text-align: start;
}
.vbk-fares.vbkdir-form :where(p, label, span, bdi) {
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
}
.vbk-fares.vbkdir-form :where(p) {
  color: inherit;
  font-size: 1em;
  line-height: inherit;
  text-align: start;
}
.vbk-fares.vbkdir-form .vbk-form__field label {
  margin: 0;
  color: inherit;
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}
.vbk-fares.vbkdir-form .vbk-form__field :is(input, select, textarea) {
  height: auto;
  min-height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--vbk-text) 55%, var(--vbk-surface));
  border-radius: var(--vbk-radius);
  background-color: var(--vbk-surface);
  box-shadow: none;
  color: var(--vbk-text);
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  transition: none;
}
.vbk-fares.vbkdir-form .vbk-form__field textarea {
  min-height: 7em;
  padding: 10px 12px;
  resize: vertical;
}
.vbk-fares.vbkdir-form .vbk-form__field textarea.vbk-form__tour {
  field-sizing: content;
  min-height: 46px;
  padding: 11px 12px;
  line-height: 1.4;
  resize: none;
}
.vbk-fares.vbkdir-form .vbk-form__field :focus-visible {
  outline: 2px solid var(--vbk-text);
  outline-offset: 1px;
}
.vbk-fares.vbkdir-form .vbk-form__field [aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--vbk-text);
}
.vbk-fares.vbkdir-form .vbk-form__notice {
  color: var(--vbk-text);
  font-size: max(13px, 0.84em);
  line-height: 1.45;
}
.vbk-fares.vbkdir-form .vbk-form__notice bdi {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.vbk-fares.vbkdir-form .vbk-form__notice a {
  border: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.vbk-fares.vbkdir-form .vbk-form__notice a:focus-visible {
  outline: 2px solid var(--vbk-text);
  outline-offset: 2px;
}
.vbk-fares.vbkdir-form button.vbk-act {
  width: 100%;
  min-height: 48px;
  min-width: 0;
  font-size: 1em;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}
.vbk-fares.vbkdir-form .vbk-form__status {
  color: var(--vbk-muted);
  font-size: 0.9em;
}
.vbk-fares.vbkdir-form .vbk-form__status--problem {
  padding: 10px 12px;
  border: 1px solid var(--vbk-line);
  border-left: 4px solid var(--vbk-text);
  border-radius: calc(var(--vbk-radius) / 1.5);
  background: var(--vbk-soft);
  color: var(--vbk-text);
  font-weight: 600;
}
.vbk-fares.vbkdir-form .vbk-form__done {
  font-weight: 600;
}
.vbk-fares.vbkdir-form .vbk-form__done:focus {
  outline: none;
}
@container (min-width: 560px) {
  .vbk-fares.vbkdir-form .vbk-form {
    padding: 4px;
  }
  .vbk-fares.vbkdir-form button.vbk-act {
    width: auto;
    padding: 0 24px;
  }
}
@media (hover: hover) {
  .vbk-fares.vbkdir-form .vbk-act--fill:hover {
    background: color-mix(in srgb, var(--vbk-action) 88%, var(--vbk-text));
  }
}

/*
 * The operators list (J7; the Fable layout). One operator is the box's own shape; several are a
 * list of the box's cards, 12 px apart, under a heading in the website's own look, with the foot
 * line once under them. Outside a card everything takes the page's own colours: a dark card's
 * text colour on a light page would be unreadable.
 */
.vbkdir-ops {
  max-width: 760px;
  margin: 1.25em 0 1.75em;
  text-align: start;
}
:is(#vbkdir, .vbkdir-ops) .vbkdir-ops__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
:is(#vbkdir, .vbkdir-ops) .vbkdir-ops__item {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  list-style: none;
}
:is(#vbkdir, .vbkdir-ops) .vbkdir-ops__item::before,
:is(#vbkdir, .vbkdir-ops) .vbkdir-ops__item::after {
  content: none;
}
.vbkdir-ops .vbk.vbk-fares.vbk-op {
  margin: 0;
}
:is(#vbkdir, .vbkdir-ops) .vbkdir-ops__foot {
  max-width: 62ch;
  margin: 12px 0 0;
  padding: 0;
  font-size: max(13px, 0.82em);
  line-height: 1.45;
  text-align: start;
}
/* A list card: the name over its description; a long description keeps a readable measure. */
.vbk-fares.vbkdir-op .vbk-op__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.vbk-fares.vbkdir-op .vbk-op__text {
  max-width: 62ch;
  overflow-wrap: anywhere;
}
/* No foot in the card: it closes with its own padding. */
.vbk-fares.vbkdir-op--item .vbk-op__card {
  padding-bottom: 16px;
}
@container (min-width: 560px) {
  .vbk-fares.vbkdir-op--item .vbk-op__card {
    padding-bottom: 20px;
  }
}
/* The contact form, where Send enquiry lands, and its "Message to" line once an operator is chosen. */
.vbk.vbk-fares.vbkdir-form {
  scroll-margin-top: 5em;
}
.vbk-fares.vbkdir-form .vbkdir-form__to {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.vbk-fares.vbkdir-form .vbkdir-form__to[hidden] {
  display: none;
}
.vbk-fares.vbkdir-form .vbkdir-form__to:focus {
  outline: none;
}
/* The foot line's link to a page on the website (E4, J8): the line's own colour, underlined. */
.vbk-fares .vbk-op__foot .vbk-op__foot-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
