@import url('https://unpkg.com/tachyons@4/css/tachyons.min.css');

:host {
  position: relative;
  z-index: 10000000;
}

:host,
input,
button,
select,
textarea {
  font-family: 'Roboto', sans-serif;
}

.zea-dialog {
  color: var(--color-foreground-1);
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  max-width: 100vw;
  max-height: 100vh;
  font-size: 14px;
  pointer-events: none;
}

.zea-dialog.shown {
  display: flex;
}

.backdrop {
  background-color: var(--color-shadow);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  pointer-events: auto;
}

.scroll-pane-container {
  max-height: 100%;
  /* height: min-content; */
  height: 100%;
}

.zea-dialog-container {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-background-1);
  box-shadow: 2px 6px 10px 5px var(--color-shadow);
  min-height: fit-content;
  min-width: fit-content;
  pointer-events: auto;
  max-height: 100%;
  max-width: 100%;
}

.zea-dialog-title ::slotted([slot='title']) {
  margin: 0.5em 0;
}

.zea-dialog-title {
  color: var(--color-foreground-1);
  padding: 2em 2em 0;
  display: flex;
  align-items: center;
}

.zea-dialog-title zea-icon {
  display: none;
}

.with-padding .zea-dialog-title {
  padding: 20px 20px 0 20px;
}

.zea-dialog-body {
  flex-grow: 1;
  height: 100%;
  box-sizing: border-box;
}

.with-padding .zea-dialog-body {
  padding: 20px;
}

.zea-dialog-body ::slotted([slot='body']) {
  height: 100%;
  box-sizing: border-box;
}

.zea-dialog-footer {
  text-align: right;
}

.with-padding .zea-dialog-footer {
  padding: 0 20px 20px;
}

@media only screen and (max-width: 667px), only screen and (max-height: 667px) {
  :host {
    position: relative;
    z-index: 1000000000000;
  }

  .zea-dialog-container.full-screen-mobile {
    height: 100% !important;
    width: 100% !important;
    position: fixed;
    top: 0;
    left: 0;
  }

  .zea-dialog-title {
    color: var(--color-foreground-1);
    background-color: var(--color-grey-2);
    padding: 0.5em 1em;
  }

  .zea-dialog-title zea-icon {
    margin-right: 1em;
    display: inline-block;
  }

  .with-padding .zea-dialog-title {
    padding: 0.5em 1em;
  }

  .with-padding .zea-dialog-body {
    padding: 20px;
    height: calc(100% - 3em);
  }
}
