/* dialog nativo (componente c-dialog) */
/* Talvez :has não funcione em alguma versão antiga do safari, mas é algo irrelevante. */
body:has(dialog[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.dialog {
  --modal-width: 500px;
  margin: 1rem auto;
  max-width: var(--modal-width);
  overflow: visible;
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
  padding: 0;
  position: fixed;
  max-height: calc(100dvh - 3.5rem);
  min-height: 12rem;
}
.dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.55);
  animation: 0.3s fade-in;
}

@media (min-width: 992px) {
  .dialog {
    --modal-width: 800px;
  }
}

@media (min-width: 1200px) {
  .dialog {
    --modal-width: 1140px;
  }
}

.dialog-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  overflow: hidden;
}
.dialog-header {
  padding: 1rem;
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.5rem - (1px));
  border-top-right-radius: calc(0.5rem - (1px));
}
.dialog-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem;
  border-color: var(--bs-border-color);
  overflow-y: auto;
}
.dialog-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.5rem - (1px));
  border-bottom-left-radius: calc(0.5rem - (1px));
}
.dialog.dialog-stacked {
  top: 2.5rem;
}
