/* EPW Eventbrite Integration — EPW-PRO-297 */

#eventbrite-view {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: #1a1a2e;
}

.eb-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px 60px;
}

/* Header */
.eb-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid #e8e8f0;
}
.eb-header h1 { font-size: 22px; font-weight: 700; margin: 0; }
.eb-header h1 span { color: #f05537; } /* Eventbrite orange */
.eb-header-meta { font-size: 13px; color: #666; }
.eb-header-actions { display: flex; gap: 8px; }
.eb-header-actions button {
  padding: 6px 14px; border-radius: 6px; border: 1px solid #ddd;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
}
.eb-header-actions button:hover { background: #f5f5f5; }
.eb-header-actions button.eb-primary {
  background: #f05537; color: #fff; border-color: #f05537;
}
.eb-header-actions button.eb-primary:hover { background: #d94829; }

/* Stats bar */
.eb-stats {
  display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.eb-stat {
  padding: 10px 16px; background: #f8f8fc; border-radius: 8px;
  border: 1px solid #e8e8f0; min-width: 120px;
}
.eb-stat-value { font-size: 20px; font-weight: 700; }
.eb-stat-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.eb-stat--live .eb-stat-value { color: #22a06b; }
.eb-stat--pending .eb-stat-value { color: #cf9f02; }
.eb-stat--reg .eb-stat-value { color: #0065ff; }

/* Event list / accordion */
.eb-event-list { display: flex; flex-direction: column; gap: 8px; }

.eb-event-card {
  border: 1px solid #e0e0e8; border-radius: 10px; background: #fff;
  overflow: hidden; transition: box-shadow 0.2s;
}
.eb-event-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.eb-event-card.eb-expanded { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Card header (always visible) */
.eb-event-header {
  display: flex; align-items: center; padding: 12px 16px; cursor: pointer;
  gap: 12px; background: #FF2600;
}
.eb-evt--complete .eb-event-header { background: #00FFFF; }
.eb-event-header:hover { filter: brightness(0.95); }
.eb-event-header .eb-event-header-title { color: #fff; }
.eb-event-header .eb-event-header-sub { color: rgba(255,255,255,0.75); }
.eb-evt--complete .eb-event-header .eb-event-header-title { color: #0c4a6e; }
.eb-evt--complete .eb-event-header .eb-event-header-sub { color: rgba(0,0,0,0.5); }
.eb-event-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: #7c3aed; color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.eb-event-header-info { flex: 1; min-width: 0; }
.eb-event-header-title { font-weight: 600; font-size: 14px; }
.eb-event-header-sub { font-size: 12px; margin-top: 2px; }
.eb-event-header-badges { display: flex; gap: 6px; align-items: center; }

.eb-badge {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.eb-badge--live { background: #e3fcef; color: #006644; }
.eb-badge--draft { background: #fff3cd; color: #856404; }
.eb-badge--not-created { background: #f0f0f4; color: #888; }
.eb-badge--synced { background: #e3fcef; color: #006644; }
.eb-badge--pending { background: #fff3cd; color: #856404; }
.eb-badge--error { background: #fde8e8; color: #bf1d1d; }
.eb-badge--day1 { background: #e8f0fe; color: #1a56db; }
.eb-badge--day2 { background: #fef3e2; color: #b45309; }

.eb-expand-arrow {
  font-size: 14px; color: #aaa; transition: transform 0.2s; flex-shrink: 0;
}
.eb-expanded .eb-expand-arrow { transform: rotate(180deg); }

/* Thumbnail + quick-info strip (always visible below header) */
.eb-event-strip {
  display: flex; align-items: stretch; gap: 16px;
  padding: 12px 16px; border-top: 1px solid #f0f0f4; background: #fafafe;
}
.eb-event-thumb-wrap { flex-shrink: 0; width: 180px; }
.eb-event-thumb {
  width: 180px; height: 90px; object-fit: cover;
  border-radius: 6px; display: block;
  border: 1px solid #e0e0e8;
}
.eb-event-thumb-placeholder {
  width: 180px; height: 90px; border-radius: 6px;
  background: #f0f0f4; border: 1px dashed #ccc;
  display: flex; align-items: center; justify-content: center;
}
.eb-thumb-link { font-size: 12px; color: #7c3aed; font-weight: 600; text-decoration: none; }
.eb-thumb-link:hover { text-decoration: underline; }
.eb-event-quickinfo { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.eb-qi-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.eb-qi-label { color: #94a3b8; width: 60px; flex-shrink: 0; }
.eb-qi-val { color: #1e293b; font-weight: 500; }
.eb-qi-link { font-size: 12px; color: #f05537; font-weight: 600; text-decoration: none; margin-top: 4px; }
.eb-qi-link:hover { text-decoration: underline; }

/* Card body (expanded) */
.eb-event-body {
  display: none; padding: 0 16px 16px; border-top: 1px solid #f0f0f4;
}
.eb-expanded .eb-event-body { display: block; }

/* Section headers within card */
.eb-section {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid #f0f0f4;
}
.eb-section:first-child { border-top: none; margin-top: 8px; }
.eb-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  color: #666; letter-spacing: 0.5px; margin-bottom: 10px;
}

/* Form grid */
.eb-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.eb-form-grid--full { grid-template-columns: 1fr; }
.eb-field { display: flex; flex-direction: column; }
.eb-field--full { grid-column: 1 / -1; }
.eb-field label {
  font-size: 11px; font-weight: 600; color: #555; margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.eb-field input, .eb-field select, .eb-field textarea {
  padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fafaff;
  transition: border-color 0.2s;
}
.eb-field input:focus, .eb-field select:focus, .eb-field textarea:focus {
  outline: none; border-color: #f05537; background: #fff;
}
.eb-field textarea { resize: vertical; min-height: 60px; }
.eb-field input[type="checkbox"] {
  width: 16px; height: 16px; margin: 4px 0;
}
.eb-field .eb-char-count {
  font-size: 10px; color: #999; text-align: right; margin-top: 2px;
}
.eb-field .eb-char-count.eb-over { color: #bf1d1d; font-weight: 600; }

/* Ticket types */
.eb-ticket-list { display: flex; flex-direction: column; gap: 6px; }
.eb-ticket-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #f8f8fc; border-radius: 6px;
  font-size: 13px;
}
.eb-ticket-row input { width: 60px; text-align: center; }
.eb-ticket-name { flex: 1; font-weight: 500; }
.eb-ticket-free { color: #22a06b; font-size: 11px; font-weight: 600; }

/* Toggle switches */
.eb-toggle-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
}
.eb-toggle-row label { margin-bottom: 0; flex: 1; }
.eb-toggle {
  position: relative; width: 36px; height: 20px; flex-shrink: 0;
}
.eb-toggle input { opacity: 0; width: 0; height: 0; }
.eb-toggle-slider {
  position: absolute; inset: 0; background: #ccc; border-radius: 10px;
  cursor: pointer; transition: 0.2s;
}
.eb-toggle-slider:before {
  content: ''; position: absolute; width: 16px; height: 16px;
  left: 2px; bottom: 2px; background: #fff; border-radius: 50%;
  transition: 0.2s;
}
.eb-toggle input:checked + .eb-toggle-slider { background: #22a06b; }
.eb-toggle input:checked + .eb-toggle-slider:before { transform: translateX(16px); }

/* Sync status footer */
.eb-sync-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid #f0f0f4;
}
.eb-sync-info { font-size: 12px; color: #888; }
.eb-sync-actions { display: flex; gap: 6px; }
.eb-sync-actions button {
  padding: 6px 12px; border-radius: 6px; border: 1px solid #ddd;
  background: #fff; cursor: pointer; font-size: 12px; font-weight: 500;
}
.eb-sync-actions button.eb-save {
  background: #172351; color: #fff; border-color: #172351;
}
.eb-sync-actions button.eb-save:hover { background: #0d1633; }

/* Dewey code badges */
.eb-dewey {
  display: inline-block; font-size: 9px; font-weight: 600; color: #888;
  background: #f0f0f4; border-radius: 3px; padding: 1px 4px;
  margin-left: 4px; vertical-align: middle; letter-spacing: 0.2px;
  font-family: 'SF Mono', 'Consolas', monospace; text-transform: none;
  cursor: pointer; user-select: none; transition: background 0.15s, color 0.15s;
}
.eb-dewey:hover { background: #c7d2fe; color: #4338ca; }
.eb-dewey.dewey-badge-copied { background: #059669 !important; color: #fff !important; }

/* Cover image area */
.eb-cover-image-area { margin-bottom: 4px; }
.eb-cover-placeholder {
  border: 2px dashed #d0d0d8; border-radius: 10px; padding: 32px 20px;
  text-align: center; cursor: pointer; background: #fafaff;
  transition: border-color 0.2s, background 0.2s;
}
.eb-cover-placeholder:hover { border-color: #f05537; background: #fff5f3; }
.eb-cover-placeholder-icon { font-size: 36px; margin-bottom: 6px; }
.eb-cover-placeholder-text { font-size: 14px; font-weight: 600; color: #555; }
.eb-cover-placeholder-hint { font-size: 11px; color: #999; margin-top: 4px; }
.eb-cover-preview {
  position: relative; border-radius: 10px; overflow: hidden;
  max-height: 240px; background: #f0f0f4;
}
.eb-cover-preview img {
  width: 100%; height: auto; max-height: 240px; object-fit: cover; display: block;
}
.eb-cover-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
}
.eb-cover-preview:hover .eb-cover-overlay { opacity: 1; }
.eb-cover-error {
  padding: 20px; text-align: center; color: #bf1d1d; font-size: 13px;
}

/* Save indicator */
.eb-saving { opacity: 0.6; pointer-events: none; }
.eb-saved-flash {
  position: fixed; top: 20px; right: 20px; padding: 10px 20px;
  background: #22a06b; color: #fff; border-radius: 8px; font-size: 13px;
  font-weight: 600; z-index: 9999; animation: ebFlash 2s forwards;
}
@keyframes ebFlash { 0%{opacity:1;transform:translateY(0)} 70%{opacity:1} 100%{opacity:0;transform:translateY(-10px)} }

/* Responsive */
@media (max-width: 768px) {
  .eb-form-grid { grid-template-columns: 1fr; }
  .eb-stats { flex-direction: column; }
  .eb-body { padding: 12px 16px; }
}

/* ---- Eventbrite unfurl panel: two-column split layout ---- */
.eb-panel-split {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
  min-height: 400px;
}
.eb-panel-screenshot {
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  background: #f8f9fc;
}
.eb-screenshot-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  gap: 8px;
}
.eb-screenshot-btn {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  color: #475569;
  white-space: nowrap;
}
.eb-screenshot-btn:hover { background: #f1f5f9; }
.eb-screenshot-btn:disabled { opacity: 0.5; cursor: default; }
.eb-screenshot-frame {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px;
}
.eb-ss-img {
  width: 100%;
  max-width: 404px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: block;
}
.eb-ss-loading, .eb-ss-placeholder, .eb-ss-error {
  padding: 40px 20px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}
.eb-ss-error { color: #bf1d1d; }
.eb-panel-form {
  overflow-y: auto;
  max-height: 600px;
  padding: 4px 0;
}
