.studio-touch-target {
  min-width: 44px;
  min-height: 44px;
}

.theme-navbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
}

.header-navigation {
  grid-column: 1 / -1;
  justify-self: end;
  grid-row: 2;
}

.header-navigation:empty {
  display: none !important;
}

.header-settings {
  grid-column: 2;
  grid-row: 1;
}

.settings-menu {
  position: relative;
}

.settings-menu > summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
}

.settings-menu > summary::-webkit-details-marker {
  display: none;
}

.settings-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  width: 18rem;
  max-width: calc(100vw - 1.5rem);
  z-index: 1030;
}

#theme-toggle [data-theme-icon] {
  font-size: 1.25rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .theme-navbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .header-navigation {
    grid-column: 2;
    grid-row: 1;
  }

  .header-settings {
    grid-column: 3;
  }
}

[data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-color: var(--bs-primary-text-emphasis);
  --bs-btn-border-color: var(--bs-primary-text-emphasis);
}

.studio textarea {
  resize: vertical;
}

.studio-feedback {
  min-height: 3.5rem;
  overflow-wrap: anywhere;
}

.studio-gallery > .col {
  min-width: 0;
}

.viewer-image {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.viewer-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.viewer-delete {
  --bs-btn-color: var(--bs-danger-text-emphasis);
  --bs-btn-border-color: var(--bs-danger-text-emphasis);
  --bs-btn-hover-color: var(--bs-body-bg);
  --bs-btn-hover-bg: var(--bs-danger-text-emphasis);
  --bs-btn-hover-border-color: var(--bs-danger-text-emphasis);
  --bs-btn-active-color: var(--bs-body-bg);
  --bs-btn-active-bg: var(--bs-danger-text-emphasis);
  --bs-btn-active-border-color: var(--bs-danger-text-emphasis);
}

@media (max-width: 359.98px) {
  .studio-gallery > .col {
    width: 100%;
  }
}
