/* Modal that hosts a campaign quiz in an iframe. Built by campaign_quiz_modal.js.
   Campaign-neutral: override the variables per page from "Extra meta tags". */
.cq-modal {
  --cq-panel-bg: #fff;
  --cq-close-bg: #fff;
  --cq-close-fg: #2b2b2b;
  --cq-close-hover-bg: #2b2b2b;
  --cq-close-hover-fg: #fff;

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cq-modal.is-open {
  display: flex;
}

.cq-modal__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(43, 43, 43, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.cq-modal__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: calc(90vh - 32px);
  background: var(--cq-panel-bg);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  overflow: auto;
}

.cq-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cq-close-bg);
  color: var(--cq-close-fg);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cq-modal__close:hover {
  background: var(--cq-close-hover-bg);
  color: var(--cq-close-hover-fg);
  transform: rotate(90deg);
}

.cq-modal__frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
  transition: height 0.25s ease;
}

body.cq-modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .cq-modal {
    padding: 8px;
  }

  .cq-modal__panel {
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .cq-modal__close {
    top: 8px;
    right: 8px;
  }
}
