/* Ensure the modal has a vertical scrollbar if it's too tall */
.sweet-alert {
  max-height: calc(100% - 20px);
  overflow-y: auto;
  overflow-wrap: break-word;
}

/* Fix the look of radio buttons and checkboxes that are too big */
.sweet-alert input[type="radio"],
.sweet-alert input[type="checkbox"] {
  height: auto;
  margin-top: 4px;
  width: auto;
}

/* Remove the error section as it's unused but causes a vertical scrollbar when there are no buttons */
.sweet-alert .sa-input-error {
  display: none;
}

/* Try to make inputs look more similar to shiny inputs than sweetalert inputs */

.sweet-alert .shiny-input-container input {
  display: block;
}

.sweet-alert .shiny-input-container:not(.shiny-input-container-inline) {
  width: 100%;
}

/* Sizing options */

.sweet-alert.alert-size-xs,
.sweet-alert.alert-size-s,
.sweet-alert.alert-size-m,
.sweet-alert.alert-size-l {
  left: 50%;
}
.sweet-alert.alert-size-xs {
  width: 300px;
  margin-left: -150px;
}
.sweet-alert.alert-size-s {
  width: 478px;
  margin-left: -239px;
}
.sweet-alert.alert-size-m {
  width: 800px;
  margin-left: -400px;
}
.sweet-alert.alert-size-l {
  width: 1200px;
  margin-left: -600px;
}
@media only screen and (max-width: 330px) {
  .sweet-alert.alert-size-xs {
    width: auto;
    margin-left: 0;
    left: 15px;
    right: 15px;
  }
}
@media only screen and (max-width: 508px) {
  .sweet-alert.alert-size-s {
    width: auto;
    margin-left: 0;
    left: 15px;
    right: 15px;
  }
}
@media only screen and (max-width: 830px) {
  .sweet-alert.alert-size-m {
    width: auto;
    margin-left: 0;
    left: 15px;
    right: 15px;
  }
}
@media only screen and (max-width: 1230px) {
  .sweet-alert.alert-size-l {
    width: auto;
    margin-left: 0;
    left: 15px;
    right: 15px;
  }
}
