/* Atelier Popup Modal - Premium Luxury Design */
.atelier-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.atelier-popup-overlay.is-open {
  display: flex;
}

.atelier-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: atelierPopupBackdropIn 0.4s ease forwards;
}

@keyframes atelierPopupBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.atelier-popup-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  background: #0d0d0d;
  border: 1px solid rgba(180, 150, 80, 0.4);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(180, 150, 80, 0.1);
  overflow: hidden;
  animation: atelierPopupModalIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  opacity: 0;
  transform: translateY(40px) scale(0.98);
}

@keyframes atelierPopupModalIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.atelier-popup-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.8);
  border: 1px solid rgba(180, 150, 80, 0.5);
  color: #b4964f;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.atelier-popup-close:hover,
.atelier-popup-close:focus {
  background: rgba(180, 150, 80, 0.9);
  color: #0d0d0d;
  border-color: #b4964f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(180, 150, 80, 0.3);
}

.atelier-popup-close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.atelier-popup-layout {
  display: flex;
  width: 100%;
  height: 100%;
  max-height: 90vh;
}

.atelier-popup-image-col {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
}

.atelier-popup-image-sticky {
  position: sticky;
  top: 0;
  height: 100%;
  width: 100%;
}

.atelier-popup-image {
  width: 100%;
  display: block;
  transition: transform 8s ease;
}

.atelier-popup-overlay.is-open .atelier-popup-image {
  transform: scale(1.05);
}

.atelier-popup-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to right,
      transparent 50%,
      rgba(13, 13, 13, 0.7) 100%
    ),
    linear-gradient(to top, rgba(13, 13, 13, 0.8) 0%, transparent 60%);
  pointer-events: none;
}

.atelier-popup-content-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.atelier-popup-content-inner {
  padding: 3rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.atelier-popup-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(180, 150, 80, 0.3);
}

.atelier-popup-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: #b4964f;
}

.atelier-popup-label::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: #b4964f;
}

.atelier-popup-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #f5f5f5;
  font-weight: 400;
}

.atelier-popup-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #b4964f;
  margin-top: -0.25rem;
}

.atelier-popup-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.atelier-popup-description {
  color: #a3a3a3;
  line-height: 1.9;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.atelier-popup-description p {
  margin: 0;
}

.atelier-popup-description p + p {
  margin-top: 1rem;
}

/* Scrollbar styling for content area */
.atelier-popup-content-col::-webkit-scrollbar {
  width: 6px;
}

.atelier-popup-content-col::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.atelier-popup-content-col::-webkit-scrollbar-thumb {
  background: rgba(180, 150, 80, 0.4);
  border-radius: 3px;
}

.atelier-popup-content-col::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 150, 80, 0.6);
}

/* Responsive Design */
@media (max-width: 968px) {
  .atelier-popup-modal {
    max-height: 95vh;
  }

  .atelier-popup-layout {
    max-height: 95vh;
  }

  .atelier-popup-content-col {
    max-height: 95vh;
  }
}

@media (max-width: 768px) {
  .atelier-popup-overlay {
    padding: 0.75rem;
  }

  .atelier-popup-modal {
    max-height: 95vh;
    flex-direction: column;
  }

  .atelier-popup-layout {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
  }

  .atelier-popup-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
  }

  .atelier-popup-close svg {
    width: 16px;
    height: 16px;
  }

  .atelier-popup-image-col {
    flex: 0 0 250px;
    height: 250px;
    position: relative;
  }

  .atelier-popup-image-sticky {
    position: relative;
    height: 100%;
  }

  .atelier-popup-image-overlay {
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(13, 13, 13, 0.85) 100%
      ),
      linear-gradient(to top, rgba(13, 13, 13, 0.7) 0%, transparent 50%);
  }

  .atelier-popup-content-col {
    flex: 1;
    max-height: none;
    overflow-y: visible;
  }

  .atelier-popup-content-inner {
    padding: 2rem 1.5rem 1.75rem;
    gap: 1.25rem;
  }

  .atelier-popup-title {
    font-size: 2rem;
  }

  .atelier-popup-description {
    font-size: 0.9rem;
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  .atelier-popup-overlay {
    padding: 0.5rem;
  }

  .atelier-popup-image-col {
    flex: 0 0 200px;
    height: 200px;
  }

  .atelier-popup-content-inner {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .atelier-popup-title {
    font-size: 1.75rem;
  }
}

/* Ensure body scroll lock works */
body.atelier-popup-no-scroll {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

/* Focus management for accessibility */
.atelier-popup-modal:focus {
  outline: none;
}
