:root {
  --popup-width: 70vw;
  /* --popup-max-width: 1100px; */
  /* --popup-aspect-ratio: 16/9; */
  --popup-gap: 2vw;
  --popup-blackout-background: transparent;
  --popup-background: #f7f8f9;
  --popup-padding: 3.5vw;
  --popup-border-radius: 0.6vw;
  --popup-header-gap: 2vw;
  --popup-close-icon-width: 1.3vw;
  --popup-scroll-padding: 3vw;
  --popup-scroll-width: 0.6vw;
  --popup-scroll-track: transparent;
  --popup-scroll-thumb: #ed1c24;
  --popup-scroll-thumb-hover: #ed1c24;
}

@media all and (max-width: 767px) {
  :root {
    --popup-width: 90vw;
    --popup-gap: 2vw;
    --popup-padding: 4vw;
    --popup-border-radius: 2vw;
    --popup-header-gap: 2vw;
    --popup-close-icon-width: 4vw;
    --popup-scroll-padding: 4vw;
    --popup-scroll-width: 0.8vw;
  }  
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.popup .blackout {
  position: fixed;
  inset: 0;
  background: var(--popup-blackout-background);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.popup.active .blackout {
  opacity: 1;
}

.popup .popup-container {
  position: relative;
  inset: 0;
  width: var(--popup-width);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: var(--popup-gap);
  padding: var(--popup-padding);
  height: 35vw;
  max-height: 80vh;
  background: var(--popup-background);
  border-radius: var(--popup-border-radius);
  box-shadow: 1.5vw 1.5vw 4vw 1vw rgba(0, 0, 0, 0.05);
}

.popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--popup-header-gap);
}

.popup .popup-header .popup-title {
  font-weight: bold;
}

.popup .popup-header .close-popup {
  cursor: pointer;
  width: var(--popup-close-icon-width);
  min-width: var(--popup-close-icon-width);
  max-width: var(--popup-close-icon-width);
  margin-top: -1.5vw;
  margin-right: -1.5vw;
}

.popup .popup-header .close-popup:not(.animated) {
  opacity: 0;
}

.popup-content {
  overflow: auto;
}

.popup-footer {
  position: absolute;
  top: calc(100% + 1.5vw);
    right: 3vw;
    display: flex;
    flex-direction: row;
    gap: 2.3vw;
}

.popup-content {
  margin-right: -3.5vw;
}

body.disable-body {
  overflow-y: hidden;
  inset: 0;
}

body.show-popup .popup.active {
  display: flex;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

body.show-popup .popup.active.hide-overlay {
  opacity: 0;
  z-index: -1;
}

/* popup scroll-bar */
.scroll-bar {
  padding-right: var(--popup-scroll-padding);
  /* Firefox  */
  scrollbar-color: var(--popup-scroll-thumb) var(--popup-scroll-track);
  scrollbar-width: thin;
}

.scroll-bar::-webkit-scrollbar {
  width: var(--popup-scroll-width);
}

.scroll-bar::-webkit-scrollbar-track {
  background: var(--popup-scroll-track);
  /* width: 20px; */
  /* border-right: 9px solid white; */
  /* border-left: 9px solid white; */
}

.scroll-bar::-webkit-scrollbar-thumb {
  background: var(--popup-scroll-thumb);
  /* height: 20px; */
  /* border-radius: 40px; */
  /* position: absolute; */
}

.scroll-bar::-webkit-scrollbar-thumb:hover {
  /* cursor: pointer; */
  background: var(--popup-scroll-thumb-hover);
}

@media all and (max-width: 767px) {
  .popup .popup-container {
    height: auto;
    /* box-shadow: 1.5vw 1.5vw 4vw 1vw rgba(0, 0, 0, 0.05); */
  }
  .popup .popup-header .close-popup {
    margin-top: 0;
    margin-right: 0;
  }

  .popup-footer {
    position: absolute;
    top: calc(100% + 3vw);
      right: 6vw;
      display: flex;
      flex-direction: row;
      gap: 5vw;
  }
}