.o-dlg-main {
  color: var(--dlg-color);
  position: relative;
  background-color: var(--dlg-bg-color);
  box-shadow: var(--dlg-shadow);
  border-radius: var(--dlg-radius);
  margin: var(--dlg-margin);
  width: var(--dlg-width);
  min-width: var(--dlg-min-width);
  max-height: var(--dlg-max-height);
  min-height: var(--dlg-min-height);
  display: flex;
  flex-direction: column;
  padding: var(--dlg-edge-gap);
}

.o-dlg-btn-close {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: var(--dlg-close-size);
  color: var(--dlg-close-color);
  display: flex;
  transition: transform var(--o-easing-standard) var(--o-duration-m2);
  cursor: pointer;
  z-index: 1;
}
.o-dlg-btn-close {
  overflow: hidden;
}
.o-dlg-btn-close svg {
  transition: all var(--o-duration-m1) var(--o-easing-standard-in);
}
@media (hover: hover) {
  .o-dlg-btn-close:hover svg {
    transform: rotate(180deg);
  }
}
@media (hover: hover) {
  .o-dlg-btn-close:hover {
    color: var(--dlg-close-color-hover);
  }
}
.o-dlg-btn-close:active {
  color: var(--dlg-close-color-active);
  transform: scale(0.9);
}

.o-dlg-header {
  color: var(--dlg-header-color);
  text-align: center;
  font-size: var(--o-font_size-h2);
  line-height: var(--o-line_height-h2);
  font-weight: 500;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: var(--dlg-header-gap, var(--dlg-inner-gap));
}

.o-dlg-body {
  flex: 1;
  display: flex;
  overflow: visible;
  min-height: 0;
}
.o-dlg-body > .o-scrollbar {
  --scrollbar-y-right: calc(-1 * var(--dlg-edge-gap));
}

.o-dlg-body-content {
  flex: 1;
}

.o-dlg-footer {
  overflow: hidden;
  flex-shrink: 0;
  margin-top: var(--dlg-inner-gap);
}

.o-dlg-actions {
  display: flex;
  align-items: center;
  justify-content: var(--actions-justify);
}

.o-dlg-btn + .o-dlg-btn {
  margin-left: var(--dlg-btn-gap);
}

.o-dialog {
  --dlg-close-size: var(--o-icon_size_control-m);
  --dlg-close-color: var(--o-color-info2);
  --dlg-close-color-hover: var(--o-color-primary2);
  --dlg-close-color-active: var(--o-color-primary3);
  --dlg-color: var(--o-color-info1);
  --dlg-header-color: var(--o-color-info1);
  --dlg-bg-color: var(--o-color-control5-light);
  --dlg-radius: var(--o-radius_control-l);
  --dlg-shadow: var(--o-shadow-1);
  --dlg-max-height: 100%;
  --dlg-min-width: 272px;
  --dlg-margin: 0px;
  --dlg-edge-gap: 32px;
  --dlg-inner-gap: 24px;
  --actions-justify: var(--dlg-actions-justify, center);
  --dlg-btn-gap: 16px;
}

.o-dialog-auto {
  --dlg-max-height: 80%;
}

.o-dialog-exlarge {
  --dlg-width: 65%;
  --dlg-max-height: 780px;
  --dlg-min-height: 520px;
}

.o-dialog-large {
  --dlg-width: 60%;
  --dlg-max-height: 780px;
  --dlg-min-height: 424px;
}

.o-dialog-medium {
  --dlg-width: 40%;
  --dlg-max-height: 480px;
  --dlg-min-height: 328px;
}

.o-dialog-small {
  --dlg-width: 25%;
  --dlg-max-height: 272px;
  --dlg-min-height: 224px;
  --dlg-header-gap: 16px;
}

@media (min-width: 601px) {
  .o-dialog-responsive {
    --layer-origin: center;
  }
}
@media (max-width: 1200px) {
  .o-dialog-responsive {
    --layer-position: fixed;
  }
  .o-dialog-responsive .o-dlg-btn + .o-dlg-btn.o-btn-text {
    position: relative;
  }
  .o-dialog-responsive .o-dlg-btn + .o-dlg-btn.o-btn-text::before {
    content: "";
    border-left: 1px solid var(--o-color-control1-light);
    position: absolute;
    height: 24px;
    left: -8px;
  }
}
@media (max-width: 600px) {
  .o-dialog-responsive {
    --layer-align: flex-end;
    --layer-origin: center bottom;
    --dlg-min-width: none;
  }
  .o-dialog-responsive .o-dlg-btn {
    flex: 1;
  }
  .o-dialog-responsive .o-dlg-btn-close {
    display: none;
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dialog {
    --dlg-edge-gap: 24px;
    --dlg-inner-gap: 16px;
  }
}
@media (max-width: 1200px) {
  .o-dialog {
    --dlg-edge-gap: 16px;
    --dlg-inner-gap: 12px;
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dlg-header {
    font-size: var(--o-font_size-h4);
    line-height: var(--o-line_height-h4);
  }
}
@media (max-width: 1200px) {
  .o-dlg-header {
    font-size: var(--o-font_size-text2);
    line-height: var(--o-line_height-text2);
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dialog-exlarge {
    --dlg-width: 75%;
    --dlg-max-height: 80%;
    --dlg-min-height: 65%;
  }
}
@media (min-width: 841px) and (max-width: 1200px) {
  .o-dialog-exlarge {
    --dlg-width: 80%;
    --dlg-max-height: 80%;
    --dlg-min-height: 65%;
  }
}
@media (max-width: 840px) {
  .o-dialog-exlarge {
    --dlg-width: 100%;
    --dlg-max-height: 100%;
    --dlg-min-height: 100%;
    --dlg-radius: 0;
    --dlg-margin: 0;
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dialog-large {
    --dlg-width: 60%;
    --dlg-max-height: 80%;
    --dlg-min-height: 50%;
  }
}
@media (min-width: 841px) and (max-width: 1200px) {
  .o-dialog-large {
    --dlg-width: 65%;
    --dlg-max-height: 80%;
    --dlg-min-height: 50%;
  }
}
@media (max-width: 840px) {
  .o-dialog-large {
    --dlg-width: 100%;
    --dlg-max-height: 100%;
    --dlg-min-height: 100%;
    --dlg-radius: 0;
    --dlg-margin: 0;
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dialog-medium {
    --dlg-width: 40%;
    --dlg-max-height: 80%;
    --dlg-min-height: 35%;
  }
}
@media (min-width: 841px) and (max-width: 1200px) {
  .o-dialog-medium {
    --dlg-width: 65%;
    --dlg-max-height: 80%;
    --dlg-min-height: 128px;
  }
}
@media (min-width: 601px) and (max-width: 840px) {
  .o-dialog-medium {
    --dlg-width: 75%;
    --dlg-max-height: 80%;
    --dlg-min-height: 128px;
  }
}
@media (max-width: 600px) {
  .o-dialog-medium {
    --dlg-width: 100vw;
    --dlg-max-height: 65%;
    --dlg-min-height: 128px;
    --dlg-margin: 24px;
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dialog-small {
    --dlg-width: 25%;
    --dlg-max-height: 50%;
    --dlg-min-height: 20%;
  }
}
@media (min-width: 841px) and (max-width: 1200px) {
  .o-dialog-small {
    --dlg-width: 32%;
    --dlg-min-height: 128px;
    --dlg-max-height: 80%;
  }
}
@media (min-width: 601px) and (max-width: 840px) {
  .o-dialog-small {
    --dlg-width: 75%;
    --dlg-min-height: 128px;
    --dlg-max-height: 80%;
  }
}
@media (max-width: 600px) {
  .o-dialog-small {
    --dlg-width: 100vw;
    --dlg-min-height: 128px;
    --dlg-max-height: 65%;
    --dlg-margin: 24px;
  }
}

@media (max-width: 600px) {
  .o-dialog-phone-half-full {
    --dlg-width: 100%;
    --dlg-margin: 0;
  }
  .o-dialog-phone-half-full.o-dialog-auto, .o-dialog-phone-half-full.o-dialog-small, .o-dialog-phone-half-full.o-dialog-medium {
    --dlg-radius: var(--o-radius_control-l) var(--o-radius_control-l) 0 0;
  }
}

@media (min-width: 1201px) and (max-width: 1680px) {
  .o-dialog {
    --dlg-btn-gap: 12px;
  }
}
@media (max-width: 1200px) {
  .o-dialog {
    --dlg-btn-gap: 8px;
  }
}