/*
 * Caledros Basic Blocks - Easy to use Gutenberg blocks
 * Copyright (C) 2025  David Arnado
 * 
 * This file is part of Caledros Basic Blocks.
 * 
 * Caledros Basic Blocks is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.

 * Caledros Basic Blocks is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License along
 * with Caledros Basic Blocks; if not, see <https://www.gnu.org/licenses/>.
 */

/*General styles*/
.swiper {
  width: 100%;
  height: 100%;
}

.cbb-image-gallery img {
  max-width: 100%;
  max-height: 100%;
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  position: absolute;
  left: 50%;
  top: 50%;
  object-fit: cover;
  user-select: none;
}

/*Light mode*/
.cbb-image-gallery .swiper-button-next,
.cbb-image-gallery .swiper-button-prev,
.cbb-image-gallery .swiper-pagination {
  color: var(--cbb-slider-light-color, #000);
}
.cbb-image-gallery .swiper-pagination-bullet {
  height: 20px;
  width: 20px;
  border: 2px solid var(--cbb-slider-light-color, #000);
  opacity: 1;
  background: none;
}
.cbb-image-gallery .swiper-pagination-bullet-active {
  background-color: var(--cbb-slider-light-color, #000);
  height: 20px;
  width: 20px;
  border: 2px solid var(--cbb-slider-light-color, #000);
}
.cbb-image-gallery
  .swiper-pagination-progressbar
  .swiper-pagination-progressbar-fill {
  background-color: var(--cbb-slider-light-color, #000);
}

/*Dark mode*/
html[data-theme="dark"] .cbb-image-gallery .swiper-button-next,
html[data-theme="dark"] .cbb-image-gallery .swiper-button-prev,
html[data-theme="dark"] .cbb-image-gallery .swiper-pagination {
  color: var(--cbb-slider-dark-color, #fff);
}
html[data-theme="dark"] .cbb-image-gallery .swiper-pagination-bullet {
  height: 20px;
  width: 20px;
  border: 2px solid var(--cbb-slider-dark-color, #fff);
  opacity: 1;
  background: none;
}
html[data-theme="dark"] .cbb-image-gallery .swiper-pagination-bullet-active {
  height: 20px;
  width: 20px;
  border: 2px solid var(--cbb-slider-dark-color, #fff);
  opacity: 1;
  background-color: var(--cbb-slider-dark-color, #fff);
}
html[data-theme="dark"]
  .cbb-image-gallery
  .swiper-pagination-progressbar
  .swiper-pagination-progressbar-fill {
  background-color: var(--cbb-slider-dark-color, #000);
}

/*Fix for y-scroll*/
.swiper-css-mode > .swiper-wrapper {
  overflow-y: hidden !important;
}
