/* MusicXML Import Review Overlay
 * Full-viewport overlay for reviewing parsed MusicXML before importing.
 * VexFlow staff preview with collapsible details panel.
 */

/* Overlay container - covers entire viewport */
#mxml-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg, #1a1a2e);
  flex-direction: column;
}

#mxml-review-overlay[hidden] {
  display: none;
}

#mxml-review-overlay:not([hidden]) {
  display: flex;
}

/* Prevent scrolling on body when overlay is active */
body.mxml-review-active {
  overflow: hidden;
}

/* -- Header -- */
.mxml-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border, #333);
  background: var(--bg-surface, #16213e);
  flex-shrink: 0;
}

.mxml-review-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.mxml-review-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #e0e0e0);
  white-space: nowrap;
}

.mxml-review-filename {
  font-size: 13px;
  color: var(--text-muted, #999);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mxml-review-header-right {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.mxml-review-cancel-btn,
.mxml-review-accept-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.mxml-review-cancel-btn {
  background: transparent;
  color: var(--text-muted, #999);
}

.mxml-review-cancel-btn:hover {
  background: var(--bg-hover, #2a2a4a);
}

.mxml-review-accept-btn {
  background: #4ade80;
  color: #111;
}

.mxml-review-accept-btn:hover {
  background: #22c55e;
}

.mxml-review-accept-btn:disabled {
  background: #555;
  color: #888;
  cursor: not-allowed;
}

/* -- Error banner -- */
.mxml-review-error {
  padding: 10px 16px;
  background: #dc2626;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

.mxml-review-error[hidden] {
  display: none;
}

/* -- Body: VexFlow preview area -- */
.mxml-review-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #fff;
}

.mxml-review-preview {
  width: 100%;
  min-height: 100%;
  padding: 12px;
  box-sizing: border-box;
}

/* -- Details collapsible -- */
.mxml-review-details {
  border-top: 1px solid var(--border, #333);
  background: var(--bg-surface, #16213e);
  flex-shrink: 0;
}

.mxml-review-details summary {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #999);
  cursor: pointer;
  user-select: none;
}

.mxml-review-details summary:hover {
  color: var(--text, #e0e0e0);
}

.mxml-review-details-content {
  padding: 4px 16px 12px;
  font-size: 13px;
  color: var(--text-muted, #aaa);
  line-height: 1.6;
}

/* -- Responsive -- */
@media (max-width: 500px) {
  .mxml-review-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .mxml-review-header-left {
    flex-direction: column;
    gap: 2px;
  }
}
