/* ==========================================================================
   NOTIFICATION POPUP (IMAGE MODAL) — WITH AUTO-SLIDING CAROUSEL
   Prefix: pw-popup- to prevent conflicts with existing website styles.
   ========================================================================== */

/* Scroll prevention on body */
body.pw-popup-locked {
  overflow: hidden !important;
  padding-right: var(--pw-scroll-scrollbar-width, 0px);
}

/* ── Overlay ── */
.pw-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.pw-popup-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.pw-popup-overlay.is-closing {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* ── Modal Container ── */
.pw-popup-container {
  position: relative;
  width: 520px;
  max-width: 92vw;
  border-radius: 18px;
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.08);
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.35s ease;
  overflow: hidden;
  background: #0f172a;
}

.pw-popup-overlay.is-active .pw-popup-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.pw-popup-overlay.is-closing .pw-popup-container {
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ── Close Button ── */
.pw-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
  transition: background 0.2s ease, transform 0.25s cubic-bezier(0.4,0,0.2,1);
}

.pw-popup-close::before,
.pw-popup-close::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: background 0.2s ease;
}
.pw-popup-close::before { transform: rotate(45deg); }
.pw-popup-close::after  { transform: rotate(-45deg); }

.pw-popup-close:hover {
  background: rgba(239, 68, 68, 0.75);
  transform: scale(1.1) rotate(90deg);
}
.pw-popup-close:focus-visible {
  outline: 3px solid #00a99d;
  outline-offset: 2px;
}

/* ── Slideshow Track ── */
.pw-popup-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.pw-popup-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
}

/* ── Each Slide ── */
.pw-popup-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  line-height: 0;
}

.pw-popup-slide img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  border-radius: 0;
  pointer-events: none;
  user-select: none;
}

/* ── Prev / Next Arrow Buttons ── */
.pw-popup-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}
.pw-popup-arrow:hover {
  background: rgba(0, 169, 157, 0.75);
  transform: translateY(-50%) scale(1.08);
}
.pw-popup-arrow:focus-visible {
  outline: 3px solid #00a99d;
  outline-offset: 2px;
}
.pw-popup-arrow-prev { left: 12px; }
.pw-popup-arrow-next { right: 12px; }

/* Arrow SVG icons */
.pw-popup-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Progress Bar ── */
.pw-popup-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #00a99d, #6cc04a);
  border-radius: 0 3px 3px 0;
  transition: width linear;
  z-index: 6;
}

/* ── Dot Indicators ── */
.pw-popup-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 0 14px;
  background: #0f172a;
}

.pw-popup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease, width 0.3s ease;
}

.pw-popup-dot.is-active {
  background: #00a99d;
  width: 24px;
  border-radius: 4px;
  transform: scaleY(1.1);
}

.pw-popup-dot:focus-visible {
  outline: 2px solid #00a99d;
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .pw-popup-container {
    width: 96vw;
    max-width: 96vw;
    border-radius: 14px;
  }
  .pw-popup-slide img {
    max-height: 65vh;
  }
  .pw-popup-arrow {
    width: 32px;
    height: 32px;
  }
  .pw-popup-arrow svg {
    width: 13px;
    height: 13px;
  }
  .pw-popup-arrow-prev { left: 8px; }
  .pw-popup-arrow-next { right: 8px; }
  .pw-popup-close {
    width: 32px;
    height: 32px;
    top: 10px;
    right: 10px;
  }
  .pw-popup-close::before,
  .pw-popup-close::after {
    width: 12px;
  }
}

@media (max-width: 360px) {
  .pw-popup-slide img {
    max-height: 58vh;
  }
}
