/* ================================================
   CAROUSEL (Swiper)
   Kolor strzałek i kropek: --ttc-carousel-color
   ================================================ */

.ttc-carousel {
  --ttc-carousel-color: var(--wp--preset--color--base-txt);
  --swiper-theme-color: var(--ttc-carousel-color);
  --swiper-navigation-color: var(--ttc-carousel-color);
  --swiper-pagination-color: var(--ttc-carousel-color);
}

/* nadpisanie siatki WP (body .is-layout-grid ma specyficzność 0,1,1) */
body .ttc-carousel ul.wp-block-post-template.swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 0; /* odstępy daje Swiper (spaceBetween) */
  max-width: none;
  grid-template-columns: none;
  margin: 0;
  padding: 0;
}

body .ttc-carousel .wp-block-post.swiper-slide {
  height: auto; /* równa wysokość kart */
  min-width: 0;
  cursor: grab;
}

/* gradient wygasza urwany slajd po prawej, działa na każdym tle */
body .ttc-carousel .wp-block-query.swiper {
  mask-image: linear-gradient(to right, #000 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

/* --- sterowanie --- */

.ttc-carousel__controls {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.ttc-carousel--arrows .ttc-carousel__controls {
  justify-content: flex-end;
  gap: 0.5rem;
}

/* kropki */
body .ttc-carousel .swiper-pagination {
  position: static;
  width: auto;
}

/* strzałki */
body .ttc-carousel .swiper-button-prev,
body .ttc-carousel .swiper-button-next {
  position: static;
  margin: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: none;
}

body .ttc-carousel .swiper-navigation-icon {
  width: auto;
  height: 1.25rem;
}

body .ttc-carousel .swiper-button-prev:focus-visible,
body .ttc-carousel .swiper-button-next:focus-visible {
  outline: 2px solid var(--ttc-carousel-color);
  outline-offset: 2px;
}
