/* Auto-Impex Testovacia jazda
   Palette: red #DE262D (AUTO-IMPEX), ink #16181B, graphite #4B4F55, line #DADDE1, mist #F3F4F5, free #1B7F4C.
   Type: Teko (headlines, as on auto-impex.sk), DM Sans (text). */
.aitj, .aitj-dialog {
  --aitj-red: #DE262D;
  --aitj-red-dark: #B81D23;
  --aitj-ink: #16181B;
  --aitj-graphite: #4B4F55;
  --aitj-muted: #6B7076;
  --aitj-line: #DADDE1;
  --aitj-mist: #F3F4F5;
  --aitj-free: #1B7F4C;
  --aitj-display: "Teko", "Oswald", "Arial Narrow", sans-serif;
  --aitj-text: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html.aitj-lock { overflow: hidden; }

.aitj { display: grid; grid-template-columns: minmax(240px, 34%) 1fr; font-family: var(--aitj-text); color: var(--aitj-ink); background: #fff; text-align: left; line-height: 1.45; }
.aitj *, .aitj *::before, .aitj *::after { box-sizing: border-box; }
.aitj [hidden] { display: none !important; }
.aitj.is-picking { grid-template-columns: 1fr; }
.aitj.is-picking .aitj-ticket { display: none; }
.aitj--inline { border: 1px solid var(--aitj-line); min-height: 520px; margin: 24px 0; }

/* Ticket: the booking summary that fills in as the visitor chooses. */
.aitj-ticket { background: var(--aitj-ink); color: #fff; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.aitj-ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--aitj-red); }
.aitj-ticket__img { background: linear-gradient(180deg, #2A2D31 0%, var(--aitj-ink) 100%); padding: 28px 20px 8px; }
.aitj-ticket__img img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; }
.aitj-ticket__body { padding: 20px 28px 36px; }
.aitj-ticket__kicker { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; color: #B9BDC2; }
.aitj-ticket__model { font-family: var(--aitj-display); font-size: 40px; line-height: .95; font-weight: 500; margin: 0 0 18px; letter-spacing: .01em; }
.aitj-ticket__rows { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.aitj-ticket__rows dt { color: #9BA0A6; }
.aitj-ticket__rows dd { margin: 0; color: #fff; }
.aitj-ticket__rows dd.is-set { font-weight: 700; }
.aitj-ticket__rows dd.aitj-ticket__car { color: #C7CBD0; font-size: 13px; }
.aitj-ticket__note { margin: 16px 0 0; font-size: 13px; color: #B9BDC2; }

.aitj-panel { position: relative; padding: 28px 32px 32px; min-width: 0; }
.aitj-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 30px; line-height: 1; color: var(--aitj-graphite); cursor: pointer; }
.aitj-close:hover { color: var(--aitj-ink); }

.aitj-h { font-family: var(--aitj-display); font-weight: 500; font-size: 34px; line-height: 1; margin: 0 0 16px; color: var(--aitj-ink); }
.aitj-h:focus { outline: none; }
.aitj-label { margin: 18px 0 8px; font-weight: 700; font-size: 14px; }
.aitj-status { color: var(--aitj-muted); font-size: 14px; }
.aitj-test { margin: 0 0 14px; padding: 8px 12px; background: #FFF6D6; border-left: 3px solid #E0A800; font-size: 13px; }
.aitj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.aitj-steps { display: flex; gap: 20px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--aitj-muted); }
.aitj-steps li { display: flex; align-items: center; gap: 8px; margin: 0; }
.aitj-steps__n { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid var(--aitj-line); font-size: 12px; }
.aitj-steps .is-current { color: var(--aitj-ink); font-weight: 700; }
.aitj-steps .is-current .aitj-steps__n { background: var(--aitj-red); border-color: var(--aitj-red); color: #fff; }
.aitj-steps .is-done .aitj-steps__n { background: var(--aitj-ink); border-color: var(--aitj-ink); color: #fff; }

/* Buttons: square, like the site. */
.aitj-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 2px solid transparent; font: 700 15px/1 var(--aitj-text); text-decoration: none; cursor: pointer; border-radius: 0; }
.aitj-btn--primary { background: var(--aitj-red); color: #fff; }
.aitj-btn--primary:hover { background: var(--aitj-red-dark); color: #fff; }
.aitj-btn--primary:disabled { background: #C9CCD0; cursor: not-allowed; }
.aitj-btn--ghost { background: #fff; color: var(--aitj-ink); border-color: var(--aitj-ink); }
.aitj-btn--ghost:hover { background: var(--aitj-ink); color: #fff; }
.aitj-link { background: none; border: 0; padding: 0; margin: -6px 0 14px; color: var(--aitj-graphite); text-decoration: underline; font: 14px var(--aitj-text); cursor: pointer; }
.aitj-link:hover { color: var(--aitj-red); }
.aitj-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.aitj-summary { margin: 0; font-size: 14px; color: var(--aitj-graphite); }

.aitj :focus-visible, .aitj-dialog :focus-visible { outline: 3px solid var(--aitj-red); outline-offset: 2px; }

/* Model grid */
.aitj-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.aitj-models__brand { grid-column: 1 / -1; margin: 10px 0 0; font-weight: 700; font-size: 14px; }
.aitj-model { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 1px solid var(--aitj-line); background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.aitj-model:hover { border-color: var(--aitj-ink); }
.aitj-model img { width: 100%; height: 88px; object-fit: contain; margin-bottom: 6px; }
.aitj-model__noimg { width: 100%; height: 88px; background: var(--aitj-mist); margin-bottom: 6px; }
.aitj-model__name { font-family: var(--aitj-display); font-size: 22px; line-height: 1; }
.aitj-model__where { font-size: 12px; color: var(--aitj-muted); }

/* Branch choice */
.aitj-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 18px; }
.aitj-seg__btn { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--aitj-line); background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.aitj-seg__btn.is-on { border: 2px solid var(--aitj-ink); padding: 9px 13px; }
.aitj-seg__name { font-weight: 700; font-size: 15px; }
.aitj-seg__addr { font-size: 12px; color: var(--aitj-muted); }

/* Day rail */
.aitj-days { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.aitj-day { flex: 0 0 auto; width: 58px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; border: 1px solid var(--aitj-line); background: #fff; cursor: pointer; scroll-snap-align: start; font: inherit; color: inherit; position: relative; }
.aitj-day::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--aitj-free); margin-top: 4px; }
.aitj-day__wd { font-size: 12px; color: var(--aitj-muted); }
.aitj-day__n { font-family: var(--aitj-display); font-size: 28px; line-height: 1; margin-top: 2px; }
.aitj-day__m { font-size: 11px; color: var(--aitj-muted); }
.aitj-day:hover { border-color: var(--aitj-ink); }
.aitj-day.is-on { background: var(--aitj-ink); border-color: var(--aitj-ink); color: #fff; }
.aitj-day.is-on .aitj-day__wd, .aitj-day.is-on .aitj-day__m { color: #C7CBD0; }
.aitj-day.is-off { cursor: default; background: var(--aitj-mist); color: #A4A8AE; border-color: var(--aitj-mist); }
.aitj-day.is-off::after { background: transparent; }

.aitj-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.aitj-time { min-height: 44px; border: 1px solid var(--aitj-line); background: #fff; font: 700 15px var(--aitj-text); color: var(--aitj-ink); cursor: pointer; }
.aitj-time:hover { border-color: var(--aitj-ink); }
.aitj-time.is-on { background: var(--aitj-red); border-color: var(--aitj-red); color: #fff; }

.aitj-skeleton { display: flex; gap: 6px; margin: 4px 0 12px; }
.aitj-skeleton span { width: 58px; height: 72px; background: var(--aitj-mist); }
@media (prefers-reduced-motion: no-preference) {
  .aitj-skeleton span { animation: aitj-pulse 1.2s ease-in-out infinite; }
  @keyframes aitj-pulse { 50% { opacity: .45; } }
}

/* Form */
.aitj-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.aitj-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.aitj-field--wide { grid-column: 1 / -1; }
.aitj-field label { font-size: 14px; font-weight: 700; }
.aitj-input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #B8BCC1; border-radius: 0; background: #fff; font: 16px var(--aitj-text); color: var(--aitj-ink); }
textarea.aitj-input { min-height: 84px; resize: vertical; }
.aitj-input:focus { border-color: var(--aitj-ink); outline: 2px solid var(--aitj-ink); outline-offset: 0; }
.aitj-input[aria-invalid="true"] { border-color: var(--aitj-red); }
.aitj-hint { margin: 0; font-size: 12.5px; color: var(--aitj-muted); }
.aitj-err { margin: 0; font-size: 13px; color: var(--aitj-red-dark); font-weight: 700; }
.aitj-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.aitj-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--aitj-red); flex: 0 0 auto; }
.aitj-check--small { font-size: 13.5px; color: var(--aitj-graphite); }
.aitj-privacy { margin: 0; font-size: 12.5px; color: var(--aitj-muted); }
.aitj-privacy a { color: inherit; }
.aitj-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.aitj-alert { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--aitj-red); background: #FDECEC; font-size: 14px; }
.aitj-form .aitj-alert { margin: 0; }
.aitj-empty p { margin: 0 0 10px; }
.aitj-empty a { color: var(--aitj-red); font-weight: 700; }

/* Done */
.aitj-done__mark { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 0 14px; background: var(--aitj-free); color: #fff; font-size: 28px; }
.aitj-done__when { font-weight: 700; font-size: 18px; margin: -6px 0 10px; }

/* Dialog */
.aitj-dialog { padding: 0; border: 0; width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; box-shadow: 0 30px 80px rgba(10, 12, 14, .45); }
.aitj-dialog::backdrop { background: rgba(14, 16, 18, .62); }
.aitj-dialog .aitj { min-height: 560px; }

/* Buttons the plugin adds to the theme */
.aitj-open--auto { margin-left: 12px; }
.aitj-article-box { margin: 32px 0; padding: 20px 24px; border-left: 6px solid #DE262D; background: #F3F4F5; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.aitj-article-box__text { margin: 0; font-weight: 700; }
.aitj-page__wrap { max-width: 1140px; margin: 0 auto; padding: 40px 20px 64px; }
.aitj-page__title { margin: 0 0 8px; }
.aitj-page__lead { margin: 0 0 8px; max-width: 62ch; }

@media (max-width: 760px) {
  .aitj { grid-template-columns: 1fr; }
  .aitj-ticket { flex-direction: row; align-items: center; }
  .aitj-ticket::after { height: 4px; }
  .aitj-ticket__img { flex: 0 0 104px; padding: 12px 0 12px 12px; background: none; }
  .aitj-ticket__img img { max-height: 64px; }
  .aitj-ticket__body { padding: 12px 52px 16px 14px; }
  .aitj-ticket__kicker, .aitj-ticket__note { display: none; }
  .aitj-ticket__model { font-size: 26px; margin: 0 0 6px; }
  .aitj-ticket__rows { font-size: 12.5px; gap: 2px 10px; }
  .aitj-ticket__rows .aitj-ticket__car { display: none; }
  .aitj-panel { padding: 20px 16px 28px; }
  .aitj-close { color: #fff; top: 4px; right: 4px; }
  .aitj--modal .aitj-panel .aitj-close { position: fixed; z-index: 2; }
  .aitj-h { font-size: 28px; }
  .aitj-form { grid-template-columns: 1fr; }
  .aitj-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .aitj-dialog .aitj { min-height: 100%; }
  .aitj-actions .aitj-btn--primary { width: 100%; }
  .aitj-open--auto { margin: 10px 0 0; }
}

/* Event: night / weekend loan */
.aitj-ticket__bonus { display: inline-block; margin: 0 0 12px; padding: 4px 10px; background: var(--aitj-red); color: #fff; font-weight: 700; font-size: 13px; }
.aitj-ptypes { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.aitj-ptype { min-height: 40px; padding: 0 14px; border: 1px solid var(--aitj-line); background: #fff; font: 700 14px var(--aitj-text); color: var(--aitj-ink); cursor: pointer; }
.aitj-ptype span { color: var(--aitj-muted); font-weight: 400; margin-left: 4px; }
.aitj-ptype.is-on { background: var(--aitj-ink); border-color: var(--aitj-ink); color: #fff; }
.aitj-ptype.is-on span { color: #C7CBD0; }
.aitj-periods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px; }
.aitj-period { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--aitj-line); background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.aitj-period:hover { border-color: var(--aitj-ink); }
.aitj-period__type { font-size: 12px; font-weight: 700; color: var(--aitj-graphite); text-transform: uppercase; letter-spacing: .04em; }
.aitj-period.is-weekend .aitj-period__type { color: var(--aitj-red); }
.aitj-period__h { grid-row: 1 / span 3; grid-column: 2; align-self: center; font-family: var(--aitj-display); font-size: 26px; line-height: 1; color: var(--aitj-graphite); }
.aitj-period__from { font-weight: 700; font-size: 14.5px; }
.aitj-period__to { font-size: 13px; color: var(--aitj-muted); }
.aitj-period.is-on { border: 2px solid var(--aitj-red); padding: 9px 11px; }
.aitj-terms { border-left: 4px solid var(--aitj-red); background: var(--aitj-mist); padding: 10px 14px; font-size: 13.5px; }
.aitj-terms p { margin: 0 0 6px; }
.aitj-terms p:last-child { margin: 0; color: var(--aitj-graphite); }
.aitj-terms__h { font-weight: 700; font-size: 15px; }
.aitj-done__bonus { display: inline-block; padding: 6px 12px; background: var(--aitj-red); color: #fff; font-weight: 700; margin: 0 0 10px; }
.aitj-open--event { margin-left: 12px; }
@media (max-width: 760px) { .aitj-open--event { margin: 10px 0 0; } .aitj-periods { max-height: none; } }

.aitj-event-kicker { display: inline-block; margin: 0 0 10px; padding: 4px 10px; background: #DE262D; color: #fff; font-weight: 700; font-size: 13px; }
.aitj-event-facts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.aitj-event-facts li { border: 1px solid #DADDE1; padding: 8px 14px; font-size: 15px; }
.aitj-event-terms { font-size: 13px; color: #4B4F55; max-width: 80ch; }
