/* Modal Container */
.ar-video-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Modal Content Box */
.ar-video-content {
  position: relative;
  width: 90vw;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  z-index: 10000;
}

/* Video Container */
.ar-video-frame {
  width: 100%;
  height: 100%;
}

.ar-video-frame iframe,
.ar-video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Close Button */
.ar-video-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10001;
}

/* Overlay click blocker */
.ar-video-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
}


/* Wrapper for thumbnail and play icon */
.ar-popup-video-block {
  width: 100%;
  max-width: 100%;
  display: block;
}
.ar-popup-video-block a.ar-video-launch {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  text-decoration: none;
  border: none;
  outline: none;
  vertical-align: top;
}
/* Add a flex container to help with centering */
.ar-video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

/* Center Play Icon RESPONSIVELY */
.ar-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 8vw;    /* Responsive width! */
  max-width: 80px;   /* Never bigger than this */
  min-width: 40px;   /* Never smaller than this */
  aspect-ratio: 1/1;
  background-color: rgb(138 195 254 / 24%);
  border-radius: 50%;
  display: flex;
  align-items: center; 
  justify-content: center;
  font-size: 1.6vw;  /* Responsive icon size */
  color: var(--ar-accent, #fff) !important;
  pointer-events: none;
  box-shadow: none;
  transition: width 0.2s, font-size 0.2s;
}
.ar-video-launch:focus,
.ar-video-launch:active,
.ar-video-launch:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.ar-video-modal {
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}
.ar-play-icon::before {
  content: '';
  position: absolute;
  width: 64px;
  height: 64px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  animation: pulse-bg 1.5s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse-bg {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}