/* ======================== */
/* Form Overlay Styles      */
/* ======================== */
.form-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
}

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

.form-overlay__content {
  position: relative;
  max-width: 400px;
  width: 90%;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 20px;
  padding-top: 35px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.form-overlay__form-container {
  width: 100%;
}

.form-overlay__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  z-index: 2002;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s ease-in-out,
    background-color 0.2s ease-in-out;
  border-radius: 50%;
}

.form-overlay__close:hover {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
}

.form-overlay .pubhub-form {
  margin: 0;
  display: flex !important;
  background-color: transparent;
  padding: 0;
  box-shadow: none;
}

/* ======================== */
/* Video Overlay Styles     */
/* ======================== */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
}

.video-overlay--hidden {
  opacity: 0;
  visibility: hidden;
}

.video-overlay__content {
  position: relative;
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 8px;
  width: 60vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.video-overlay__close {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 5px;
  z-index: 1002;
}

.video-overlay__close:hover {
  color: #fff;
}

.video-overlay__video-wrapper {
  width: 100%;
  background-color: #000;
  overflow: hidden;
  z-index: 1001;
  flex-shrink: 0;
}

.video-overlay__video-wrapper iframe {
  width: 100%;
  border: none;
  display: block;
  aspect-ratio: 16 / 9;
}

.video-overlay__form-container {
  width: 100%;
  padding: 15px 0 0 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .video-overlay__content {
    width: 95vw;
    padding: 15px;
    max-height: 95vh;
  }

  .video-overlay__close {
    font-size: 1.8rem;
    top: 3px;
    right: 3px;
    padding: 10px;
  }
}

@media (orientation: landscape) {
  .video-overlay__content .video-overlay__video-wrapper {
    margin-bottom: 5px;
  }

  .video-overlay__content .video-overlay__form-container {
    padding: 10px;
  }
}
