.qfp-toolbar {
  height: 0;
  margin: 0;
  pointer-events: none;
  position: relative;
  z-index: 2;
}

.qfp-open,
.qfp-close {
  appearance: none;
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #6c757d);
  border-radius: 0.35rem;
  color: var(--bs-body-color, #212529);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.45em 0.7em;
}

.qfp-open {
  align-items: center;
  backdrop-filter: blur(0.2rem);
  background: color-mix(
    in srgb,
    var(--bs-body-bg, #fff) 68%,
    transparent
  );
  border-color: color-mix(
    in srgb,
    var(--bs-body-color, #212529) 28%,
    transparent
  );
  border-radius: 50%;
  box-shadow: 0 0.08rem 0.28rem rgb(0 0 0 / 16%);
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  opacity: 0.58;
  padding: 0;
  pointer-events: auto;
  position: absolute;
  right: 0.35rem;
  top: 0.35rem;
  transition: background-color 120ms ease, opacity 120ms ease;
  width: 2rem;
}

.qfp-open svg {
  display: block;
  height: 1rem;
  width: 1rem;
}

.qfp-open:hover,
.qfp-open:focus-visible {
  background: color-mix(
    in srgb,
    var(--bs-body-bg, #fff) 94%,
    transparent
  );
  opacity: 1;
  outline: 3px solid color-mix(in srgb, currentColor 28%, transparent);
  outline-offset: 2px;
}

.qfp-close:hover,
.qfp-close:focus-visible {
  background: var(--bs-secondary-bg, #e9ecef);
  outline: 3px solid color-mix(in srgb, currentColor 28%, transparent);
  outline-offset: 2px;
}

.qfp-dialog {
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #6c757d);
  border-radius: 0.6rem;
  color: var(--bs-body-color, #212529);
  height: 94dvh;
  margin: auto;
  max-height: none;
  max-width: none;
  padding: 0;
  width: 94dvw;
}

.qfp-dialog::backdrop {
  background: rgb(0 0 0 / 72%);
}

.qfp-header {
  align-items: center;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0.6rem 1rem;
}

.qfp-caption {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.qfp-close {
  flex: 0 0 auto;
}

.qfp-content {
  align-items: center;
  display: flex;
  height: calc(94dvh - 4.5rem);
  justify-content: center;
  overflow: auto;
  padding: 1rem;
}

.qfp-content > .qfp-active {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  margin: 0;
  max-height: none;
  max-width: none;
  width: 100%;
}

.qfp-content .qfp-active img,
.qfp-content .qfp-active svg,
.qfp-content .qfp-active canvas,
.qfp-content .qfp-active video,
.qfp-content .qfp-active iframe,
.qfp-content .qfp-active object {
  display: block;
  flex: 1 1 auto;
  height: 100% !important;
  margin: auto;
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain;
  width: 100% !important;
}

.qfp-content > img.qfp-active,
.qfp-content > svg.qfp-active,
.qfp-content > canvas.qfp-active,
.qfp-content > video.qfp-active,
.qfp-content > iframe.qfp-active,
.qfp-content > object.qfp-active {
  display: block;
  height: 100% !important;
  object-fit: contain;
  width: 100% !important;
}

.qfp-content .qfp-active figcaption,
.qfp-content .qfp-active caption {
  display: none;
}

.qfp-content:has(table.qfp-active, .quarto-float-tbl.qfp-active) {
  align-items: flex-start;
  justify-content: flex-start;
}

.qfp-content > table.qfp-active {
  display: table;
  height: auto;
  min-width: 100%;
  width: max-content;
}

.qfp-content .quarto-float-tbl.qfp-active {
  align-items: stretch;
  height: auto;
  justify-content: flex-start;
  min-width: 100%;
  width: max-content;
}

.qfp-content .quarto-float-tbl.qfp-active table {
  min-width: 100%;
  width: max-content;
}

.qfp-modal-open {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .qfp-dialog {
    border-radius: 0;
    height: 100dvh;
    width: 100dvw;
  }

  .qfp-content {
    height: calc(100dvh - 4.5rem);
    padding: 0.75rem;
  }
}

@media (hover: none) {
  .qfp-open {
    opacity: 0.78;
  }
}

@media print {
  .qfp-toolbar,
  .qfp-dialog {
    display: none !important;
  }
}
