body.popup-visible {
  overflow: hidden;
}
.popup {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 1;
}
.popup--visible {
  transition: .3s;
}
.popup--hide {
  opacity: 0;
}
.alert.popup--alert {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.popup__background {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-popup-background);
  pointer-events: initial;
}

.popup__close {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  padding: 8px;
  background-color: var(--color-popup-closebg);
  z-index: 1;
  position: absolute;
  right: 10px;
  top: 10px;
}
.popup__close i.icon path {
  fill: var(--color-white-plus);
}
.popup__close:hover i.icon path {
  fill: var(--color-popup-background) !important;
}

.popup__container {
  --popup-container-inset: 28px;

  width: max-content;
  max-width: var(--width-sidebar-cart);
  height: auto;
  /* height: 100%; */
  /* max-height: calc(100vh - var(--popup-container-inset) * 2); */
  padding: var(--popup-container-inset);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color-popup-container);
  box-shadow: var(--shadow-popup-container);
  border-radius: var(--radius-popup-container);
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: initial;
  transition: .3s;
  z-index: 0;
}
.popup--sidebar .popup__container {
  /* width: 840px; */
  /* width: 960px; */
  width: max-content;
  max-width: calc(100% - var(--popup-container-inset));
  padding: 0 var(--popup-container-inset);
  gap: 32px;
  align-items: stretch;
  flex-direction: initial;
  justify-content: space-between;
}
.popup--alert .popup__container {
  height: auto;
  max-width: var(--width-sidebar-cart);
}
.popup__container::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--color-popup-container);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  border-radius: var(--radius-popup-container);
}
.popup__container::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--color-blue-primary);
  position: absolute;
  left: 0;
  top: 2px;
  z-index: -2;
  border-radius: var(--radius-popup-container);
}
.popup--alert .popup__container::before, .popup--alert .popup__container::after {
  display: none;
}

.popup__contents {
  overflow: hidden;
  overflow-y: auto;
  height: 100%;
  /* height: auto; */
  max-height: calc(100vh - 40px - var(--popup-container-inset) * 2);
  max-width: calc(var(--width-sidebar-cart) - var(--popup-container-inset) * 2);
}

.popup__sidebar {
  width: var(--width-sidebar);
  padding: var(--popup-container-inset) 0;
  padding-right: var(--popup-container-inset);
  border-right: 1px solid var(--color-light-opacity);
}
.popup__sidebar-image {
  padding: 40px;
}
.popup__sidebar-html {
  margin-top: 24px;
}

.popup--sidebar .popup__contents {
  padding: var(--popup-container-inset) 0;
  width: calc(100% - var(--width-sidebar));
}

.popup__title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-right: 40px;
}
.popup--alert .popup__body {
  margin-right: 40px;
}
.popup__title + .popup__body {
  margin-top: 26px;
  margin-right: 0;
}

/* Popup Alert */
.popup.popup--alert .popup__background {
  display: none;
}
.popup.popup--alert .popup__close {
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: var(--bd-radius);
}
.popup.popup--alert .popup__container {
  padding: 12px;
  top: 12px;
  left: auto;
  right: calc(calc(100vw - var(--maxwidth)) / 2 + var(--maxoffset) / 2);
  transform: translate(0, 0);
  min-height: calc(var(--popup-container-inset) + 24px);
  border-radius: var(--bd-radius-max);
}
.popup.popup--alert.alert--warning .popup__container {
  background-color: var(--color-red-light);
}
.popup.popup--alert.alert--success .popup__container {
  /* background-color: var(--color-green-light); */
}
.popup.popup--alert.popup--hide .popup__container {
  transform: translate(60px, 0);
}
.popup.popup--alert .popup__title {
  text-align: left;
  width: max-content;
}
.popup.popup--alert.alert--warning .popup__title {
  color: var(--color-button-red);
}
.popup.popup--alert.alert--success .popup__title {
  color: var(--color-green);
}
.popup.popup--alert .popup__title + .popup__body {
  margin-top: 8px;
}

@media screen and (max-width: 1410px) {
  .popup.popup--alert .popup__container {
    right: 12px;
    max-width: calc(100% - 32px);
  }
}

@media screen and (max-width: 744px) {
  .popup__sidebar {
    max-width: var(--width-sidebar-tablet);
  }
  .popup--sidebar .popup__contents {
    width: 100%;
    max-width: calc(100% - var(--width-sidebar-tablet));
  }
  .popup.popup--alert .popup__title {
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .popup__sidebar {
    display: none;
  }
  .popup--sidebar .popup__contents {
    max-width: 100%;
  }
  .popup.popup--alert .popup__title {
    font-size: 16px;
  }
  .popup--sidebar .popup__container {
    padding: 0 16px;
  }
}

/* Tabs */
.popup--tabs .popup__container {
  --popup-tabs-header: 70px;

  width: 100%;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
}
.popup--tabs .popup__close {
  left: 100%;
  top: -22px;
  width: 43px;
  height: 43px;
  margin-left: 4px;
  background-color: var(--color-light);
}
.popup--tabs .popup__close i.icon {
  width: 21px;
  height: 21px;
}
.popup--tabs .popup__close i.icon path {
  fill: #C2C2C2;
}

.popup__tabs {
  overflow: hidden;
  padding: var(--popup-container-inset);
  border-radius: var(--radius-popup-container);
  background-color: var(--color-popup-container);
  position: relative;
}

.popup__tabs-header {
  gap: 0;
  background-color: var(--color-form-bacground);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
  /* overflow: hidden; */
}
.popup__tabs-header::before {
  content: '';
  display: block;
  position: absolute;
  background: #fff;
  width: 100%;
  height: 10px;
  z-index: 1;
  top: 100%;
}

.popup__tabs-title {
  gap: 10px;
  width: max-content;
  min-width: 220px;
  cursor: pointer;
  z-index: 0;
  position: relative;
  height: var(--popup-tabs-header);
  color: var(--color-blue-gray);
  transform: translateY(1px);
}
.popup__tabs-title.popup__tabs--active {
  z-index: 1;
  background-color: var(--color-popup-container);
  color: var(--color-blue-primary);
}
.popup__tabs-title:not(:first-child):before {
  content: '';
  height: calc(100% + 2px);
  width: 80px;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  right: 100%;
  top: 50%;
  z-index: -1;
  transform: translate(50%, -50%);
  background-size: cover;
  background-repeat: no-repeat;
  background-position-x: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='72' viewBox='0 0 80 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='80' height='70' fill='%23EFF3F6'/%3E%3Cpath d='M-150.668 770H230.668C250.733 770 267 751.26 267 728.144V0H77.8773C56.9574 0 40 10.902 40 35C40 59.1008 21.4176 70 0.5 70H-187V728.144C-187 751.26 -170.733 770 -150.668 770Z' fill='white'/%3E%3C/svg%3E");
}
.popup__tabs-title::after {
  content: '';
  height: calc(100% + 2px);
  width: 100vw;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  left: 100%;
  top: 50%;
  z-index: -1;
  transform: translate(0, -50%);
  background-color: var(--color-popup-container);
}
.popup__tabs-title:not(:last-child)::after {
  width: 80px;
  transform: scale(-1, 1) translate(50%, -50%);
  background-size: cover;
  background-repeat: no-repeat;
  background-position-x: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='72' viewBox='0 0 80 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='80' height='70' fill='%23EFF3F6'/%3E%3Cpath d='M-150.668 770H230.668C250.733 770 267 751.26 267 728.144V0H77.8773C56.9574 0 40 10.902 40 35C40 59.1008 21.4176 70 0.5 70H-187V728.144C-187 751.26 -170.733 770 -150.668 770Z' fill='white'/%3E%3C/svg%3E");
}
.popup__tabs-title:hover, .popup__tabs-title.popup__tabs--active::before, .popup__tabs-title.popup__tabs--active::after {
  opacity: 1;
  visibility: visible;
}
.popup__tabs-title i.icon {
  width: 26px;
  height: 26px;
}
.popup__tabs-title i.icon path {
  fill: var(--color-blue-gray);
}
.popup__tabs-title.popup__tabs--active i.icon path {
  fill: var(--color-blue-primary);
}

.popup--tabs .popup__contents {
  padding-top: var(--popup-tabs-header);
}

.popup__tabs-contents {
  display: none;
}
.popup__tabs-contents.popup__tabs--active {
  display: block;
}

@media screen and (max-width: 520px) {
  .popup__container {
    max-width: calc(100% - 30px);
  }
}