/* Classic compose queue modals + compose bar on AstroVault redesign gallery */

.btn {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--panel, #1a1f28);
  color: var(--text, #e8edf5);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.primary {
  background: var(--accent, #d7f72a);
  border-color: var(--accent, #d7f72a);
  color: #111;
}
.btn.secondary {
  opacity: 0.92;
}
.btn.danger {
  border-color: rgba(232, 93, 93, 0.55);
  color: #ffb4b4;
  background: rgba(40, 18, 18, 0.45);
}
.btn.btn-compact {
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.muted {
  color: var(--muted, #9aa6b8);
}
.small {
  font-size: 0.78rem;
  line-height: 1.35;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.lbl {
  display: block;
  margin: 0.45rem 0 0.25rem;
  font-size: 0.82rem;
  color: var(--muted, #9aa6b8);
}

.modal.hidden {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  box-sizing: border-box;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.modal-panel {
  position: relative;
  margin: 0;
  flex-shrink: 0;
  max-width: 1200px;
  width: min(96vw, 1200px);
  max-height: 94vh;
  background: var(--panel, #141a22);
  border: 1px solid var(--border, rgba(125, 147, 180, 0.18));
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text, #e8edf5);
}
.modal-panel.modal-panel--wide {
  max-width: min(98vw, 1480px);
  width: min(98vw, 1480px);
  max-height: 92vh;
  min-height: 72vh;
}
#composeQueueModal .modal-panel.modal-panel--wide {
  max-width: min(98vw, 1760px);
  width: min(98vw, 1760px);
}
.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--muted, #9aa6b8);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.modal-ai-input,
.compose-queue-polish-rules,
.compose-queue-prompt-view,
.compose-result-preview {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border, rgba(125, 147, 180, 0.18));
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text, #e8edf5);
  padding: 0.4rem 0.55rem;
  font: inherit;
}
.person-tag-editor-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.compose-queue-panel {
  padding: 1rem 1.15rem 1.1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.98), rgba(14, 18, 26, 0.98));
  border: 1px solid rgba(125, 147, 180, 0.18);
}
.compose-queue-toolbar {
  margin: 0.55rem 0 0.65rem;
}
.compose-queue-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-right: 1.8rem;
}
.compose-queue-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.compose-queue-title {
  margin: 0;
}
.compose-queue-desc {
  margin: 0.25rem 0 0;
}
.compose-queue-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 147, 180, 0.2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
}
.compose-queue-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.compose-queue-tab {
  border: none;
  background: transparent;
  color: var(--muted, #9aa6b8);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.compose-queue-tab--active {
  background: rgba(215, 247, 42, 0.16);
  color: var(--text, #e8edf5);
}
.compose-queue-empty {
  margin: 0.75rem 0;
}
.compose-queue-list-scroll,
.compose-gallery-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* Floating compose bar (edit-mode sibling) */
.sv-compose-bar {
  flex-wrap: wrap;
  max-width: min(96vw, 1100px);
  gap: 0.55rem 0.75rem;
}
.sv-compose-bar .compose-summary {
  margin: 0;
  max-width: min(42vw, 420px);
  line-height: 1.35;
}
.sv-compose-bar .compose-result-preview {
  min-width: min(40vw, 320px);
  max-width: 420px;
  min-height: 56px;
  max-height: 18vh;
  resize: vertical;
}
.sv-workspace--compose .sv-card.is-compose-selected {
  outline: 2px solid rgba(215, 247, 42, 0.85);
  outline-offset: 2px;
}
.sv-workspace--compose .sv-card {
  cursor: pointer;
}

body.compose-queue-pick-active .sv-card.expand-pick-selected {
  outline: 2px solid #e85d5d;
  outline-offset: 2px;
}
body.compose-queue-pick-active .sv-card.expand-pick-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(232, 93, 93, 0.28);
  pointer-events: none;
  z-index: 2;
}
body.compose-queue-pick-active .sv-card {
  position: relative;
}
