/* joomla-dialog — extracted from Joomla 5 Cassiopeia template CSS */

joomla-dialog dialog {
  border: 1px solid var(--border-color-translucent, rgb(0 0 0 / 18%));
  border-radius: 0.3rem;
  width: 96vw;
  max-width: 1700px;
  height: 96vh;
  padding: 0;
  box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 15%);
}

@media (width >= 1400px) {
  joomla-dialog dialog {
    width: 80vw;
    height: 80vh;
  }
}

joomla-dialog dialog[open] {
  display: flex;
}

joomla-dialog[type="image"] dialog {
  width: fit-content;
  height: fit-content;
  max-width: 96vw;
  max-height: 96vh;
}

joomla-dialog dialog[open] {
  animation: 0.4s dialog-show;
}

@media (prefers-reduced-motion: reduce) {
  joomla-dialog dialog[open] {
    animation: none;
  }
}

@keyframes dialog-show {
  0% { opacity: 0; transform: translateY(-50px); }
  30% { opacity: 1; }
  100% { transform: translateY(0); }
}

.joomla-dialog-container {
  box-sizing: border-box;
  display: flex;
  flex-flow: column;
  width: 100%;
  position: relative;
}

.joomla-dialog-container .buttons-holder {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-inline-start: auto;
}

.joomla-dialog-container .buttons-holder button {
  margin-inline: 0.375rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

.joomla-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #dee2e6);
  position: relative;
}

.joomla-dialog-header h3 {
  margin: 0;
}

.joomla-dialog-header.empty {
  display: none;
}

.joomla-dialog-body {
  box-sizing: border-box;
  flex: auto;
  position: relative;
  overflow: auto;
  padding: 1rem;
}

.joomla-dialog-body .buttons-holder {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.joomla-dialog-body img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  height: auto;
}

.joomla-dialog-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color, #dee2e6);
  position: relative;
}

.joomla-dialog-footer.empty {
  display: none;
}

/* Close button — Bootstrap's btn-close is not loaded in the DS */
.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  opacity: 0.65;
  color: currentColor;
}

.btn-close::after {
  content: '×';
}

.btn-close:hover {
  opacity: 1;
}

.btn-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  opacity: 1;
}