:host {
  /**
   * @prop --background: Background of the modal content
   *
   * @prop --border-color: Border color of the modal content
   * @prop --border-radius: Border radius of the modal content
   * @prop --border-width: Border width of the modal content
   * @prop --border-style: Border style of the modal content
   *
   * @prop --min-width: Minimum width of the modal
   * @prop --width: Width of the modal
   * @prop --max-width: Maximum width of the modal
   *
   * @prop --min-height: Minimum height of the modal
   * @prop --height: Height of the modal
   * @prop --max-height: Maximum height of the modal
   *
   * @prop --backdrop-opacity: Opacity of the backdrop
   */
  --width: 100%;
  --max-width: 644px;
  --min-height: auto;
  --max-height: auto;
  --overflow: hidden;
  --border-radius: 0;
  --border-width: 0;
  --border-style: none;
  --border-color: transparent;
  --background: var(--gasco-background-color, #fff);
  --box-shadow: none;
  --backdrop-opacity: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  position: fixed;
  align-items: center;
  justify-content: center;
  outline: none;
  contain: strict;
}

.modal-wrapper, gasco-backdrop {
  pointer-events: auto;
}

:host(.overlay-hidden) {
  display: none;
}

.modal-wrapper,
.modal-shadow {
  border-radius: var(--border-radius);
  width: var(--width);
  max-width: var(--max-width);
  min-height: var(--min-height);
  max-height: var(--max-height);
  border-width: var(--border-width);
  border-style: var(--border-style);
  border-color: var(--border-color);
  background: var(--background);
  box-shadow: var(--box-shadow);
  overflow: var(--overflow);
  z-index: 10;
}

.modal-shadow {
  position: absolute;
  background: transparent;
}

.modal-handle {
  left: 0px;
  right: 0px;
  top: 5px;
  border-radius: 8px;
  margin-left: auto;
  margin-right: auto;
  position: absolute;
  width: 36px;
  height: 5px;
  /**
   * This allows the handle to appear
   * on top of user content in WebKit.
   */
  transform: translateZ(0);
  background: var(--gasco-color-step-350, #c0c0be);
  z-index: 11;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  .modal-handle {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: auto;
    margin-inline-start: auto;
    -webkit-margin-end: auto;
    margin-inline-end: auto;
  }
}

/**
 * Ensure that the sheet modal does not
 * completely cover the content.
 */
:host(.modal-sheet) {
  --height: calc(100% - (var(--gasco-safe-area-top) + 10px));
}

:host(.modal-sheet) .modal-wrapper,
:host(.modal-sheet) .modal-shadow {
  position: absolute;
  bottom: 0;
}

.modal-native {
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1 1;
  padding: 1rem;
}
.modal-native .modal-button-close {
  align-self: flex-end;
  border-radius: 50%;
  padding: 0;
  width: 30px;
  height: 30px;
  border: none;
  cursor: pointer;
}
.modal-native h2 {
  font-weight: 600;
  font-size: 28px;
  line-height: 36px;
  color: #072531;
  margin: 14px 0;
}
.modal-native h2.default {
  align-self: flex-start;
  margin: 0 0 12px 0;
}
.modal-native p {
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: #4D4D4D;
  margin: 0;
}
.modal-native p.default {
  align-self: flex-start;
  text-align: left;
}
.modal-native hr {
  width: 85%;
  margin: 28px 0;
  align-self: center;
  background: #CCCCCC;
}
.modal-native .modal-button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

@media only screen and (max-width: 768px) {
  ::slotted([slot=start]) {
    width: 50px;
    height: 50px;
  }

  .modal-native h2 {
    font-size: 20px;
    line-height: 28px;
  }
  .modal-native h2.default {
    align-self: flex-start;
    margin: 0 0 12px 0;
  }
  .modal-native p {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
  }
  .modal-native p.default {
    align-self: flex-start;
    text-align: left;
  }
  .modal-native hr {
    width: 85%;
  }
}
@media only screen and (max-width: 480px) {
  ::slotted([slot=start]) {
    width: 40px;
    height: 40px;
  }

  .modal-native h2 {
    font-size: 16px;
    line-height: 20px;
  }
  .modal-native h2.default {
    align-self: flex-start;
    margin: 0 0 12px 0;
  }
  .modal-native p {
    font-size: 14px;
    line-height: 20px;
  }
  .modal-native p.default {
    align-self: flex-start;
    text-align: left;
  }
  .modal-native hr {
    width: 85%;
  }
  .modal-native .modal-button-group {
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 1rem;
  }
}
:host {
  --border-radius: 8px;
  --box-shadow: 0px 6px 12px rgba(171, 190, 209, 0.3);
  --backdrop-opacity: var(--gasco-backdrop-opacity, 0.32);
}

.modal-wrapper {
  transform: translate3d(0,  40px,  0);
  opacity: 0.01;
  margin: 0 1rem;
}