/* ── Create Event — Left Panel Preview Card ─────────────────────────────── */

/* Cover zone */
.panel-cover-zone {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background-color: var(--bg-input);
  background-image: none;
  background-size: cover;
  background-position: center;
  border: 1px dashed rgba(255,255,255,0.17);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.4s ease;
  overflow: hidden;
  position: relative;
  flex-shrink: 0; /* prevent flex column from compressing the poster */
}
.panel-cover-zone:hover {
  border-color: rgba(255,255,255,0.20);
}
.panel-cover-zone.has-image { border: none; }
.panel-cover-zone.has-image img,
.panel-cover-zone.has-image video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.panel-cover-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.panel-cover-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-cover-label {
  font: 400 13px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.68);
}

/* Event meta preview */
.panel-event-name {
  margin-top: 16px;
  font: 700 15px/1.2 'Space Grotesk', sans-serif;
  color: var(--text-primary);
  min-height: 19px;
}
.panel-event-name.empty {
  color: rgba(237, 238, 245, 0.28);
  font-style: italic;
}

.panel-event-meta {
  margin-top: 6px;
  font: 400 12px/1.4 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.68);
  min-height: 17px;
}
.panel-event-meta.empty {
  color: rgba(205, 68, 68, 0.52);
  font-style: italic;
}

.panel-genres {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-height: 14px;
}
.panel-genre-item {
  font: 400 9px/1 'DM Sans', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.72;
  transition: color 0.2s, opacity 0.2s;
}
.panel-genre-item + .panel-genre-item::before { content: ' · '; }

.panel-divider {
  height: 1px;
  background: rgba(255,255,255,0.09);
  margin: 20px 0;
  flex-shrink: 0;
}

/* ── Panel collapsible sections ── */
.panel-section { margin-bottom: 4px; flex-shrink: 0; }
.panel-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  transition: background 0.12s; border-radius: 8px; padding: 8px 6px;
  min-height: 44px;
}
.panel-section-hdr:hover { background: var(--bg-hover); }
.panel-section-hdr:hover .ps-chevron { color: rgba(255,255,255,0.72); }
.panel-section-title {
  font: 700 15px/1 'DM Sans',sans-serif;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.56);
}
.ps-chevron {
  width: 14px; height: 14px;
  color: rgba(255,255,255,0.25);
  transition: transform 0.18s, color 0.12s;
  flex-shrink: 0;
}
.panel-section.ps-collapsed .ps-chevron { transform: rotate(-90deg); }
.panel-section-body {
  padding-top: 10px;
  overflow: hidden;
  will-change: max-height;
  transition: max-height 0.25s ease, opacity 0.2s;
}
.panel-section.ps-collapsed .panel-section-body {
  max-height: 0 !important; opacity: 0; pointer-events: none; padding-top: 0;
}

/* Status pills */
.status-pills { display: flex; gap: 6px; }
.status-pill {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  font: 500 12px/1 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--bg-hover);
  color: rgba(255,255,255,0.62);
  transition: all 0.12s;
}
.status-pill.active-draft {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.32);
  color: #FFFFFF;
}
.status-pill.active-published {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0C0C12;
}

/* ── Date Card ── */
.date-card {
  background: transparent;
  border-radius: 0;
  overflow: visible;
}
.date-row {
  display: flex; align-items: center;
  padding: 10px 0; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  position: relative;
}
.date-row-label {
  font: 500 14px/1 'DM Sans',sans-serif;
  color: rgba(255,255,255,0.62);
  width: 36px; flex-shrink: 0;
  white-space: nowrap;
}
.date-row-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.date-tz {
  font: 400 12px/1 'DM Sans',sans-serif;
  color: rgba(255,255,255,0.42); margin-right: 2px;
}
.date-pill {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font: 400 14px/1 'DM Sans',sans-serif;
  color: var(--text-primary); cursor: pointer;
  transition: color 0.12s; white-space: nowrap;
}
.date-pill:hover { color: var(--accent); }
/* Fixed widths so Start/End rows stay perfectly column-aligned */
#startDateBtn, #endDateBtn { min-width: 90px; }
#startTimeBtn, #endTimeBtn { font-variant-numeric: tabular-nums; min-width: 62px; text-align: right; }
.date-pill-sep {
  font: 400 13px/1 'DM Sans',sans-serif;
  color: rgba(255,255,255,0.20);
}
.end-visibility-btn {
  border: none; background: transparent; cursor: pointer;
  color: rgba(255,255,255,0.25); padding: 2px 4px; border-radius: 4px;
  display: flex; align-items: center;
  transition: color 0.12s;
}
.end-visibility-btn:hover { color: rgba(255,255,255,0.72); }
.end-visibility-btn.dimmed { color: rgba(255,255,255,0.14); }

/* === PREVIEW PANEL ANIMATIONS === */

/* Smooth update flash when preview content changes */
@keyframes previewUpdate {
  0%   { opacity: 1; }
  30%  { opacity: 0.7; }
  100% { opacity: 1; }
}
.preview-updating {
  animation: previewUpdate 300ms ease;
}

/* Cover image/video zoom-in when loaded */
@keyframes coverReveal {
  from { transform: scale(1.04); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.preview-cover-img {
  animation: coverReveal 400ms cubic-bezier(0.16,1,0.3,1) both;
}

/* Processing state while MOV is being remuxed / transcoded */
.panel-cover-zone.cover-processing {
  pointer-events: none;
}
.cover-processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(8, 8, 16, 0.72);
  border-radius: 11px;
}
@keyframes coverSpinnerRotate {
  to { transform: rotate(360deg); }
}
.cover-processing-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.85);
  border-radius: 50%;
  animation: coverSpinnerRotate 0.75s linear infinite;
}
.cover-processing-label {
  font: 500 12px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
}

/* Video badge shown over poster when cover is a video */
.panel-cover-video-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  font: 600 9px/1 'DM Sans', sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 3;
}

/* Preview text updates — subtle fade */
@keyframes textUpdate {
  0%   { opacity: 1; }
  20%  { opacity: 0.5; }
  100% { opacity: 1; }
}
.preview-title-anim,
.preview-text-anim {
  animation: textUpdate 250ms ease;
}

/* Genre pill in preview */
.preview-genre-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-sec);
  margin: 2px;
  transition: all 160ms ease;
}

/* "Live" indicator pulse */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}
.preview-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: livePulse 2s ease infinite;
  margin-right: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .preview-live-dot { animation: none; }
  .cover-processing-spinner { animation: none; }
  .preview-cover-img { animation: none; }
  .preview-updating { animation: none; }
  .preview-title-anim,
  .preview-text-anim { animation: none; }
  .panel-section-body { transition: none; }
}
