/*
 * SPDX-FileCopyrightText: 2024 Siemens AG
 *
 * SPDX-License-Identifier: MIT
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
::backdrop {
  background: var(--theme-color-lightbox, rgba(0, 0, 0, 0.5490196078));
}

:focus-visible {
  outline: none !important;
}

:host {
  display: none;
}
:host dialog {
  --ix-dialog-padding: 1rem;
  margin: 0;
  padding: var(--ix-dialog-padding);
  padding-top: calc(var(--ix-dialog-padding) + var(--ix-safe-area-inset-top));
  padding-bottom: calc(var(--ix-dialog-padding) + var(--ix-safe-area-inset-bottom));
  left: 50%;
}
:host .modal {
  display: flex;
  flex-direction: column;
  position: fixed;
  border: none;
  border-radius: var(--theme-default-border-radius);
  background: var(--theme-modal--background);
  box-shadow: var(--theme-shadow-4);
  color: var(--theme-color-std-text);
  overflow: visible;
  max-height: 80vh;
  pointer-events: all;
  overflow-wrap: break-word;
}
:host .modal-size-360 {
  width: 22.5rem;
}
:host .modal-size-480 {
  width: 30rem;
}
:host .modal-size-600 {
  width: 37.5rem;
}
:host .modal-size-720 {
  width: 45rem;
}
:host .modal-size-840 {
  width: 52.5rem;
}
:host .modal-size-full-width {
  width: 95%;
}
:host .modal-size-full-screen {
  border-radius: 0;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
  box-shadow: none;
  --ix-dialog-full-screen-height: calc(
    var(--ix-safe-area-inset-top) + var(--ix-safe-area-inset-bottom)
  );
  width: calc(100% - var(--ix-dialog-padding) * 2);
  min-width: calc(100% - var(--ix-dialog-padding) * 2);
  max-width: calc(100% - var(--ix-dialog-padding) * 2);
  min-height: calc(100% - var(--ix-dialog-padding) * 2 - var(--ix-dialog-full-screen-height));
  max-height: calc(100% - var(--ix-dialog-padding) * 2 - var(--ix-dialog-full-screen-height));
}
:host dialog.modal-size-full-screen::backdrop {
  background: var(--theme-modal--background);
}
:host .dialog-backdrop {
  display: block;
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  pointer-events: none;
}
:host ::slotted(ix-modal-footer) {
  margin-top: auto;
}

:host(.visible) {
  display: block;
}

:host(.align-center) dialog {
  margin: 0;
  left: 50%;
  top: 50%;
}

:host(.no-backdrop) dialog::backdrop {
  background-color: transparent !important;
  -webkit-backdrop-filter: none !important;
          backdrop-filter: none !important;
}

:host(.with-icon) ::slotted(ix-modal-footer),
:host(.with-icon) ::slotted(ix-modal-content) {
  margin-left: 3rem;
}