/* ==========================================================================
   Arvydai Booking Widget — competitor-pattern rebuild.

   Three-step container card flow:
     1. Pond picker
     2. Spot × 14-day grid (the centerpiece)
     3. Confirmation (info / details / rules)

   Design tokens (palette, spacing, type ramp, elevation) are unchanged
   from the previous design pass. Layouts are rebuilt to match a
   Lithuanian fishing-pond competitor reference: a big container card
   with a step indicator above it, headings inside, and bottom action
   bar with Atgal / Tęsti CTAs.

   Order: tokens → reset → page chrome → step indicator → container card →
   step 1 (pond list) → step 2 (grid) → step 3 (confirm) → buttons →
   alerts → mobile tweaks → reduced-motion / contrast.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
.arv-booking-widget {
  /* --- Color palette --------------------------------------------------------
   * Tracks Blocksy theme palette tokens with safe fallbacks. Active starter
   * site (Smile Dent) defines:
   *   color-1  #3a5da5  (link / secondary / hover)
   *   color-2  #24417C  (button bg / primary)
   *   color-3  #355575  (body text)
   *   color-4  #102136  (deep ink / strong text)
   *   color-5  #E7EBEE  (border / light gray)
   *   color-6  #F3F5F7  (subtle gray surface)
   *   color-7  #F7FAFD  (page surface tint)
   *   color-8  #ffffff
   *   color-9  #FFE8DA  (warm peach accent — used for the cancellation alert)
   * Without Blocksy active, fallbacks keep the widget readable.
   */
  --arv-primary:        var(--theme-palette-color-2, #24417C);
  --arv-primary-deep:   var(--theme-palette-color-4, #102136);
  --arv-primary-bright: var(--theme-palette-color-1, #3a5da5);
  --arv-primary-soft:   #e8eef9;
  --arv-primary-mist:   var(--theme-palette-color-7, #F7FAFD);
  --arv-on-primary:     #ffffff;

  --arv-surface-page:     var(--theme-palette-color-7, #F7FAFD);
  --arv-surface:          #ffffff;
  --arv-surface-sunken:   var(--theme-palette-color-6, #F3F5F7);

  /* Body ink hierarchy aligned with Blocksy's text/headings palette. */
  --arv-ink:        var(--theme-palette-color-4, #102136);
  --arv-ink-soft:   var(--theme-text-color, var(--theme-palette-color-3, #355575));
  --arv-ink-mute:   #6b7d92;
  --arv-ink-faint:  #a4b0bf;

  --arv-line:        var(--theme-palette-color-5, #E7EBEE);
  --arv-line-soft:   #EEF1F5;

  /* Status colors (Laisva/Užimta keep semantic green/red — universal,
     work over the blue palette). Tones tuned to feel calmer next to
     the deep blue primary instead of the previous warm-green palette. */
  --arv-success:       #1f8a55;
  --arv-success-soft:  #e2f3ea;
  --arv-success-mist:  #effaf3;
  --arv-danger:        #b4321f;
  --arv-danger-soft:   #fbece8;
  --arv-danger-deep:   #7a1f12;
  --arv-warn:          #b46c1c;
  --arv-warn-soft:     var(--theme-palette-color-9, #FFE8DA);
  --arv-warn-deep:     #6a3a09;

  /* Subtle blue weekend tint that picks up the theme accent. */
  --arv-weekend-tint:  rgba(58, 93, 165, 0.05);

  /* Spacing — kept; matches the existing widget's rhythm. */
  --arv-s-1: 4px; --arv-s-2: 8px; --arv-s-3: 12px; --arv-s-4: 16px;
  --arv-s-5: 20px; --arv-s-6: 24px; --arv-s-8: 32px; --arv-s-10: 40px;
  --arv-s-14: 56px;

  /* Radius — softened slightly to match Blocksy's 12px form-field radius. */
  --arv-r-1:  6px;
  --arv-r-2:  12px; /* form-field-sized chip / input */
  --arv-r-3:  14px;
  --arv-r-4:  16px;
  --arv-r-pill: 999px;

  /* Elevation. Blocksy itself ships almost no shadows on cards — keep ours
     subtle so we don't read as "out of theme". */
  --arv-elev-1:
    0 1px 1px rgba(16, 33, 54, 0.04),
    0 2px 8px rgba(16, 33, 54, 0.05);
  --arv-elev-2:
    0 1px 1px rgba(16, 33, 54, 0.06),
    0 6px 18px rgba(16, 33, 54, 0.08);
  --arv-elev-card:
    0 1px 2px rgba(16, 33, 54, 0.04),
    0 4px 16px rgba(16, 33, 54, 0.06);
  --arv-elev-press:
    0 1px 2px rgba(16, 33, 54, 0.10),
    0 2px 4px rgba(16, 33, 54, 0.06);
  --arv-focus-ring: 0 0 0 3px rgba(58, 93, 165, 0.30);

  /* Typography — defer to the host theme's font stack. Blocksy provides
     `--theme-font-family` and base `16px / 1.65`. We stay close to that
     for body copy so the widget reads as part of the theme, not a foreign
     iframe. */
  --arv-font-system: var(--theme-font-family,
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif);
  --font-display:    700 30px/1.2   var(--arv-font-system);
  --font-display-lg: 700 36px/1.15  var(--arv-font-system);
  --font-title:      700 22px/1.3   var(--arv-font-system);
  --font-title-sm:   700 18px/1.35  var(--arv-font-system);
  --font-body:       400 16px/1.55  var(--arv-font-system);
  --font-body-strong:600 16px/1.5   var(--arv-font-system);
  --font-label:      600 12px/1.3   var(--arv-font-system);
  --label-tracking:  0.06em;
  --font-numeric:    700 18px/1.2   var(--arv-font-system);
  --font-numeric-lg: 800 28px/1.05  var(--arv-font-system);

  /* Tap targets + layout. Blocksy buttons are 62px; we keep our primary
     CTA at 56px so the widget reads "real button" without being chunkier
     than the surrounding theme buttons. */
  --arv-tap:    48px;
  --arv-tap-lg: 56px;
  --arv-max:    1200px;

  /* Motion — match Blocksy's transition curve so hover feels native. */
  --arv-ease:   cubic-bezier(0.455, 0.03, 0.515, 0.955);
  --arv-dur-1:  140ms;
  --arv-dur-2:  200ms;

  font: var(--font-body);
  color: var(--arv-ink-soft);
  background: transparent;
  max-width: var(--arv-max);
  margin-inline: auto;
  padding: var(--arv-s-5) var(--arv-s-5) var(--arv-s-10);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

/*
 * Break out of the parent theme's narrow `entry-content` constraint.
 *
 * Block themes wrap shortcode output in `is-layout-constrained` which
 * caps direct children at ~640–840px. Two-fold escape:
 *   1. WP's own `alignfull` class lets a child override the constraint
 *      (server-side, the section element gets `alignfull` added).
 *   2. Belt + braces: force-set 100vw + center the breakout in case the
 *      theme's alignfull rule isn't present.
 */
.arv-booking-section {
  background: var(--arv-surface-page);
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  /* Modern WP container queries / theme.json widths may set a parent's
     contain-intrinsic-size; nullify any ancestor max-width via inset. */
  position: relative;
  left: 0;
}

/* --------------------------------------------------------------------------
   Reset (scoped)
   -------------------------------------------------------------------------- */
.arv-booking-widget,
.arv-booking-widget *,
.arv-booking-widget *::before,
.arv-booking-widget *::after { box-sizing: border-box; }

.arv-booking-widget h1,
.arv-booking-widget h2,
.arv-booking-widget h3,
.arv-booking-widget p,
.arv-booking-widget ul {
  margin: 0; padding: 0; color: inherit; list-style: none;
}

.arv-booking-widget button {
  font: inherit; color: inherit; background: transparent; border: 0;
  padding: 0; margin: 0; cursor: pointer; text-align: start;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition:
    transform var(--arv-dur-1) var(--arv-ease),
    box-shadow var(--arv-dur-2) var(--arv-ease),
    background-color var(--arv-dur-1) var(--arv-ease),
    color var(--arv-dur-1) var(--arv-ease);
}
.arv-booking-widget button:disabled { cursor: not-allowed; }
.arv-booking-widget *:focus { outline: none; }
.arv-booking-widget button:focus-visible,
.arv-booking-widget [tabindex]:focus-visible,
.arv-booking-widget input:focus-visible,
.arv-booking-widget select:focus-visible {
  outline: none;
  box-shadow: var(--arv-focus-ring);
}

/* --------------------------------------------------------------------------
   Shell — page title + subtitle + step indicator + container card
   -------------------------------------------------------------------------- */
.arv-shell {
  display: flex; flex-direction: column;
  gap: var(--arv-s-5);
  align-items: center;
}
/* Card stays full-width inside the centered shell — the centering applies
   to subtitle + stepper only. */
.arv-shell > .arv-card { align-self: stretch; }

.arv-page-subtitle {
  color: var(--arv-ink-soft);
  font: var(--font-body);
  text-align: center;
  max-width: 640px;
  margin-block-start: var(--arv-s-2);
}

/* Step indicator: three numbered circles connected by lines.
   Centered horizontally in the shell so it visually anchors above the
   container card (matches the competitor reference). */
.arv-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-block: var(--arv-s-2);
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

.arv-step-dot {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--arv-surface);
  color: var(--arv-ink-mute);
  box-shadow: 0 0 0 2px var(--arv-line) inset;
  font: var(--font-body-strong);
  font-size: 14px;
  flex: 0 0 auto;
  transition: background-color var(--arv-dur-1) var(--arv-ease), color var(--arv-dur-1) var(--arv-ease), box-shadow var(--arv-dur-1) var(--arv-ease);
}
.arv-step-dot__num { line-height: 1; }
.arv-step-dot--active {
  background: var(--arv-primary);
  color: var(--arv-on-primary);
  /* Halo color tracks primary so it stays cohesive across theme palettes. */
  box-shadow:
    0 0 0 2px var(--arv-primary) inset,
    0 6px 16px rgba(36, 65, 124, 0.28);
}
.arv-step-dot--done {
  background: var(--arv-primary);
  color: var(--arv-on-primary);
  box-shadow: 0 0 0 2px var(--arv-primary) inset;
}
.arv-step-dot--future {
  background: var(--arv-surface);
  color: var(--arv-ink-faint);
}

.arv-step-line {
  flex: 1 1 auto;
  height: 2px;
  background: var(--arv-line);
  margin-inline: 8px;
  border-radius: 2px;
  transition: background-color var(--arv-dur-2) var(--arv-ease);
}
.arv-step-line.is-filled { background: var(--arv-primary); }

/*
 * Container card. Blocksy as a theme rarely uses heavy card shadows —
 * it prefers crisp borders + flat surfaces. We lean into that idiom:
 * one hairline ring + a barely-there shadow for definition. The card
 * is the visual anchor of the whole flow so it shouldn't fight the
 * surrounding theme by stacking depth.
 */
.arv-card {
  background: var(--arv-surface);
  border-radius: var(--arv-r-4);
  padding: var(--arv-s-8);
  box-shadow:
    0 0 0 1px var(--arv-line) inset,
    0 1px 2px rgba(16, 33, 54, 0.03),
    0 8px 28px rgba(16, 33, 54, 0.04);
}
@media (max-width: 720px) {
  .arv-card { padding: var(--arv-s-5); }
}

.arv-step-body {
  display: flex; flex-direction: column;
  gap: var(--arv-s-5);
  min-width: 0;
}

.arv-card-title {
  font: var(--font-title);
  color: var(--arv-ink);
  letter-spacing: -0.01em;
}

/* Header row — title on left, info box / link on right. */
.arv-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--arv-s-4);
}
.arv-card-head__left {
  display: flex; align-items: center; gap: var(--arv-s-3); flex-wrap: wrap;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Step 1 — Pond list
   -------------------------------------------------------------------------- */
.arv-pond-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--arv-s-4);
}
@media (max-width: 599px) { .arv-pond-list { grid-template-columns: 1fr; } }

/* `button.arv-pond-tile` doubles class specificity (class+tag) so the
   padding survives Blocksy's `button { padding: 0; ... }` global reset
   which loads after our stylesheet. Same reason we explicitly re-state
   border on the button — Blocksy's reset zeroes it. */
.arv-pond-tile,
button.arv-pond-tile {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--arv-s-4);
  /* Center icon + body vertically so the layout looks intentional whether
     the description is filled in or empty. */
  align-items: center;
  padding: var(--arv-s-5);
  padding-inline: var(--arv-s-5);
  padding-block: var(--arv-s-5);
  border: 0;
  border-radius: var(--arv-r-3);
  background: var(--arv-surface);
  /* 2px inset border via box-shadow because Blocksy resets actual border
     width to 0 on bare buttons. */
  box-shadow: 0 0 0 2px var(--arv-line) inset;
  width: 100%;
  min-height: 76px;
  text-align: start;
  cursor: pointer;
  transition: var(--theme-transition,
    box-shadow var(--arv-dur-2) var(--arv-ease),
    background-color var(--arv-dur-1) var(--arv-ease),
    transform var(--arv-dur-1) var(--arv-ease));
}
.arv-pond-tile:hover {
  box-shadow:
    0 0 0 2px var(--arv-primary-bright) inset,
    var(--arv-elev-1);
  transform: translateY(-1px);
}
.arv-pond-tile.is-selected {
  /* Soft blue selection — blue is "intent / pick" in this palette;
     green stays reserved for availability state in the grid. */
  background: var(--arv-primary-soft);
  box-shadow: 0 0 0 2px var(--arv-primary) inset;
}

.arv-pond-tile__icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--arv-r-2);
  background: var(--arv-primary-soft);
  color: var(--arv-primary);
  flex: 0 0 auto;
}
/* Ensure the inline-svg wrap centers within the icon square — without
   this the wrap span is display:inline and the SVG anchors to its
   baseline instead of the visual center of the rounded background. */
.arv-pond-tile__icon .arv-pin-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.arv-pond-tile__icon .arv-pin-svg svg {
  display: block;
}
.arv-pond-tile.is-selected .arv-pond-tile__icon {
  background: var(--arv-primary);
  color: var(--arv-on-primary);
}

.arv-pond-tile__body {
  min-width: 0;
  display: flex; flex-direction: column;
  gap: 4px;
  /* Vertically center the name+desc block within its grid cell so a
     no-description tile reads as a centered name next to the icon. */
  justify-content: center;
}
.arv-pond-tile__name {
  font: var(--font-body-strong);
  font-size: 16px;
  color: var(--arv-ink);
  letter-spacing: -0.005em;
}
.arv-pond-tile__desc {
  color: var(--arv-ink-mute);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Step 2 — Info row + grid
   -------------------------------------------------------------------------- */
.arv-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--arv-r-2);
  background: var(--arv-primary-soft);
  color: var(--arv-primary);
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: none;
  min-height: 32px;
}
.arv-link-btn:hover { background: var(--arv-primary); color: var(--arv-on-primary); }

/* Top-right info card — date window + week-unlock note. */
.arv-grid-info {
  display: flex; flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  min-width: 0;
  text-align: end;
}
.arv-grid-info__window {
  font: var(--font-body-strong);
  color: var(--arv-ink);
  background: var(--arv-primary-soft);
  padding: 6px 10px;
  border-radius: var(--arv-r-2);
  font-variant-numeric: tabular-nums;
}
.arv-grid-info__note {
  font-size: 12px;
  color: var(--arv-ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.arv-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--arv-line);
  color: var(--arv-ink-mute);
  font: 700 11px/1 var(--arv-font-system);
  font-style: italic;
}

/* Session picker row above the grid. */
.arv-session-row {
  display: flex;
  align-items: center;
  gap: var(--arv-s-3);
  flex-wrap: wrap;
}
.arv-session-row__label {
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--arv-ink-mute);
}

/* Form control — matches Blocksy's form-field treatment:
   2px border, 12px radius, 50px height, focus ring on theme blue. */
.arv-select {
  font: var(--font-body-strong);
  color: var(--arv-ink);
  background: var(--arv-surface);
  border: 2px solid var(--theme-form-field-border-initial-color, var(--arv-line));
  border-radius: var(--theme-form-field-border-radius, var(--arv-r-2));
  padding: 10px 36px 10px 14px;
  min-height: var(--theme-form-field-height, 50px);
  appearance: none;
  -webkit-appearance: none;
  /* Chevron uses theme primary so it picks up the blue. Encoded
     `#3a5da5` as the default fill; falls back gracefully if unsupported. */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 6 L8 10 L12 6' fill='none' stroke='%233a5da5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  cursor: pointer;
  transition: var(--theme-transition, border-color var(--arv-dur-1) var(--arv-ease));
}
.arv-select:hover { border-color: var(--arv-primary-bright); }
.arv-select:focus,
.arv-select:focus-visible {
  border-color: var(--theme-form-field-border-focus-color, var(--arv-primary-bright));
  outline: none;
  box-shadow: var(--arv-focus-ring);
}

/* The grid. Sticky first column for spot labels; horizontal scroll on overflow. */
.arv-grid-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  border-radius: var(--arv-r-3);
  background: var(--arv-surface);
  box-shadow: 0 0 0 1px var(--arv-line) inset;
  /* Faint scrollbar — Webkit only; Firefox uses scrollbar-width below. */
  scrollbar-width: thin;
  scrollbar-color: var(--arv-line) transparent;
  -webkit-overflow-scrolling: touch;
}
.arv-grid-scroller::-webkit-scrollbar { height: 8px; }
.arv-grid-scroller::-webkit-scrollbar-track { background: transparent; }
.arv-grid-scroller::-webkit-scrollbar-thumb {
  background: var(--arv-line);
  border-radius: 8px;
}

.arv-grid {
  display: grid;
  /* JS sets --arv-grid-cols = 1 + GRID_DAYS. Day columns get a roomier
     min so "TRE 04-29" stacks fit cleanly without cramping against the
     sticky SEKTORI column on tablet/narrow-laptop viewports. */
  grid-template-columns: 104px repeat(calc(var(--arv-grid-cols, 15) - 1), minmax(96px, 1fr));
  min-width: max-content;
}

.arv-grid-cell {
  padding: 4px;
  display: flex;
  /* Stretch (not center) so the pill inside fills the entire cell —
     gives a full-rectangle click + hover target. The pill keeps its
     rounded look via the 4px padding above acting as an inset frame. */
  align-items: stretch;
  justify-content: stretch;
  min-height: 48px;
  border-bottom: 1px solid var(--arv-line-soft);
  border-right: 1px solid var(--arv-line-soft);
  background: var(--arv-surface);
  font-variant-numeric: tabular-nums;
}
.arv-grid-cell.is-weekend { background: var(--arv-weekend-tint); }

/* Header row.
   Stacking layers in this grid (low → high):
     0  plain body cell (no position)
     2  day-header (sticky top)
     3  sticky-col body cell (sticky left) — must beat day-header when
        horizontal scroll drags day cells across the column-0 area
     4  corner (sticky top + left) — beats both axes */
.arv-grid-cell--head {
  flex-direction: column;
  gap: 2px;
  padding-block: var(--arv-s-3);
  background: var(--arv-surface-sunken);
  position: sticky;
  top: 0;
  z-index: 2;
}
.arv-grid-cell--head.is-weekend { background: var(--arv-weekend-tint); }
.arv-grid-dow {
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  color: var(--arv-ink-mute);
  text-transform: uppercase;
  font-size: 11px;
}
.arv-grid-mday {
  font-weight: 700;
  color: var(--arv-ink);
  font-size: 14px;
}

.arv-grid-cell--corner {
  background: var(--arv-surface-sunken);
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--arv-ink-mute);
  border-right: 1px solid var(--arv-line);
}

.arv-grid-cell--label {
  justify-content: flex-start;
  padding-inline: var(--arv-s-3);
  font: var(--font-body-strong);
  font-size: 14px;
  color: var(--arv-ink);
  border-right: 1px solid var(--arv-line);
}

/* Sticky first column. The scroller is the scrolling ancestor.
   z-index: 3 sits above day-headers (2) so dates scrolling left under
   the sticky col are fully covered, not just border-aligned. */
.arv-grid-sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--arv-surface-sunken);
  /* Solid right-edge separator so there's no see-through fringe between
     sticky col and the scrolling area. Stronger than the previous 1px
     hairline shadow. */
  box-shadow: 4px 0 6px -4px rgba(15, 23, 42, 0.15), 1px 0 0 var(--arv-line);
}
/* Corner cell (sticky on both axes) must beat everything else. */
.arv-grid-cell--head.arv-grid-sticky-col { z-index: 4; }

/* Pills — fill the entire cell so the whole rectangle is the click +
   hover target. The 4px padding on .arv-grid-cell acts as an inset
   frame so the pill still reads as a rounded chip. Doubled selector
   beats Blocksy's `button` reset. */
.arv-grid-pill,
button.arv-grid-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 8px;
  font: var(--font-label);
  font-size: 12px;
  letter-spacing: var(--label-tracking);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background-color var(--arv-dur-1) var(--arv-ease), color var(--arv-dur-1) var(--arv-ease), transform var(--arv-dur-1) var(--arv-ease);
  cursor: pointer;
  border: 0;
}
.arv-grid-pill--free {
  background: var(--arv-success-soft);
  color: var(--arv-success);
}
.arv-grid-pill--free:hover {
  background: var(--arv-primary-soft);
  color: var(--arv-primary);
  transform: translateY(-1px);
}
.arv-grid-pill--taken {
  background: var(--arv-danger-soft);
  color: var(--arv-danger);
  cursor: not-allowed;
}
.arv-grid-pill--selected {
  background: var(--arv-primary);
  color: var(--arv-on-primary);
  /* Theme-blue halo under the selected cell. */
  box-shadow: 0 4px 10px rgba(36, 65, 124, 0.28);
}
.arv-grid-pill--none {
  background: transparent;
  color: var(--arv-ink-faint);
  cursor: default;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Step 3 — Confirmation
   -------------------------------------------------------------------------- */
.arv-confirm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--arv-s-5);
}
@media (max-width: 720px) { .arv-confirm-grid { grid-template-columns: 1fr; } }

.arv-confirm-col {
  background: var(--arv-surface);
  border-radius: var(--arv-r-3);
  padding: var(--arv-s-5);
  /* 2px inset border to match Blocksy's form-field treatment so the
     two info cards read as siblings to the rules-acceptance card. */
  box-shadow: 0 0 0 2px var(--arv-line) inset;
  display: flex; flex-direction: column;
  gap: var(--arv-s-3);
  min-width: 0;
}
.arv-confirm-col--details {
  /* Subtle blue-tinted surface (Blocksy color-7) so the right column
     reads as the "summary / total" panel without screaming for attention. */
  background: var(--arv-primary-mist);
  box-shadow: 0 0 0 2px var(--arv-primary-soft) inset;
}

.arv-confirm-section-title {
  font: var(--font-title-sm);
  color: var(--arv-ink);
  margin-bottom: var(--arv-s-2);
  letter-spacing: -0.005em;
}

.arv-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--arv-s-3);
  padding-block: 4px;
  font-size: 14px;
}
.arv-info-row__label {
  color: var(--arv-ink-mute);
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}
.arv-info-row__value {
  color: var(--arv-ink);
  font: var(--font-body-strong);
  text-align: end;
  word-break: break-word;
}
.arv-info-row__value.is-muted { color: var(--arv-ink-faint); font-weight: 500; font-style: italic; }
.arv-info-row--field { align-items: center; }
.arv-info-row--field .arv-select { min-height: 36px; padding-block: 4px; }

/*
 * Inline customer-info input rows in step 3 (Vardas / El. paštas /
 * Telefonas / Automobilio numeris). Stack label above input so the
 * row reads as a labelled form field, not a key/value display.
 */
.arv-info-row--input {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--arv-s-2);
  padding-block: 6px;
}
.arv-info-row--input .arv-info-row__label {
  /* Keep label looking like the rest of the column — small uppercase
     so the form section visually rhymes with the read-only sibling rows. */
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--arv-ink-mute);
}
.arv-info-row__control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Form field — Blocksy form-field idiom: 2px border, 12px radius,
   50px height, focus ring on theme-blue. */
.arv-input {
  width: 100%;
  font: var(--font-body);
  color: var(--arv-ink);
  background: var(--arv-surface);
  border: 2px solid var(--theme-form-field-border-initial-color, var(--arv-line));
  border-radius: var(--theme-form-field-border-radius, var(--arv-r-2));
  padding: 10px 14px;
  min-height: var(--theme-form-field-height, 50px);
  appearance: none;
  -webkit-appearance: none;
  transition: var(--theme-transition,
    border-color var(--arv-dur-1) var(--arv-ease),
    box-shadow var(--arv-dur-1) var(--arv-ease));
}
.arv-input::placeholder { color: var(--arv-ink-faint); }
.arv-input:hover {
  border-color: var(--arv-primary-bright);
}
.arv-input:focus,
.arv-input:focus-visible {
  border-color: var(--theme-form-field-border-focus-color, var(--arv-primary-bright));
  outline: none;
  box-shadow: var(--arv-focus-ring);
}
.arv-input.is-invalid {
  border-color: var(--arv-danger);
  box-shadow: 0 0 0 3px rgba(180, 50, 31, 0.18);
}

.arv-field-error {
  font-size: 12px;
  line-height: 1.3;
  color: var(--arv-danger);
  min-height: 14px;
}
.arv-field-error:empty { display: none; }

.arv-bullets {
  margin-top: var(--arv-s-2);
  padding: var(--arv-s-3);
  background: var(--arv-surface-sunken);
  border-radius: var(--arv-r-2);
}
.arv-bullets__title {
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--arv-ink-mute);
  margin-bottom: 6px;
}
.arv-bullets__list {
  display: flex; flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--arv-ink-soft);
}
.arv-bullets__list li {
  position: relative;
  padding-left: 16px;
  line-height: 1.45;
}
.arv-bullets__list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--arv-primary);
}

/* Right-side details rows */
.arv-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--arv-s-3);
  padding-block: 8px;
  border-bottom: 1px solid var(--arv-line);
}
.arv-detail-row:last-of-type { border-bottom: 0; }
.arv-detail-row__label {
  color: var(--arv-ink-mute);
  font: var(--font-label);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}
.arv-detail-row__value {
  color: var(--arv-ink);
  font: var(--font-body-strong);
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.arv-detail-row__sub {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--arv-ink-mute);
  margin-top: 2px;
}
.arv-detail-row--total .arv-detail-row__label,
.arv-detail-row--total .arv-detail-row__value {
  color: var(--arv-primary-deep);
}
.arv-total-amount {
  font: var(--font-numeric-lg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/*
 * Cancellation-policy callout. Uses Blocksy's warm peach palette
 * (color-9 #FFE8DA) for a softer "important info" treatment than a
 * harsh yellow — the warm hue plays nicely against the cool blue
 * primary without screaming.
 */
.arv-alert-yellow {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--arv-s-4);
  padding: var(--arv-s-5);
  background: var(--arv-warn-soft);
  border-radius: var(--arv-r-3);
  color: var(--arv-warn-deep);
  border-left: 4px solid var(--arv-warn);
}
.arv-alert-yellow__icon {
  font-size: 22px;
  line-height: 1;
  /* Vertically align with the title baseline. */
  padding-top: 1px;
}
.arv-alert-yellow__title {
  font: var(--font-body-strong);
  margin-bottom: 4px;
  color: var(--arv-warn-deep);
}
.arv-alert-yellow__msg {
  font-size: 14px;
  color: var(--arv-ink-soft);
  line-height: 1.5;
}

/* Rules-acceptance card. 2px border + 12px radius so it visually
   slots into the same family as Blocksy's native form fields. */
.arv-rules-card {
  padding: var(--arv-s-4) var(--arv-s-5);
  background: var(--arv-surface);
  border-radius: var(--arv-r-3);
  box-shadow: 0 0 0 2px var(--arv-line) inset;
  display: flex; flex-direction: column;
  gap: 6px;
  transition: var(--theme-transition, box-shadow var(--arv-dur-1) var(--arv-ease));
}
.arv-rules-card:hover { box-shadow: 0 0 0 2px var(--arv-primary-bright) inset; }
.arv-rules-card:has(input:checked) { box-shadow: 0 0 0 2px var(--arv-primary) inset; }
.arv-rules-row {
  display: flex; align-items: center;
  gap: var(--arv-s-3);
  cursor: pointer;
  user-select: none;
}
.arv-checkbox {
  width: 20px; height: 20px;
  flex: 0 0 auto;
  accent-color: var(--arv-primary);
  cursor: pointer;
}
.arv-rules-text {
  font: var(--font-body-strong);
  color: var(--arv-ink);
}
.arv-rules-sub {
  font-size: 13px;
  color: var(--arv-ink-mute);
  padding-left: 32px;
}
.arv-link-inline {
  color: var(--theme-link-initial-color, var(--arv-primary-bright));
  text-decoration: underline;
  text-decoration-color: rgba(58, 93, 165, 0.45);
  text-underline-offset: 2px;
}
.arv-link-inline:hover {
  color: var(--theme-link-hover-color, var(--arv-primary));
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   Buttons (shared CTAs)
   -------------------------------------------------------------------------- */
.arv-actions {
  display: flex;
  align-items: center;
  gap: var(--arv-s-3);
  margin-top: var(--arv-s-2);
}
.arv-actions--end { justify-content: flex-end; }
.arv-actions--split { justify-content: space-between; }

/*
 * Selector scoped to `.arv-booking-widget` to defeat our own
 * `.arv-booking-widget button { padding: 0 }` reset (which also has
 * (0,1,1) specificity). Without the wrapper-class prefix here, the
 * reset wins and our buttons collapse to text-width.
 */
.arv-booking-widget .arv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--arv-s-2);
  min-height: var(--arv-tap);
  /* Generous internal padding lines up with Blocksy's button (5px 35px on
     a 62px-tall pill). Ours is 12px / 28px on 48px tap so the proportions
     read similarly without being chunkier than the surrounding theme. */
  padding: var(--arv-s-3) var(--arv-s-8);
  /* Pill shape — Blocksy uses border-radius 150px which on any
     reasonable button height is fully rounded. We use 999px for the
     same effect and consistency with our existing chip/pill tokens. */
  border-radius: var(--arv-r-pill);
  /* Match Blocksy's uppercase label treatment so primary CTAs read as
     theme-native, not as a stray plugin button. */
  font: var(--font-body-strong);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--arv-surface);
  color: var(--arv-ink);
  box-shadow: 0 0 0 1px var(--arv-line) inset;
  flex: 0 0 auto;
  text-align: center;
  /* Slight horizontal whitespace inside the pill to balance the uppercase
     letter-spacing visually. */
  white-space: nowrap;
}

.arv-booking-widget .arv-btn--lg {
  min-height: var(--arv-tap-lg);
  padding: var(--arv-s-4) var(--arv-s-10);
  font-size: 14px;
}

.arv-btn--ghost {
  background: transparent;
  /* Slightly muted ink so the back button reads tertiary next to a filled
     primary on the right. */
  color: var(--arv-ink-soft);
}
.arv-btn--ghost:hover {
  background: var(--arv-surface-sunken);
  color: var(--arv-ink);
}

/* Primary — disabled-looking pre-CTA-enabled state. Same pill shape, muted
   palette. Becomes Blocksy's deep blue once enabled. */
.arv-btn--primary {
  background: var(--arv-line);
  color: var(--arv-ink-faint);
  box-shadow: none;
}
.arv-btn--primary.is-enabled,
.arv-btn--primary:not(:disabled) {
  /* Use the theme's button color first so the primary CTA matches
     "Rezervuoti" in the Blocksy header etc. */
  background: var(--theme-button-background-initial-color, var(--arv-primary));
  color: var(--theme-button-text-initial-color, var(--arv-on-primary));
  box-shadow: 0 6px 16px rgba(36, 65, 124, 0.22);
}
.arv-btn--primary.is-enabled:hover,
.arv-btn--primary:not(:disabled):hover {
  background: var(--theme-button-background-hover-color, var(--arv-primary-bright));
  color: var(--theme-button-text-hover-color, var(--arv-on-primary));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(36, 65, 124, 0.30);
}
.arv-btn--primary.is-enabled:active { transform: translateY(0); }
.arv-btn--primary:disabled {
  cursor: not-allowed;
  background: var(--arv-line);
  color: var(--arv-ink-faint);
  box-shadow: none;
  transform: none;
}
.arv-btn[aria-busy="true"] { opacity: 0.85; cursor: progress; }

/* --------------------------------------------------------------------------
   States — loading, empty, error, toast
   -------------------------------------------------------------------------- */
.arv-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--arv-on-primary);
  border-radius: 50%;
  animation: arv-spin 750ms linear infinite;
  flex: 0 0 auto;
}
@keyframes arv-spin { to { transform: rotate(360deg); } }

.arv-state-loading {
  display: flex; flex-direction: column;
  gap: var(--arv-s-3);
  padding: var(--arv-s-6);
}

.arv-skeleton {
  display: block;
  background: linear-gradient(90deg,
    var(--arv-surface-sunken) 0%,
    var(--arv-line-soft) 50%,
    var(--arv-surface-sunken) 100%);
  background-size: 200% 100%;
  border-radius: var(--arv-r-2);
  animation: arv-shimmer 1.4s linear infinite;
  min-height: 16px;
}
.arv-skeleton--title { height: 28px; width: 50%; max-width: 320px; }
.arv-skeleton--card  { height: 80px; }
.arv-skeleton--text  { height: 16px; width: 70%; }
.arv-skeleton--pill  { height: 28px; width: 64px; border-radius: var(--arv-r-pill); }

@keyframes arv-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.arv-empty {
  text-align: center;
  padding: var(--arv-s-10) var(--arv-s-5);
  color: var(--arv-ink-mute);
  font: var(--font-body);
  background: var(--arv-surface-sunken);
  border-radius: var(--arv-r-3);
}

.arv-alert {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--arv-s-4);
  padding: var(--arv-s-5);
  background: var(--arv-danger-soft);
  border-radius: var(--arv-r-3);
  color: var(--arv-danger-deep);
  box-shadow: var(--arv-elev-1);
}
.arv-alert__icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--arv-danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.arv-alert__icon::before {
  content: "";
  width: 18px; height: 18px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><line x1='10' y1='5' x2='10' y2='11'/><circle cx='10' cy='14.5' r='0.6' fill='%23ffffff' stroke='none'/></svg>")
    center / contain no-repeat;
  display: block;
}
.arv-alert__body { display: flex; flex-direction: column; gap: var(--arv-s-3); min-width: 0; }
.arv-alert__title { font: var(--font-body-strong); color: var(--arv-danger-deep); }
.arv-alert__msg   { color: var(--arv-ink); font: var(--font-body); }

.arv-retry-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: var(--arv-tap);
  padding: 0 var(--arv-s-4);
  border-radius: var(--arv-r-2);
  background: #fff;
  color: var(--arv-danger-deep);
  font: var(--font-body-strong);
  box-shadow: var(--arv-elev-1);
}
.arv-retry-btn:hover { transform: translateY(-1px); box-shadow: var(--arv-elev-2); }

.arv-noscript {
  padding: var(--arv-s-3) var(--arv-s-4);
  background: var(--arv-surface-sunken);
  border-radius: var(--arv-r-2);
  color: var(--arv-ink-mute);
  font: var(--font-body);
}

.arv-toast-layer {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}
.arv-toast {
  background: var(--arv-ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--arv-r-2);
  font: var(--font-body-strong);
  box-shadow: var(--arv-elev-2);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--arv-dur-2) var(--arv-ease),
    transform var(--arv-dur-2) var(--arv-ease);
  pointer-events: auto;
  text-align: center;
}
.arv-toast.is-visible { opacity: 1; transform: translateY(0); }
.arv-toast--error { background: var(--arv-danger); color: #fff; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.arv-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Mobile (<= 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .arv-booking-widget { padding-inline: var(--arv-s-3); padding-bottom: var(--arv-s-10); }
  .arv-card { padding: var(--arv-s-5); border-radius: var(--arv-r-3); }
  .arv-page-title { font-size: 26px; }
  .arv-card-head {
    flex-direction: column;
    align-items: stretch;
  }
  .arv-grid-info { align-items: flex-start; text-align: start; }

  .arv-grid {
    grid-template-columns: 80px repeat(calc(var(--arv-grid-cols, 15) - 1), minmax(64px, 1fr));
  }
  .arv-grid-cell { min-height: 42px; padding: 3px; }
  .arv-grid-cell--label { font-size: 13px; padding-inline: var(--arv-s-2); }
  .arv-grid-pill { min-width: 0; min-height: 36px; padding: 2px 6px; font-size: 11px; }

  .arv-actions { flex-wrap: wrap; }
  .arv-actions .arv-btn { flex: 1 1 0; }

  .arv-stepper { max-width: 100%; }
}

/* --------------------------------------------------------------------------
   prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .arv-booking-widget *,
  .arv-booking-widget *::before,
  .arv-booking-widget *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
  }
  .arv-skeleton { animation: none; background: var(--arv-surface-sunken); }
  .arv-spinner  { animation-duration: 1.6s; }
  .arv-pond-tile:hover,
  .arv-grid-pill--free:hover,
  .arv-btn--primary:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   prefers-contrast: more
   -------------------------------------------------------------------------- */
@media (prefers-contrast: more) {
  .arv-booking-widget {
    --arv-ink-mute: #2a3128;
    --arv-line: #b6b3a8;
  }
  .arv-pond-tile,
  .arv-confirm-col,
  .arv-rules-card,
  .arv-grid-scroller {
    box-shadow: 0 0 0 1.5px var(--arv-ink) inset;
  }
}
