/* ============================================================
   CrateView — Tribute Fact Sheet styles
   Loaded on cv_tribute pages and cv_setlist pages (generate bar)
   ============================================================ */

/* ---- Full-page dark treatment ---- */

html { background: #1a1a1a !important; } /* override html:has(body.cv-canvas) from main stylesheet */

body.cv-tribute-body {
  background: #1a1a1a !important;
  color: #f1e3c8 !important;
}

body.cv-tribute-body .cv-topbar {
  background: #1a1a1a;
  border-bottom: none !important;
}

body.cv-tribute-body .cv-sitenav-link,
body.cv-tribute-body .cv-brand {
  color: #f1e3c8;
}

body.cv-tribute-body .cv-sitenav-link:hover {
  color: #D17D34;
}

body.cv-tribute-body .cv-footer {
  background: #1a1a1a;
  color: #555;
  border-top: 1px solid #383838;
}

body.cv-tribute-body .cv-input {
  background: #2F2F2F;
  color: #f1e3c8;
  border-color: #383838;
}

/* ---- Wrapper ---- */

.cv-tribute-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.cv-tribute-title {
  font-family: 'Charter Web', Charter, Georgia, 'Times New Roman', serif;
  color: #f1e3c8;
  margin: 0;
}

/* ---- Title header row + divider ---- */

.cv-tribute-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid #383838;
  margin-bottom: 0;
}

/* ---- Header action buttons (right side) ---- */

.cv-tribute-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cv-tribute-setlist-link {
  background: #428175;
  color: #f1e3c8;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.cv-tribute-setlist-link:hover {
  background: #357066;
  text-decoration: none;
}

.cv-tribute-regen-btn {
  background: transparent;
  border: 1px solid #555;
  color: #a89b85;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cv-tribute-regen-btn:hover {
  border-color: #a89b85;
  color: #f1e3c8;
}

.cv-tribute-regen-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---- Section shell ---- */

.cv-tribute-section {
  padding: 48px 0;
  border-bottom: 1px solid #383838;
}

.cv-tribute-section:last-child {
  border-bottom: none;
}

.cv-tribute-section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.cv-tribute-section-num {
  color: #D17D34;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  flex-shrink: 0;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
}

.cv-tribute-section-title {
  font-family: 'Charter Web', Charter, Georgia, 'Times New Roman', serif;
  color: #f1e3c8;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* ---- Body copy ---- */

.cv-tribute-para {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  margin-bottom: 1.25em;
  color: #f1e3c8;
  font-size: 1rem;
}

/* ---- Discography ---- */

.cv-tribute-discog-item {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.cv-tribute-discog-item::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  margin-right: 10px;
  margin-top: 6px;
}

.cv-tribute-discog-tonight {
  color: #D17D34;
  font-weight: 600;
}
.cv-tribute-discog-tonight::before {
  border-left-color: #f1e3c8;
}

.cv-tribute-discog-other {
  color: #666;
}

.cv-tribute-discog-note {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-style: italic;
  color: #f1e3c8;
  font-size: 0.85rem;
  margin-bottom: 4px;
  padding-left: 16px;
  line-height: 1.5;
}

/* ---- Set album blocks ---- */

.cv-tribute-album {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #2F2F2F;
}

.cv-tribute-album:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cv-tribute-album-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.cv-tribute-album-thumb-link {
  flex-shrink: 0;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}

.cv-tribute-album-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.cv-tribute-album-thumb-link:hover .cv-tribute-album-thumb {
  opacity: 0.8;
}

.cv-tribute-album-header-info {
  flex: 1;
  min-width: 0;
}

.cv-tribute-album-header h3 {
  font-family: 'Charter Web', Charter, Georgia, 'Times New Roman', serif;
  color: #f1e3c8;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.cv-tribute-album-meta {
  color: #428175;
  font-size: 0.85rem;
  margin-bottom: 0;
}

.cv-tribute-album-narrative p {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  color: #f1e3c8;
  line-height: 1.75;
  margin-bottom: 0.9em;
  font-size: 1rem;
}

/* ---- Key tracks ---- */

.cv-tribute-key-tracks {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.cv-tribute-key-tracks li {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  padding: 10px 0 10px 16px;
  border-left: 3px solid #428175;
  margin-bottom: 8px;
  color: #f1e3c8;
  line-height: 1.6;
  font-size: 0.95rem;
}

.cv-tribute-key-tracks li strong {
  color: #f1e3c8;
}

/* ---- Album links (discography + set titles) ---- */

.cv-tribute-album-link {
  color: inherit;
  text-decoration: none;
}
.cv-tribute-album-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
}

/* ---- Click-to-dim ---- */

.cv-tribute-dimable {
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.cv-tribute-dimable:hover {
  outline: 1px dashed #666666;
}

.cv-tribute-dimmed {
  opacity: 0.2;
}

/* ---- Reset button (fixed) ---- */

.cv-tribute-reset-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #2F2F2F;
  color: #f1e3c8;
  border: 1px solid #383838;
  padding: 8px 16px;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 6px;
  z-index: 100;
  transition: border-color 0.2s ease;
}

.cv-tribute-reset-btn:hover {
  border-color: #428175;
}

/* ---- Generate bar (setlist page, admin only) ---- */

.cv-tribute-generate-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cv-tribute-generate-btn {
  background: #428175;
  color: #f1e3c8;
  border: none;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.cv-tribute-generate-btn:hover:not(:disabled) {
  background: #357066;
}

.cv-tribute-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cv-tribute-generate-status {
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
}

.cv-tribute-view-link {
  color: #428175;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}

.cv-tribute-view-link:hover {
  text-decoration: underline;
}

.cv-tribute-modal-view-link {
  color: #428175;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.cv-tribute-modal-view-link:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .cv-tribute-wrap {
    padding: 0 16px 60px;
  }

  .cv-tribute-section-title {
    font-size: 1.35rem;
  }

  .cv-tribute-generate-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ============================================================
   Tribute Fact Sheet Generation Modal
   ============================================================ */

.cv-tribute-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.cv-tribute-modal-overlay.cv-active {
  opacity: 1;
}

.cv-tribute-modal-card {
  background: linear-gradient(145deg, #2F2F2F, #1F1F1F);
  border: 1px solid rgba(209, 125, 52, 0.25);
  border-radius: 16px;
  width: 480px;
  max-width: 100%;
  padding: 32px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #f1e3c8;
}

.cv-tribute-modal-overlay.cv-active .cv-tribute-modal-card {
  transform: translateY(0);
}

/* Turntable SVG animation styles */
.cv-tribute-player-wrap {
  display: inline-block;
  margin-bottom: 24px;
  position: relative;
  background: #111;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid #383838;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.cv-tribute-player-svg {
  display: block;
}

.cv-tribute-vinyl-disc {
  transform-origin: 50px 50px;
  animation: cv-vinyl-spin 2.5s linear infinite;
  animation-play-state: running;
}

.cv-tribute-player-svg.cv-paused .cv-tribute-vinyl-disc {
  animation-play-state: paused;
}

@keyframes cv-vinyl-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cv-tribute-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f1e3c8;
  margin: 0 0 8px 0;
  letter-spacing: 0.02em;
}

.cv-tribute-modal-subtitle {
  font-size: 0.88rem;
  color: #a99e8b;
  margin: 0 0 24px 0;
  line-height: 1.4;
}

/* Progress bar */
.cv-tribute-progress-bar-wrap {
  background: #121212;
  height: 8px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #2a2a2a;
}

.cv-tribute-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D17D34, #f5a962);
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.1, 1);
  box-shadow: 0 0 8px rgba(209, 125, 52, 0.5);
}

/* Status log console */
.cv-tribute-status-log {
  background: #121212;
  border: 1px solid #383838;
  border-radius: 8px;
  padding: 14px;
  height: 90px;
  overflow-y: auto;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: #8c8273;
  margin-bottom: 24px;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

.cv-tribute-log-line {
  margin: 0 0 6px 0;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cv-tribute-log-line:last-child {
  margin-bottom: 0;
}

.cv-tribute-log-time {
  color: #555;
  flex-shrink: 0;
  user-select: none;
}

.cv-tribute-log-text {
  word-break: break-word;
}

.cv-tribute-log-line.cv-log-success {
  color: #428175;
}

.cv-tribute-log-line.cv-log-error {
  color: #d9534f;
}

.cv-tribute-log-line.cv-log-info {
  color: #D17D34;
}

/* Modal Actions */
.cv-tribute-modal-actions {
  display: flex;
  justify-content: center;
}

.cv-tribute-modal-close-btn {
  background: #2F2F2F;
  color: #f1e3c8;
  border: 1px solid #383838;
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.cv-tribute-modal-close-btn:hover {
  background: #383838;
  border-color: #f1e3c8;
}
