/**
 * WCRS Gallery Widget Styles
 *
 * Swiper carousel gallery with custom navigation.
 * WCAG 2.1 AA compliant.
 */

/* ==========================================================================
   Container
   ========================================================================== */

.wcrs-gallery {
  display: flex;
  flex-direction: column;
  position: relative;
}

.wcrs-gallery-container {
  position: relative;
}

/* ==========================================================================
   Swiper Overrides
   ========================================================================== */

.wcrs-gallery-swiper {
  overflow-x: hidden;
  overflow-y: visible;
}

.wcrs-gallery-swiper .swiper-wrapper {
  display: flex;
}

.wcrs-gallery-slide {
  width: 231px;
  height: 231px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
}

/* ==========================================================================
   Image & Lightbox Link
   ========================================================================== */

.wcrs-gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.wcrs-gallery-image {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* ==========================================================================
   Placeholder (Editor preview)
   ========================================================================== */

.wcrs-gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  border-radius: 20px;
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */

.wcrs-gallery-nav-button {
  position: absolute;
  top: 50%;
  /* Pionowe wyśrodkowanie i pozycja lewo/prawo to wartości domyślne — widget
     Elementora nadpisuje je swoimi kontrolkami (arrow_offset, arrow_offset_y),
     bo ma wyższą specyficzność. Bez nich galeria w karcie akordeonu nie miała
     żadnego zaczepienia i strzałki lądowały na pierwszym zdjęciu. */
  transform: translateY(-50%);
  z-index: 10;

  /* Reset button styles */
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;

  /* Sizing */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;

  /* Styling */
  color: #012d5b;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

/* Te same wartości, co domyślne kontrolki widgetu (arrow_offset_x = -40 px):
   strzałki stoją w marginesie obok zdjęć, nie na nich. */
.wcrs-gallery-nav-prev {
  left: -40px;
}

.wcrs-gallery-nav-next {
  right: -40px;
}

.wcrs-gallery-nav-button:hover {
  /* opacity: 0.7; */
  cursor: pointer;
}

.wcrs-gallery-nav-button:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

.wcrs-gallery-nav-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

.wcrs-gallery-nav-button svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Disabled state */
.wcrs-gallery-nav-button.swiper-button-disabled {
  opacity: 0;
  cursor: not-allowed;
  pointer-events: none;
}

/* Pozycja strzałek kontrolowana przez Elementor (arrow_offset) */

/* ==========================================================================
   Credits Text
   ========================================================================== */

.wcrs-gallery-credits {
  font-family: "sofia-pro", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 22px;
  color: #012d5b;
  margin: 16px 0 0 0;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.wcrs-gallery-empty {
  font-family: "sofia-pro", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 22px;
  color: #9d9d9d;
  margin: 0;
  padding: 16px;
  text-align: center;
}

/* Responsive - wielkości kontrolowane przez Elementor */
