/* =========================================================
   80-modals.css — BeautyTrouvailles Modals
   Version: 3.0 — Premium Lightbox & Share Dialog
   
   Contents:
   1. Modal Base
   2. Lightbox
   3. Share Modal
   4. Body Lock
   ========================================================= */

/* =========================
   1. MODAL BASE
   ========================= */
.bt-custom-product-page .bt-lightbox,
.bt-custom-product-page .bt-share-modal {
  position: fixed;
  inset: 0;
  z-index: var(--bt-z-modal);
  
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--bt-space-5);
  
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--bt-transition-base),
              visibility var(--bt-transition-base);
}

.bt-custom-product-page .bt-lightbox.active,
.bt-custom-product-page .bt-share-modal.active {
  opacity: 1;
  visibility: visible;
}

/* =========================
   2. LIGHTBOX
   ========================= */
.bt-custom-product-page .bt-lightbox-content {
  position: relative;
  max-width: min(92vw, 980px);
  max-height: 86vh;
}

.bt-custom-product-page .bt-lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--bt-radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  
  animation: bt-lightbox-zoom 0.25s var(--bt-ease-out);
}

@keyframes bt-lightbox-zoom {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Close button */
.bt-custom-product-page .bt-lightbox-close {
  position: absolute;
  top: var(--bt-space-4);
  right: var(--bt-space-4);
  z-index: 1;
  
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--bt-radius-full);
  
  display: grid;
  place-items: center;
  
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  
  transition: background var(--bt-transition-fast),
              transform var(--bt-transition-fast);
}

.bt-custom-product-page .bt-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* Navigation arrows */
.bt-custom-product-page .bt-lightbox-prev,
.bt-custom-product-page .bt-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--bt-radius-full);
  
  display: grid;
  place-items: center;
  
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  
  transition: background var(--bt-transition-fast),
              transform var(--bt-transition-fast);
}

.bt-custom-product-page .bt-lightbox-prev {
  left: var(--bt-space-4);
}

.bt-custom-product-page .bt-lightbox-next {
  right: var(--bt-space-4);
}

.bt-custom-product-page .bt-lightbox-prev:hover,
.bt-custom-product-page .bt-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.bt-custom-product-page .bt-lightbox-prev i,
.bt-custom-product-page .bt-lightbox-next i {
  font-size: var(--bt-text-lg);
}

/* =========================
   3. SHARE MODAL
   ========================= */
.bt-custom-product-page .bt-share-content {
  position: relative;
  width: min(480px, 92vw);
  padding: var(--bt-space-5);
  
  background: var(--bt-bg-card);
  border-radius: var(--bt-card-radius);
  border: var(--bt-card-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  
  animation: bt-modal-slide 0.25s var(--bt-ease-out);
}

@keyframes bt-modal-slide {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bt-custom-product-page .bt-share-content h3 {
  margin: 0 0 var(--bt-space-4);
  font-family: var(--bt-font-body);
  font-weight: 900;
  font-size: var(--bt-text-xl);
  color: var(--bt-navy);
}

/* Share close button */
.bt-custom-product-page .bt-share-close {
  position: absolute;
  top: var(--bt-space-3);
  right: var(--bt-space-3);
  
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--bt-radius-full);
  
  display: grid;
  place-items: center;
  
  font-size: 22px;
  line-height: 1;
  color: var(--bt-navy);
  background: rgba(17, 24, 39, 0.06);
  cursor: pointer;
  
  transition: background var(--bt-transition-fast),
              transform var(--bt-transition-fast);
}

.bt-custom-product-page .bt-share-close:hover {
  background: rgba(17, 24, 39, 0.1);
  transform: scale(1.05);
}

/* Social share buttons */
.bt-custom-product-page .bt-share-buttons {
  display: flex;
  gap: var(--bt-space-3);
  margin-bottom: var(--bt-space-4);
}

.bt-custom-product-page .bt-share-btn-social {
  width: 48px;
  height: 48px;
  border-radius: var(--bt-radius-full);
  
  display: grid;
  place-items: center;
  
  color: #fff;
  text-decoration: none;
  
  transition: transform var(--bt-transition-fast),
              box-shadow var(--bt-transition-fast);
}

.bt-custom-product-page .bt-share-btn-social:hover {
  transform: translateY(-2px);
  color: #fff;
}

.bt-custom-product-page .bt-share-btn-social i {
  font-size: var(--bt-text-lg);
}

.bt-custom-product-page .bt-facebook {
  background: #1877f2;
}

.bt-custom-product-page .bt-facebook:hover {
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.35);
}

.bt-custom-product-page .bt-twitter {
  background: #1da1f2;
}

.bt-custom-product-page .bt-twitter:hover {
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.35);
}

.bt-custom-product-page .bt-whatsapp-share {
  background: #25d366;
}

.bt-custom-product-page .bt-whatsapp-share:hover {
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.bt-custom-product-page .bt-email {
  background: var(--bt-navy);
}

.bt-custom-product-page .bt-email:hover {
  box-shadow: 0 8px 20px rgba(26, 26, 46, 0.35);
}

/* Copy link section */
.bt-custom-product-page .bt-share-copy {
  display: flex;
  gap: var(--bt-space-3);
}

.bt-custom-product-page .bt-share-copy input {
  flex: 1;
  min-width: 0;
  padding: var(--bt-space-3);
  
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius-md);
  background: var(--bt-bg-soft);
  
  font-family: var(--bt-font-body);
  font-weight: 700;
  font-size: var(--bt-text-sm);
  color: var(--bt-text);
}

.bt-custom-product-page .bt-share-copy input:focus {
  outline: none;
  border-color: var(--bt-pink);
}

.bt-custom-product-page .bt-share-copy button {
  display: inline-flex;
  align-items: center;
  gap: var(--bt-space-2);
  
  padding: var(--bt-space-3) var(--bt-space-4);
  border: none;
  border-radius: var(--bt-radius-md);
  
  font-family: var(--bt-font-body);
  font-weight: 900;
  font-size: var(--bt-text-sm);
  color: #fff;
  background: linear-gradient(90deg, var(--bt-pink), var(--bt-pink-2));
  cursor: pointer;
  
  transition: transform var(--bt-transition-fast),
              box-shadow var(--bt-transition-fast);
}

.bt-custom-product-page .bt-share-copy button:hover {
  transform: translateY(-1px);
  box-shadow: var(--bt-shadow-pink);
}

.bt-custom-product-page .bt-share-copy button.copied {
  background: var(--bt-success);
}

/* =========================
   4. BODY LOCK
   ========================= */
body.bt-lightbox-open,
body.bt-modal-open {
  overflow: hidden;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 767px) {
  .bt-custom-product-page .bt-lightbox,
  .bt-custom-product-page .bt-share-modal {
    padding: var(--bt-space-3);
  }
  
  .bt-custom-product-page .bt-lightbox-prev,
  .bt-custom-product-page .bt-lightbox-next {
    width: 40px;
    height: 40px;
  }
  
  .bt-custom-product-page .bt-lightbox-prev {
    left: var(--bt-space-2);
  }
  
  .bt-custom-product-page .bt-lightbox-next {
    right: var(--bt-space-2);
  }
  
  .bt-custom-product-page .bt-share-content {
    padding: var(--bt-space-4);
  }
  
  .bt-custom-product-page .bt-share-btn-social {
    width: 44px;
    height: 44px;
  }
  
  .bt-custom-product-page .bt-share-copy {
    flex-direction: column;
  }
}