:root {
  --popup-close-color: #000;
  --popup-close-size: 16px;
  --popup-close-margin: .5rem;
  --popup-close-bold: 2px;
  --popup-layer-bg: rgba(0, 0, 0, .7);
  --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: 168;
  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: var(--popup-close-margin) var(--popup-close-margin) 0 0;
  width: var(--popup-close-size);
  height: var(--popup-close-size);
  cursor: pointer;
}

.popup_close:before {
  content: "";
  position: absolute;
  top: 0;
  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: 0;
  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_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;
  padding: .5rem;
}

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

/* 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;
}
