:root {
  --popup-close-color: #000;
  --popup-close-size: 16px;
  --popup-close-margin: .5rem;
  --popup-close-bold: 2px;
  --popup-layer-bg: rgba(0, 0, 0, .8);
  --popup-bg: #eee;
  --popup-container-fixed-width: auto;
  --popup-container-fixed-height: auto;
  --popup-container-fixed-min-width: 320px;
  --popup-container-fixed-min-height: 320px;
}

.popup_hide {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.popup_show {
  overflow: hidden !important;
}

.popup {
  padding: 3em;
}

.popup_fixed {
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup,
.popup_full,
.popup_fixed {
  z-index: 99999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--popup-layer-bg);
  box-sizing: border-box;
}

.popup_close {
  z-index: 165;
  position: absolute;
  top: 0;
  right: 0;
  margin: 0px;
  width: 35px;
  height: 30px;
  cursor: pointer;
  display: block !important;
  background-color: #fff;
}

.popup_close:before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 100%;
  height: var(--popup-close-bold);
  background: var(--popup-close-color);
  transform: rotate(45deg) translate(calc(var(--popup-close-bold)*2), calc(var(--popup-close-bold)*2));
}

.popup_close:after {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 100%;
  height: var(--popup-close-bold);
  background: var(--popup-close-color);
  transform: rotate(-45deg) translate(calc(-2px*2), calc(2px*2));
}

.popup_container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  background: var(--popup-bg);
}

.popup_fixed .popup_container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--popup-container-fixed-width);
  height: var(--popup-container-fixed-height);
  min-width: var(--popup-container-fixed-min-width);
  min-height: var(--popup-container-fixed-min-height);
}

.popup_header,
.popup_content,
.popup_footer {
  position: relative;
  box-sizing: border-box;
}

.popup_content {
  flex-grow: 1;
  overflow-y: auto;
}

.popup_content {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100%;
}

.popup_content .quiz-intro-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.popup_content .quiz-intro.image {
    max-height: fit-content;
    flex-direction: row;
}

/* custom scroll bar */
.popup_content::-webkit-scrollbar-button {
  display: none;
}

.popup_content::-webkit-scrollbar {
  background-color: transparent;
  width: 8px;
}

.popup_content::-webkit-scrollbar-track {
  background-color: transparent;
}

.popup_content::-webkit-scrollbar-track:hover {
  background-color: transparent;
}

.popup_content::-webkit-scrollbar-thumb {
  background-color: #babac0;
  /*border-radius: 8px;*/
}

.popup_content::-webkit-scrollbar-thumb:hover {
  background-color: #a0a0a5;
  border: 4px solid transparent;
}

/* custom scroll bar */

.popup_content[data-align='center'] {
  text-align: center;
}

.popup_content[data-align='right'] {
  flex-grow: right;
}

.popup_footer {
  text-align: center;
}

.popup_footer[data-align='left'] {
  text-align: left;
}

.popup_footer[data-align='right'] {
  text-align: right;
}

@media only screen and (max-width: 768px) {
   .popup_content {
        flex-direction: column; /* Stack content vertically */
        height: auto; /* Allow natural height */
    }
   .popup_content .quiz-intro-image {
        height: auto;
        width: 100%;
    }
    .popup_content .quiz-intro {
      flex-direction: column;
    }

}