/* ── Detail overlay ────────────────────────────────────────────── */
#detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: stretch;
}

#detail-overlay.hidden { display: none; }

#detail-modal {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Poster column ─────────────────────────────────────────────── */
#detail-poster-col {
  flex: 0 0 42%;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

#detail-poster-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Meta column ───────────────────────────────────────────────── */
#detail-meta-col {
  flex: 1;
  background: #131313;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 32px 40px 40px;
  gap: 0;
}

/* ── Detail top bar ────────────────────────────────────────────── */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.detail-type-badge {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  background: #1f1f1f;
  padding: 4px 10px;
}

#detail-close {
  font-size: 1.25rem;
  font-weight: 200;
  color: var(--fg-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}
#detail-close:hover { color: var(--fg); }

/* ── Title ─────────────────────────────────────────────────────── */
#detail-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* ── Metadata grid ─────────────────────────────────────────────── */
.detail-meta-grid {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.detail-meta-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-field-label {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}

.detail-field-value {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ── Note ──────────────────────────────────────────────────────── */
#detail-note-section {
  margin-bottom: 24px;
  flex-shrink: 0;
}

#detail-note-section.hidden { display: none; }

#detail-note-section .detail-field-label { margin-bottom: 6px; }

#detail-note-text {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--fg-secondary);
  line-height: 1.6;
}

/* ── Art source ────────────────────────────────────────────────── */
#detail-source {
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 24px;
  flex-shrink: 0;
}

/* ── External links ────────────────────────────────────────────── */
.detail-ext-label {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.detail-links {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.detail-link {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  background: #1f1f1f;
  text-decoration: none;
  padding: 8px 16px;
  transition: background 0.15s;
}

.detail-link:hover  { background: #2a2a2a; }
.detail-link.hidden { display: none; }

/* ── Actions ───────────────────────────────────────────────────── */
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  flex-shrink: 0;
}

#detail-edit {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
  background: #fff;
  border: none;
  cursor: pointer;
  padding: 12px 24px;
  transition: opacity 0.15s;
}
#detail-edit:hover { opacity: 0.85; }

#detail-delete {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  transition: color 0.15s;
}
#detail-delete:hover { color: #e05050; }

/* ── Navigation ────────────────────────────────────────────────── */
.detail-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-shrink: 0;
}

.detail-nav-btn {
  font-size: 1rem;
  color: var(--fg-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
  line-height: 1;
}
.detail-nav-btn:hover:not(:disabled) { color: var(--fg); }
.detail-nav-btn:disabled { opacity: 0.2; cursor: default; }

#detail-nav-count {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fg-tertiary);
  text-transform: uppercase;
}
