/* assets/css/frontend.css */

/* ── Karuzela (wrapper) ─────────────────────────────────────────────────── */
.wpc-carousel {
  width: 100%;
  max-width: 100%;
}

.wpc-carousel .splide__track {
  border-radius: 4px;
  overflow: hidden;
}

/* ── Slajd ──────────────────────────────────────────────────────────────── */
.wpc-slide-figure {
  margin: 0;
  position: relative;
  line-height: 0;
}

.wpc-slide-figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.wpc-slide-figure figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff;
  font-size: .875rem;
  line-height: 1.4;
  padding: .6rem 1rem;
}

/* ── Strzałki ───────────────────────────────────────────────────────────── */
.wpc-carousel .splide__arrow {
  background: rgba(255, 255, 255, .85);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .2s, transform .2s;
}

.wpc-carousel .splide__arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.wpc-carousel .splide__arrow svg {
  fill: #333;
}

/* ── Dots (pagination) ──────────────────────────────────────────────────── */
.wpc-carousel .splide__pagination__page {
  background: rgba(0,0,0,.25);
  transition: background .2s, transform .2s;
}

.wpc-carousel .splide__pagination__page.is-active {
  background: #333;
  transform: scale(1.3);
}

/* ── Pojedyncza grafika [carousel slide="N"] ────────────────────────────── */
.wpc-single-image {
  margin: 0;
  line-height: 0;
}

.wpc-single-image img {
  width: 100%;
  height: auto;
  display: block;
}

.wpc-single-image figcaption {
  font-size: .875rem;
  color: #555;
  padding: .4rem 0;
  line-height: 1.4;
}

/* ── Share bar ──────────────────────────────────────────────────────────── */
.wpc-share-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .5rem 1rem !important;
  padding: .65rem .75rem !important;
  background: #f8f8f8 !important;
  border: 1px solid #e8e8e8 !important;
  border-top: none !important;
  border-radius: 0 0 4px 4px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.wpc-share-group {
  display: flex !important;
  align-items: center !important;
  gap: .45rem !important;
  flex-wrap: wrap !important;
}

.wpc-share-group-label {
  font-size: .72rem !important;
  color: #888 !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
  letter-spacing: .01em !important;
  line-height: 1 !important;
}

.wpc-share-divider {
  width: 1px !important;
  height: 28px !important;
  background: #ddd !important;
  flex-shrink: 0 !important;
  align-self: center !important;
}

.wpc-share-buttons {
  display: flex !important;
  gap: .3rem !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* ── Przycisk share ─────────────────────────────────────────────────────── */
.wpc-share-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: transform .15s, box-shadow .15s !important;
  position: relative !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.wpc-share-btn:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
}

/* Krytyczne: blokuj nadpisywanie SVG przez motyw (max-width:100% etc.) */
.wpc-share-btn svg {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

/* Facebook */
.wpc-share-fb { background: #1877f2 !important; }
.wpc-share-fb svg { fill: #fff !important; stroke: none !important; }

/* X / Twitter */
.wpc-share-tw { background: #000 !important; }
.wpc-share-tw svg { fill: #fff !important; stroke: none !important; }

/* LinkedIn */
.wpc-share-li { background: #0a66c2 !important; }
.wpc-share-li svg,
.wpc-share-li svg path,
.wpc-share-li svg rect,
.wpc-share-li svg circle { fill: #fff !important; stroke: none !important; }

/* WhatsApp */
.wpc-share-wa { background: #25d366 !important; }
.wpc-share-wa svg { fill: none !important; stroke: #fff !important; stroke-width: 2 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }

/* Kopiuj link */
.wpc-share-copy { background: #555 !important; }
.wpc-share-copy svg { fill: none !important; stroke: #fff !important; stroke-width: 2 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }

/* Tooltip "Skopiowano!" */
.wpc-copy-tip {
  display: none;
  position: absolute !important;
  bottom: calc(100% + 6px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: #222 !important;
  color: #fff !important;
  font-size: .7rem !important;
  white-space: nowrap !important;
  padding: 3px 8px !important;
  border-radius: 3px !important;
  pointer-events: none !important;
  z-index: 999 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
}
.wpc-copy-tip::after {
  content: '' !important;
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border: 4px solid transparent !important;
  border-top-color: #222 !important;
}
.wpc-share-copy.wpc-copied .wpc-copy-tip {
  display: block !important;
}

@media (max-width: 480px) {
  .wpc-share-divider { display: none !important; }
  .wpc-share-group   { width: 100% !important; }
}
