.tui-offers {
  --tui-blue: #1b115c;
  --tui-red: #d40e14;
  --tui-green: #00a568;
  --tui-border: #dcdcdc;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  contain: inline-size;
  margin: 30px 0 0;
  color: var(--tui-blue);
  font-family: tui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}

/* Kanoniczny licznik Ulubionych w globalnym headerze bloga. */
.header__icon--wishlist::after {
  content: none !important;
  display: none !important;
}

.tui-wishlist-count {
  position: absolute;
  z-index: 4;
  top: -5px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: var(--color-third, #f3cb47);
  color: #1b115c;
  font-family: tui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}

.tui-wishlist-count[hidden] {
  display: none !important;
}

.tui-wishlist-live {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 992px) {
  .header__icons--mobile .tui-wishlist-count {
    top: 0;
    left: 25px;
  }
}

.tui-offers-placement--post .tui-offers { margin-bottom: 32px; }
.thepost__content > .tui-offers,
.entry-content > .tui-offers { margin-bottom: 32px; }

.tui-offers *, .tui-offers *::before, .tui-offers *::after { box-sizing: border-box; }
.tui-offers a { text-decoration: none !important; }

.tui-offers__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.tui-offers__title {
  margin: 0;
  color: var(--tui-blue);
  font-family: ambit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 22px;
}

.tui-offers__controls { display: flex; flex: 0 0 auto; align-items: center; gap: 11px; }

.tui-offers__arrow {
  display: block;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tui-blue);
  cursor: pointer;
}

.tui-offers__arrow svg { display: block; width: 24px; height: 24px; fill: currentColor; }
.tui-offers__arrow--prev svg { transform: rotate(90deg); }
.tui-offers__arrow--next svg { transform: rotate(-90deg); }
.tui-offers__arrow:hover, .tui-offers__arrow:focus-visible { color: var(--tui-blue); outline: none; }
.tui-offers__arrow:focus-visible { border-radius: 50%; box-shadow: 0 0 0 3px #ffd600; }
.tui-offers__arrow:disabled { color: var(--tui-blue); cursor: default; opacity: 0.3; }

.tui-offers__track {
  display: grid;
  grid-auto-columns: 326px;
  grid-auto-flow: column;
  gap: 10px;
  width: 100%;
  padding: 0 2px 3px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
}

.tui-offers--slider .tui-offers__track,
.tui-offers--slider .tui-offers__card,
.tui-offers--slider .tui-offers__card a { cursor: grab; }
.tui-offers--slider .tui-offers__track--dragging,
.tui-offers--slider .tui-offers__track--dragging .tui-offers__card,
.tui-offers--slider .tui-offers__track--dragging .tui-offers__card a { cursor: grabbing; }
.tui-offers__track--dragging { scroll-behavior: auto; scroll-snap-type: none; user-select: none; }
.tui-offers__track button { cursor: pointer; }

.tui-offers__track:focus-visible {
  border-radius: 16px;
  outline: 3px solid #ffd600;
  outline-offset: 4px;
}

.tui-offers--grid .tui-offers__track {
  grid-template-columns: repeat(auto-fit, 326px);
  grid-auto-flow: row;
  grid-auto-rows: 1fr;
  overflow: visible;
}

.tui-offers__card {
  display: flex;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  overflow: visible;
  border: 1px solid var(--tui-border);
  border-radius: 16px;
  background: #fff;
  color: var(--tui-blue);
  flex-direction: column;
  scroll-snap-align: start;
}

.tui-offers__media {
  position: relative;
  height: 157px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #e2f3fe;
  flex: 0 0 157px;
}

.tui-offers__media > a, .tui-offers__media img { display: block; width: 100%; height: 100%; }
.tui-offers .tui-offers__media img { border-radius: 0 !important; }
.tui-offers__media img { object-fit: cover; user-select: none; -webkit-user-drag: none; }
.tui-offers__media img[data-tui-gallery] { transition: opacity .18s ease-in-out; }
.tui-offers__media img.tui-offers__gallery-swapping { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .tui-offers__media img[data-tui-gallery] { transition: none; } }

.tui-offers__image-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease;
  place-items: center;
}

.tui-offers__image-arrow--prev { left: 8px; }
.tui-offers__image-arrow--next { right: 10px; }
.tui-offers__image-arrow svg { display: block; width: 28px; height: 28px; fill: currentColor; filter: drop-shadow(0 2px 6px #636363); }
.tui-offers__image-arrow--next svg { transform: rotate(180deg); }
.tui-offers__image-arrow:hover { color: #fff; }
.tui-offers__image-arrow:focus-visible { outline: 3px solid #ffd600; outline-offset: 2px; }

@media (hover: hover) and (pointer: fine) {
  .tui-offers__media--gallery-ready:hover .tui-offers__image-arrow,
  .tui-offers__media--gallery-ready:focus-within .tui-offers__image-arrow { opacity: 1; pointer-events: auto; }
}

@media (hover: none), (pointer: coarse) {
  .tui-offers__media--gallery-ready .tui-offers__image-arrow { opacity: 1; pointer-events: auto; }
}

.tui-offers__ribbons {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 0;
  display: flex;
  align-items: flex-start;
  gap: 3px;
  flex-direction: column;
}

.tui-offers__ribbon {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 15px;
  border-radius: 0 999px 999px 0;
  font-family: tui, ambit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-transform: uppercase;
}

.tui-offers__favorite {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  display: flex;
  width: 45px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.tui-offers__favorite-icon {
  display: block;
  width: 28px;
  height: 28px;
  overflow: visible;
  fill: transparent;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 7;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.72));
}

.tui-offers__favorite-loader {
  display: none;
  width: 30px;
  height: 30px;
  fill: #fff;
  transform-origin: center;
}

.tui-offers__favorite:hover .tui-offers__favorite-icon { fill: rgba(27, 17, 92, 0.2); }
.tui-offers__favorite[aria-pressed="true"] { color: #fff; }
.tui-offers__favorite[aria-pressed="true"] .tui-offers__favorite-icon { fill: var(--tui-red); stroke: #fff; }
.tui-offers__favorite:focus-visible { border-radius: 50%; outline: 3px solid #ffd600; outline-offset: 2px; }
.tui-offers__favorite:disabled { cursor: wait; opacity: 1; }
.tui-offers__favorite--loading .tui-offers__favorite-icon { display: none; }
.tui-offers__favorite--loading .tui-offers__favorite-loader { display: block; animation: tui-heart-spin 1s linear infinite; }

@keyframes tui-heart-spin {
  to { transform: rotate(360deg); }
}


.tui-offers__rating {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: block;
  width: 76px;
  min-width: 76px;
  height: 34px;
  padding: 2px 4px;
  border-radius: 10px;
  background: var(--tui-green);
  color: #000;
  font-family: tui, ambit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  line-height: 1;
  text-align: right;
}

.tui-offers__rating-main { display: flex; height: 14px; align-items: flex-end; justify-content: flex-end; font-size: 14px; line-height: 14px; }
.tui-offers__rating-icon { display: block; width: 24px; height: 14px; margin-right: 5px; overflow: visible; }
.tui-offers__rating small { display: block; margin: 0; font-size: 12px; line-height: 16px; white-space: nowrap; }

.tui-offers__body {
  display: flex;
  min-height: 88px;
  align-items: flex-start;
  padding: 12px;
  flex: 1 0 auto;
  flex-direction: column;
  text-align: left;
}

.tui-offers__title-line { display: flex; width: 100%; max-width: 100%; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.tui-offers__hotel { width: 100%; margin: 0; max-width: 100%; color: var(--tui-blue); font-family: ambit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 18px; font-weight: 700; line-height: 18px; }
.tui-offers__hotel a { color: inherit !important; text-decoration: none !important; }
.tui-offers__hotel a:hover, .tui-offers__hotel a:focus-visible { color: inherit !important; text-decoration: none !important; }
.tui-offers__hotel-name { display: block; width: 100%; }
.tui-offers__stars { display: flex; width: auto; height: 18px; color: var(--tui-blue); flex: 0 0 auto; }
.tui-offers__star { display: block; width: 18px; height: 18px; overflow: hidden; flex: 0 0 18px; }
.tui-offers__star-icon { display: block; width: 20px; height: 20px; }
.tui-offers__tags { display: contents; }

.tui-offers__tag {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: ambit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.tui-offers__destination { min-height: 18px; margin: 6px 0 0; color: var(--tui-blue); font-family: tui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 12px; font-weight: 700; line-height: normal; text-transform: uppercase; }
.tui-offers__destination-sep { margin: 0 5px; }
.tui-offers__destination-link { color: inherit; text-decoration: none; }
.tui-offers__destination-link:hover, .tui-offers__destination-link:focus-visible { text-decoration: underline; }

.tui-offers__aside {
  display: flex;
  min-height: 50px;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 2px 12px 12px;
  overflow: hidden;
  border-radius: 0 0 16px 16px;
  flex: 0 0 50px;
}

.tui-offers__price {
  display: flex;
  width: 166px;
  min-width: 166px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--tui-red);
  color: #fff !important;
  font-family: ambit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none !important;
  white-space: nowrap;
}

.tui-offers__price:hover, .tui-offers__price:focus-visible { background: #ad0b10; color: #fff !important; text-decoration: none !important; outline: none; }
.tui-offers__price:focus-visible { border-radius: 999px; box-shadow: 0 0 0 3px #ffd600; }
.tui-offers__demo-note { margin: 8px 0 0; color: #636363; font-size: 12px; }

@media (min-width: 768px) and (max-width: 1023px) {
  .tui-offers__track { grid-auto-columns: 33vw; gap: 20px; }
}

@media (max-width: 767px) {
  .tui-offers__track { width: calc(100% + 15px); grid-auto-columns: min(calc(86.9565217% - 1.3043478px), 326px); margin-right: -15px; padding-right: 0; }
  .tui-offers--grid .tui-offers__track { grid-template-columns: 1fr; margin-right: 0; padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tui-offers__track { scroll-behavior: auto; }
  .tui-offers__favorite--loading .tui-offers__favorite-loader { animation: none; }
}
