/* ========================================
   PLAYGROUND MODAL - Shared Component
   Matches Figma design: node 10452:8721
   ======================================== */

/* Import Archivo font */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500&display=swap');

/* Modal Overlay */
.playground-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000B2;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
  box-sizing: border-box;
}

.playground-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Modal Container */
.playground-modal {
  position: relative;
  width: 100%;
  max-width: 589px;
  background: linear-gradient(180deg, #252525 0%, #252525 20%, #2c2c2c 80%, #2d2d2d 100%);
  border-radius: 0;
  overflow: hidden;
  transform: scale(1) translateY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.playground-modal-overlay.hidden .playground-modal {
  transform: scale(0.95) translateY(20px);
}

/* Modal Body */
.modal-body {
  padding: 48px 40px 40px;
  text-align: center;
}

.modal-title {
  font-family: 'Archivo', sans-serif;
  font-size: 25px;
  font-weight: 400;
  color: #f6f6f6;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  line-height: 105%;
  text-align: center;
}

.modal-description {
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 19px;
  color: #737373;
  margin: 0 0 28px 0;
  max-width: 522px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.01em;
  text-align: center;
}

/* CTA Button - Rectangular matching Figma */
.modal-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 191px;
  height: 34px;
  padding: 0 14px;
  background: transparent;
  color: #202020;
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  border-radius: 0;
  letter-spacing: -0.05em;
  line-height: 105%;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
}

.modal-cta .cta-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 14px;
  background: #1cc94c;
  box-sizing: border-box;
  clip-path: inset(0 0 0 0);
  transition: clip-path 520ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: clip-path;
  z-index: 2;
  white-space: nowrap;
}

.modal-cta .cta-content-alt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 14px;
  background: #ffffff;
  color: #202020;
  box-sizing: border-box;
  transform: translateY(160%) rotate(6deg);
  transform-origin: 50% 50%;
  transition: transform 520ms cubic-bezier(0.23, 1, 0.32, 1) 0s;
  will-change: transform;
  z-index: 1;
  pointer-events: none;
  white-space: nowrap;
}

@media (hover: hover) {
  .modal-cta:hover .cta-content {
    clip-path: inset(0 0 0 100%);
  }

  .modal-cta:hover .cta-content-alt {
    transform: translateY(0) rotate(0deg);
  }
}

.modal-cta .cta-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Bottom Image Marquee */
/* Structural sizing is also inlined on the elements (UnifiedModal /
   PlaygroundModal) so the strip never collapses on slow CSS loads.
   min-height + explicit height here is the belt to that suspenders. */
.modal-image-marquee {
  width: 100%;
  height: 54px;
  min-height: 54px;
  overflow: hidden;
  display: flex;
  align-items: center;
  font-size: 0;
  line-height: 0;
}

.marquee-image-track {
  display: flex;
  gap: 0;
  animation: marquee-image 20s linear infinite;
  width: max-content;
  height: 54px;
  flex-shrink: 0;
}

.marquee-strip {
  height: 54px;
  width: 1713px;
  display: block;
  flex-shrink: 0;
  max-width: none;
}

@keyframes marquee-image {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

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

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 768px) {
  .playground-modal {
    max-width: 90%;
  }

  .modal-body {
    padding: 40px 30px 32px;
  }

  .modal-title {
    font-size: 22px;
  }

  .modal-description {
    font-size: 14px;
    line-height: 18px;
  }

  .modal-cta {
    font-size: 14px;
    min-width: 180px;
    height: 32px;
  }

}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 480px) {
  .playground-modal-overlay {
    padding: 16px;
  }

  .playground-modal {
    max-width: 100%;
    border-radius: 0;
  }

  .modal-body {
    padding: 36px 20px 28px;
  }

  .modal-title {
    font-size: 20px;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
  }

  .modal-description {
    font-size: 13px;
    line-height: 17px;
    margin-bottom: 24px;
    letter-spacing: 0.1px;
  }

  .modal-cta {
    font-size: 13px;
    min-width: 220px;
    height: 32px;
    letter-spacing: -0.5px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
  }

  .modal-close svg {
    width: 14px;
    height: 14px;
  }

  /* Mobile uses the same desktop image strip as-is */
}

/* ========================================
   LOADING STATE - All screens
   ======================================== */
/* Loading state for CTA button */
.modal-cta.loading {
  background: #3a3a3a;
  color: #cccccc;
  pointer-events: none;
  position: relative;
}

/* Hide the green label overlay while loading so the spinner reads clearly
   instead of leaving faint text on the green button. */
.modal-cta.loading .cta-content,
.modal-cta.loading .cta-content-alt {
  opacity: 0;
}

.modal-cta.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 3;
}

.modal-cta.loading .cta-icon {
  display: none;
}

/* Hide close button during loading */
.playground-modal-overlay.loading .modal-close {
  opacity: 0.3;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   UNIFIED MODAL - Same styles as playground modal
   ======================================== */

/* Unified Modal Overlay - mirrors playground-modal-overlay */
.unified-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000B2;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
  box-sizing: border-box;
}

.unified-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Unified Modal Container - mirrors playground-modal */
.unified-modal {
  position: relative;
  width: 100%;
  max-width: 589px;
  background: linear-gradient(180deg, #252525 0%, #252525 20%, #2c2c2c 80%, #2d2d2d 100%);
  border-radius: 0;
  overflow: hidden;
  transform: scale(1) translateY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.unified-modal-overlay.hidden .unified-modal {
  transform: scale(0.95) translateY(20px);
}

/* Button-only style (no icons) */
.modal-cta[id$="Cta"]:not([href]) {
  border: none;
  cursor: pointer;
  background: transparent;
}
