:host {
  display: block;
}

.modal-container {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1060;
  overflow-y: auto;
  font-family: var(--ifx-font-family);
}

.modal-container.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1d1d1d;
  opacity: 0.5;
  z-index: 0;
}

.modal-content-container {
  position: absolute;
  display: flex;
  justify-content: center;
  width: 90%;
  min-height: 218px;
  background-color: #fff;
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  align-items: stretch;
}

.modal-content-container.no-overflow {
  overflow: hidden;
}
.modal-content-container.no-overflow .modal-body {
  overflow-y: auto;
}

/* Add desktop size here */
@media screen and (min-width: 768px) {
  .modal-content-container {
    width: 540px;
    min-height: 132px;
  }
  .modal-content-container.m, .modal-content-container.l, .modal-content-container.s {
    width: 90%;
  }
}
@media screen and (min-width: 1024px) {
  .modal-content-container.s {
    width: 47vw;
  }
  .modal-content-container.m {
    width: 63vw;
  }
  .modal-content-container.l {
    width: 80%;
  }
}
.modal-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 90vh;
}

.modal-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  background-color: #0a8276;
  align-self: stretch;
}
.modal-icon-container.danger {
  background-color: #cd002f;
}
.modal-icon-container ifx-icon {
  color: #ffffff;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  min-height: 76px;
  max-height: 105px;
  box-sizing: border-box;
  border-radius: 1px 1px 0px 0px;
  border-bottom: 1px solid #eeeded;
}

.modal-caption {
  max-height: 56px;
  display: -webkit-box;
  overflow: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.modal-header h2 {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 28px;
}

.modal-header button {
  background: none;
  border: none;
  font-size: 1.5em;
  padding: 0;
  cursor: pointer;
}

.modal-close-button {
  align-self: flex-start;
  margin-right: -8px;
}

.modal-body {
  padding: 16px 24px;
  min-height: 56px;
  box-sizing: border-box;
  flex: 1;
}

.modal-footer.buttons-present ::slotted(*) {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 24px 32px 16px;
}

.modal-border {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 1.5em;
  flex-grow: 1;
}
.modal-border.primary {
  background-color: #0a8276;
}
.modal-border.secondary {
  background-color: #575352;
}
.modal-border.danger {
  background-color: #cd002f;
}
.modal-border.success {
  background-color: #4ca460;
}
.modal-border.warning {
  background-color: #e16b25;
}
.modal-border.orange {
  background-color: #e16b25;
}
.modal-border.ocean {
  background-color: #0a8276;
}
.modal-border.grey {
  background-color: #575352;
}
.modal-border.grey-200 {
  background-color: #eeeded;
}
.modal-border.red {
  background-color: #cd002f;
}
.modal-border.green {
  background-color: #4ca460;
}
.modal-border.berry {
  background-color: #9c216e;
}