/* ═══════════════════════════════════════════════════════════
   Event Detail Page
   ═══════════════════════════════════════════════════════════ */

.ed-page { max-width: 640px; margin: 0 auto; padding-bottom: 60px; }
.ed-loading { text-align: center; padding: 120px 24px; color: var(--muted); }

.ed-back {
  position: fixed; top: 72px; left: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(17,24,39,.8); backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all var(--transition);
}
.ed-back:hover { color: var(--text); border-color: var(--accent); }

/* Admin edit button */
.ed-edit-btn {
  flex-shrink: 0; margin-top: 4px;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer;
  transition: all var(--transition);
}
.ed-edit-btn:hover { color: var(--accent); border-color: var(--accent); }

/* Hero Image */
.ed-hero-img {
  width: 100%; height: 280px;
  background-size: cover; background-position: center;
}
.ed-hero-placeholder {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  display: flex; align-items: center; justify-content: center;
}
.ed-hero-emoji { font-size: 64px; opacity: .5; }

.ed-content { padding: 24px 20px; }

.ed-date {
  font-size: 14px; font-weight: 700; color: var(--accent);
  margin-bottom: 8px;
}
.ed-title {
  font-size: clamp(24px, 5vw, 32px); font-weight: 800;
  line-height: 1.2; letter-spacing: -.02em; margin-bottom: 12px;
}
.ed-venue {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--muted); margin-bottom: 20px;
}

.ed-info-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.ed-label { color: var(--muted); font-weight: 600; }

.ed-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.ed-tag {
  padding: 5px 14px; border-radius: 100px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  text-transform: capitalize;
}

/* Vote Buttons */
.ed-votes {
  display: flex; gap: 10px; margin: 24px 0;
}
.ed-vote-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 12px;
  background: var(--surface2); border: 2px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
  color: var(--text-dim);
  transition: all var(--transition);
}
.ed-vote-btn:hover { border-color: var(--accent); color: var(--text); }
.ed-vote-btn.active.going { border-color: var(--success); color: var(--success); background: rgba(74,222,128,.1); }
.ed-vote-btn.active.maybe { border-color: var(--warm); color: var(--warm); background: rgba(245,192,110,.1); }
.ed-vote-btn.active.pass { border-color: var(--error); color: var(--error); background: rgba(248,113,113,.1); }
.ed-vote-emoji { font-size: 16px; }

/* Sign-in prompt */
.ed-signin-prompt {
  text-align: center; margin: 24px 0;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.ed-signin-prompt p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.ed-signin-btn {
  padding: 10px 24px; background: var(--accent); color: var(--bg);
  border-radius: var(--radius-sm); font-weight: 700; font-size: 14px;
}

/* Friends Section */
.ed-section-title {
  font-size: 16px; font-weight: 700; margin-bottom: 12px;
  color: var(--text-dim);
}
.ed-friends-section { margin: 20px 0; }
.ed-friends-list { display: flex; flex-direction: column; gap: 10px; }
.ed-friend {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.ed-friend-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ed-friend span { font-size: 14px; font-weight: 600; }

.ed-no-friends {
  text-align: center; margin: 20px 0; padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ed-no-friends p { font-size: 14px; color: var(--muted); }

/* Vote Counts */
.ed-vote-counts {
  display: flex; gap: 16px; margin: 16px 0; font-size: 13px; font-weight: 600;
}
.ed-vc { display: flex; align-items: center; gap: 4px; }
.ed-vc.going { color: var(--success); }
.ed-vc.maybe { color: var(--warm); }

/* Ticket Button */
.ed-ticket-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--radius); font-size: 16px; font-weight: 700;
  margin-top: 24px;
  transition: filter var(--transition), transform var(--transition);
  box-shadow: 0 0 30px var(--accent-glow);
}
.ed-ticket-btn:hover {
  filter: brightness(1.1); transform: translateY(-2px);
  text-decoration: none;
}

.ed-back-btn {
  margin-top: 16px; padding: 10px 24px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--radius-sm); font-weight: 700;
}

/* Description */
.ed-description {
  font-size: 14px; line-height: 1.6; color: var(--text-dim);
  margin-bottom: 16px; white-space: pre-wrap; word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   Comments Section — V2 style adapted for V3
   ═══════════════════════════════════════════════════════════ */

.cmt-section {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.cmt-section .ed-section-title {
  display: flex; align-items: center; gap: 8px;
}

/* Compose box */
.cmt-compose {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.cmt-compose-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-dim); color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cmt-compose-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.cmt-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  resize: none;
  width: 100%; box-sizing: border-box;
  transition: border-color .15s;
}
.cmt-textarea::placeholder { color: var(--muted); }
.cmt-textarea:focus { border-color: var(--accent); outline: none; }

.cmt-post-btn {
  align-self: flex-end;
  padding: 6px 16px;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: opacity .15s;
}
.cmt-post-btn:hover { opacity: .85; }
.cmt-post-btn:disabled { opacity: .5; cursor: default; }

/* Comment list */
.cmt-list { display: flex; flex-direction: column; gap: 2px; }
.cmt-empty, .cmt-loading {
  text-align: center; padding: 20px 8px;
  color: var(--muted); font-size: 13px;
}

/* Single comment */
.cmt-item {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.cmt-item:last-child { border-bottom: none; }

.cmt-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text);
  overflow: hidden;
}
.cmt-avatar-sm {
  width: 24px; height: 24px; font-size: 9px;
}
.cmt-avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

.cmt-body { flex: 1; min-width: 0; }

.cmt-meta {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px;
}
.cmt-name {
  font-size: 12px; font-weight: 700; color: var(--text);
}
.cmt-time {
  font-size: 11px; color: var(--muted);
}

.cmt-text {
  font-size: 13px; line-height: 1.5; color: #dde3f0;
  white-space: pre-wrap; word-break: break-word;
}

/* Actions */
.cmt-actions {
  display: flex; gap: 12px; margin-top: 4px;
}
.cmt-action {
  background: none; border: none; color: var(--muted);
  font-size: 11px; font-weight: 600; cursor: pointer;
  padding: 2px 0; transition: color .15s;
}
.cmt-action:hover { color: var(--text); }
.cmt-delete:hover { color: var(--error); }

/* Replies */
.cmt-replies {
  margin-top: 8px; padding-left: 4px;
  border-left: 2px solid rgba(255,255,255,.06);
}
.cmt-reply {
  display: flex; gap: 8px; padding: 8px 0 8px 8px;
}
.cmt-reply:last-child { border-bottom: none; }

/* Reply form */
.cmt-reply-form {
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.cmt-reply-input {
  font-size: 12px; padding: 8px 10px;
}
.cmt-reply-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}

/* Sign-in prompt for comments */
.cmt-signin {
  text-align: center; padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 16px;
}
.cmt-signin p { font-size: 13px; color: var(--muted); margin: 0; }
