/* itbs-catalog-day-calendar */
/* The catalog's «another day» month calendar (assets/catalog-day-calendar.js; the panel around it is the theme's). */
.itbs-dcal { width: 100%; color: var(--t-ink, #0f172a); font-family: var(--t-font, inherit); }
.itbs-dcal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.itbs-dcal__title { flex: 1; text-align: center; font-size: 15.5px; font-weight: 850; letter-spacing: -.01em; }
body .itbs-dcal__nav { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--t-line, #e2e8f0); border-radius: 50%; background: var(--t-surface, #fff); color: var(--t-ink, #0f172a); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.itbs-dcal__nav--next svg { transform: scaleX(-1); }
body .itbs-dcal__nav:hover:not(:disabled), body .itbs-dcal__nav:focus-visible { border-color: var(--t-ink, #0f172a); outline: 0; }
body .itbs-dcal__nav:disabled { opacity: .3; cursor: default; }
.itbs-dcal__week, .itbs-dcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.itbs-dcal__week span { padding: 2px 0 6px; color: var(--t-muted, #64748b); font-size: 11.5px; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .02em; }
body .itbs-dcal__d { display: grid; place-items: center; height: 40px; border-radius: 12px; color: var(--t-ink, #0f172a); font-size: 14.5px; font-weight: 750; text-decoration: none; transition: background .12s ease, color .12s ease; }
body a.itbs-dcal__d:hover, body a.itbs-dcal__d:focus-visible { background: var(--t-soft, #f1f5f9); color: var(--t-ink, #0f172a); outline: 0; }
body .itbs-dcal__d.is-weekend { color: var(--t-accent, #0f766e); }
body .itbs-dcal__d.is-today { box-shadow: inset 0 0 0 1.5px var(--t-accent, #0f766e); }
body .itbs-dcal__d.is-sel, body a.itbs-dcal__d.is-sel:hover { background: var(--t-accent, #0f766e); color: #fff; box-shadow: none; }
body .itbs-dcal__d.is-off { color: var(--t-muted, #64748b); opacity: .35; font-weight: 600; }
.itbs-dcal__d.is-blank { visibility: hidden; }

/* itbs-catalog-when */
/* The catalogs' «when / guests» (inc/catalog-when.php, assets/catalog-day-calendar.js): one look in every site theme, the
   theme's own colours and font. On a phone the window is a sheet from the bottom; on a computer — a panel under the field. */
.itbs-when { --w-accent: var(--t-accent, #0f766e); --w-soft: color-mix(in srgb, var(--w-accent) 12%, #fff); --w-ink: var(--t-ink, #0f172a); --w-muted: var(--t-muted, #64748b); --w-line: var(--t-line, #e2e8f0);
    display: grid; gap: 10px; min-width: 0; font-family: var(--t-font, inherit); color: var(--w-ink); }
.itbs-when__fields { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.itbs-when__when { position: relative; flex: 1 1 auto; min-width: 0; }
.itbs-when__pick { position: relative; }
.itbs-when__pick > summary { list-style: none; }
.itbs-when__pick > summary::-webkit-details-marker { display: none; }
.itbs-when__field, .itbs-when__guests { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 14px; border: 1.5px solid var(--w-line); border-radius: 16px; background: var(--t-surface, #fff); box-sizing: border-box; }
.itbs-when__field { cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.itbs-when__field:hover, .itbs-when__pick[open] > .itbs-when__field { border-color: var(--w-ink); }
.itbs-when__field:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; }
.itbs-when__field.is-set { padding-right: 46px; border-color: var(--w-accent); background: var(--w-soft); }
.itbs-when__field .itbs-icon, .itbs-when__guests > .itbs-icon { flex: none; color: var(--w-accent); }
.itbs-when__field > span, .itbs-when__guests > span:not(.itbs-when__step) { display: grid; min-width: 0; line-height: 1.15; }
.itbs-when small { color: var(--w-muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.itbs-when__field b, .itbs-when__guests b { overflow: hidden; font-size: 15.5px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.itbs-when__clear { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--w-muted); transform: translateY(-50%); }
.itbs-when__clear:hover, .itbs-when__clear:focus-visible { background: #fff; color: var(--w-ink); outline: 0; }
.itbs-when__people { flex: none; }
.itbs-when__guests { padding-right: 16px; }
/* the «Guests» window: adults and children, «Done» */
.itbs-when__people .itbs-when__panel { width: 320px; }
.itbs-when__party { display: grid; gap: 4px; margin: 0; }
.itbs-when__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; border-bottom: 1px solid var(--w-line); }
.itbs-when__row b { font-size: 16px; font-weight: 800; }
.itbs-when__step { display: inline-flex; align-items: center; gap: 6px; }
body .itbs-when__step > button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--w-line); border-radius: 50%; background: var(--t-surface, #fff); color: var(--w-ink); font: 700 20px/1 var(--t-font, inherit); cursor: pointer; }
body .itbs-when__step > button:hover:not(:disabled), body .itbs-when__step > button:focus-visible { border-color: var(--w-ink); outline: 0; }
body .itbs-when__step > button:disabled { opacity: .3; cursor: default; }
body .itbs-when__step > input { width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--w-ink); font: 850 18px var(--t-font, inherit); text-align: center; -moz-appearance: textfield; appearance: textfield; }
.itbs-when__step > input::-webkit-outer-spin-button, .itbs-when__step > input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.itbs-when__party .itbs-when__foot { margin-top: 10px; }
.itbs-when__party .itbs-when__go { border: 0; cursor: pointer; font-family: inherit; }
.itbs-when__quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.itbs-when__quick::-webkit-scrollbar { display: none; }
.itbs-when__quick--wrap { flex-wrap: wrap; overflow: visible; margin-bottom: 12px; }
.itbs-when__chip { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--w-line); border-radius: 999px; background: var(--t-surface, #fff); color: var(--w-ink); font-size: 13.5px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: border-color .15s ease; }
.itbs-when__chip:hover, .itbs-when__chip:focus-visible { border-color: var(--w-ink); outline: 0; }
.itbs-when__chip.is-active { border-color: var(--w-accent); background: var(--w-accent); color: var(--t-accent-ink, #fff); }
.itbs-when__hint { margin: 0; padding: 10px 12px; border-radius: 14px; background: #fffbeb; color: #92400e; font-size: 13.5px; font-weight: 650; line-height: 1.4; }
.itbs-when__hint a { color: var(--w-accent); font-weight: 800; }

/* «Where»: the destinations in the same window (owner 2026-12-05) */
.itbs-when__where { flex: 0 0 auto; width: 230px; }
.itbs-when__where > .itbs-when__field > .itbs-icon:last-child { margin-left: auto; color: var(--w-muted); }
.itbs-when__places { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; max-height: min(60vh, 520px); overflow-y: auto; }
.itbs-when__place { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 14px; color: var(--w-ink); text-decoration: none; }
.itbs-when__place:hover, .itbs-when__place:focus-visible { background: var(--t-soft, #f1f5f9); outline: 0; }
.itbs-when__place.is-active { background: var(--w-soft); }
.itbs-when__place b { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 800; }
.itbs-when__place small { color: var(--w-muted); font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.itbs-when__thumb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: var(--t-soft, #f1f5f9); color: var(--w-accent); }
.itbs-when__thumb.is-all { background: var(--w-soft); }
.itbs-when__thumb img { width: 100%; height: 100%; object-fit: cover; }
.itbs-when__where .itbs-when__panel { width: 340px; }

/* what the choice found, right under the filter (owner 2026-12-05: «надо какую-то индикацию, что поиск уже произошёл») */
.itbs-when__found { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, #16a34a 10%, #fff); color: #166534; font-size: 14.5px; }
.itbs-when__found > span { display: inline-flex; align-items: center; gap: 8px; }
.itbs-when__found b { font-weight: 850; }
.itbs-when__found a { margin-left: auto; color: inherit; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.itbs-when__found.is-none { background: #fffbeb; color: #92400e; }
.itbs-when__found.is-none a { margin-left: 0; }
.itbs-when__found.is-none a:first-of-type { margin-left: auto; }
.itbs-when__found.is-new { animation: itbs-when-found 1.4s ease-out 1; }
@keyframes itbs-when-found { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--w-accent) 55%, transparent); transform: scale(1.02); } 60% { box-shadow: 0 0 0 10px transparent; transform: scale(1); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .itbs-when__found.is-new { animation: none; } }

/* The bar folds while it rides along under the header (owner 2026-12-05: «фильтры слишком сильно нависают на десктопе —
   сворачивать при прокрутке»): assets/catalog-day-calendar.js marks a theme's sticky bar «itbs-cbar-compact» once the page
   scrolls past it — one line with Where / When / Guests, the count and a button for the search and the sort. */
.itbs-when__more { display: none; }
.itbs-cbar-compact [data-itbs-cbar-more], .itbs-cbar-compact .itbs-when__quick, .itbs-cbar-compact .itbs-when__hint { display: none !important; }
.itbs-cbar-compact .itbs-when__field, .itbs-cbar-compact .itbs-when__guests { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.itbs-cbar-compact .itbs-when__found { grid-column: auto; padding: 8px 14px; }
body .itbs-cbar-compact .itbs-when__more { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--w-line); border-radius: 14px; background: var(--t-surface, #fff); color: var(--w-ink); font: 800 14px var(--t-font, inherit); white-space: nowrap; cursor: pointer; }
body .itbs-cbar-compact .itbs-when__more:hover, body .itbs-cbar-compact .itbs-when__more:focus-visible { border-color: var(--w-ink); outline: 0; }
.itbs-when__more .itbs-icon { color: var(--w-accent); }

/* the phone's sheet — above everything while open: a bar's own stacking or a glass (backdrop) bar would hold a fixed sheet
   inside it. Phones only: on a computer the window is a panel under its field, and raising the catalog over everything
   put the tours over the site's header while a sticky bar's window was open (2026-12-05). */
@media (max-width: 760px) { html.itbs-when-open *:has(.itbs-when__pick[open]) { z-index: 2147482000 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transform: none !important; filter: none !important; contain: none !important; } }

.itbs-when__sheet { position: absolute; z-index: 70; top: calc(100% + 8px); left: 0; }
.itbs-when__panel { box-sizing: border-box; width: 380px; max-width: calc(100vw - 32px); padding: 16px; border: 1px solid var(--w-line); border-radius: 20px; background: var(--t-surface, #fff); box-shadow: 0 24px 50px -22px rgba(15, 23, 42, .45); }
.itbs-when__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.itbs-when__head b { font-size: 18px; font-weight: 850; letter-spacing: -.01em; }
body .itbs-when__close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--w-muted); cursor: pointer; }
body .itbs-when__close:hover, body .itbs-when__close:focus-visible { background: var(--t-soft, #f1f5f9); color: var(--w-ink); outline: 0; }
.itbs-when__note { margin: 8px 2px 0; color: var(--w-muted); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.itbs-when__foot { display: flex; gap: 8px; margin-top: 12px; }
.itbs-when__reset, .itbs-when__go { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 16px; border-radius: 16px; font-size: 15px; font-weight: 850; text-decoration: none; }
.itbs-when__reset { flex: none; border: 1px solid var(--w-line); color: var(--w-ink); }
.itbs-when__go { flex: 1; background: var(--w-accent); color: var(--t-accent-ink, #fff); text-align: center; }
.itbs-when__go.is-idle, .itbs-when__go.is-empty { opacity: .55; }
.itbs-when__reset:hover, .itbs-when__reset:focus-visible { border-color: var(--w-ink); outline: 0; }
.itbs-when__go:focus-visible { outline: 2px solid var(--w-ink); outline-offset: 2px; }

/* a period in the calendar: the first and last day filled, the days between on a band */
.itbs-when .itbs-dcal__grid { gap: 3px 0; }
body .itbs-when button.itbs-dcal__d { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 750; cursor: pointer; }
body .itbs-when button.itbs-dcal__d > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
body .itbs-when button.itbs-dcal__d:hover > span, body .itbs-when button.itbs-dcal__d:focus-visible > span { background: var(--t-soft, #f1f5f9); }
body .itbs-when button.itbs-dcal__d:focus-visible { outline: 0; }
body .itbs-when .itbs-dcal__d.is-today { box-shadow: none; }
body .itbs-when .itbs-dcal__d.is-today > span { box-shadow: inset 0 0 0 1.5px var(--w-accent); }
body .itbs-when .itbs-dcal__d.is-in { background: var(--w-soft); }
body .itbs-when .itbs-dcal__d.is-from:not(.is-to) { background: linear-gradient(90deg, transparent 50%, var(--w-soft) 50%); }
body .itbs-when .itbs-dcal__d.is-to:not(.is-from) { background: linear-gradient(90deg, var(--w-soft) 50%, transparent 50%); }
body .itbs-when .itbs-dcal__d.is-from > span, body .itbs-when .itbs-dcal__d.is-to > span { background: var(--w-accent); color: var(--t-accent-ink, #fff); box-shadow: none; }
body .itbs-when span.itbs-dcal__d > span { display: grid; place-items: center; width: 40px; height: 40px; }

/* a computer: the two fields at their own width, the quick choices beside them */
@media (min-width: 900px) {
    .itbs-when { grid-template-columns: max-content minmax(0, 1fr); align-items: center; column-gap: 12px; }
    .itbs-when__when { flex: 0 0 auto; width: 290px; }
    .itbs-when__hint, .itbs-when__found { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .itbs-when__fields { flex-wrap: nowrap; }
    .itbs-when__fields.has-where { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .itbs-when__fields.has-where .itbs-when__where { grid-column: 1 / -1; width: auto; }
    .itbs-when__where .itbs-when__panel { width: 100%; }
    .itbs-when__places { max-height: none; }
    .itbs-when__field, .itbs-when__guests { min-height: 52px; padding: 7px 12px; }
    .itbs-when__guests { padding-right: 14px; }
    .itbs-when__guests > span small { display: none; }
    .itbs-when__people .itbs-when__panel { width: 100%; }
    /* the sheet: the page dimmed, the panel from the bottom, the page under it still */
    .itbs-when__sheet { position: fixed; inset: 0; z-index: 2147482000; top: 0; display: flex; align-items: flex-end; background: rgba(15, 23, 42, .45); }
    .itbs-when__panel { width: 100%; max-width: none; max-height: 92vh; max-height: 92dvh; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(15, 23, 42, .25); }
    .itbs-when__panel::before { content: ""; display: block; width: 42px; height: 5px; margin: 0 auto 10px; border-radius: 9px; background: var(--w-line); }
    html.itbs-when-open, html.itbs-when-open body { overflow: hidden; }
}

