@import url('../booking-links/booking-links.css');

/* ── Tabs ───────────────────────────────────────────────────────── */
.ec-tabs { display: flex; gap: 2px; margin-bottom: 24px; border-bottom: 2px solid var(--color-border); padding-bottom: 0; overflow-x: auto; }
.ec-tab { background: none; border: none; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s ease; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ec-tab:hover { color: var(--color-primary); }
.ec-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.ec-tab-icon { font-size: 18px; }
.ec-tab-content { display: none; }
.ec-tab-content.active { display: block; }

/* ── Section header ─────────────────────────────────────────────── */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h3 { font-size: 18px; font-weight: 700; color: var(--color-header); margin: 0; }

/* ── Data Table ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.data-table th {
  background: var(--color-header, #1a365d);
  color: #fff;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
  line-height: 1.4;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: #eef2ff; }
.data-table .col-narrow { width: 1%; white-space: nowrap; }
.data-table .col-center { text-align: center; }
.data-table .text-sm { font-size: 12px; color: #718096; }
.data-table .text-mono { font-family: monospace; font-size: 12px; color: #718096; }
.data-table .cell-truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Status Badges ──────────────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-badge.status-active { background: #c6f6d5; color: #22543d; }
.status-badge.status-inactive { background: #fed7d7; color: #9b2c2c; }

/* ── Rep photo in table ─────────────────────────────────────────── */
.ec-rep-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.ec-rep-photo-placeholder { width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.ec-rep-photo-placeholder .material-icons { font-size: 18px; color: #a0aec0; }

/* ── QR link in event detail ────────────────────────────────────── */
.ec-qr-link { font-family: monospace; font-size: 12px; padding: 6px 10px; background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 6px; word-break: break-all; display: block; margin-top: 4px; }

/* ── Selfie preview in submission detail ─────────────────────────── */
.ec-selfie-preview { max-width: 160px; border-radius: 50%; margin-top: 8px; }

/* ── Assigned reps in event detail ──────────────────────────────── */
.ec-assigned-rep { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.ec-assigned-rep:last-child { border-bottom: none; }

/* ── Filters bar ────────────────────────────────────────────────── */
.ec-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.ec-filters label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #718096;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}
.ec-filters .form-input {
  margin-bottom: 0;
}

/* ── Submission count footer ────────────────────────────────────── */
.ec-count { font-size: 13px; color: #718096; padding: 10px 0; }

/* ── Email Config Section (in modals) ──────────────────────────── */
.ec-email-section {
  margin-top: 20px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}
.ec-email-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}
.ec-email-section-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-header);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ec-email-section-header .material-icons { font-size: 18px; transition: transform 0.2s; }
.ec-email-section-header.open .material-icons { transform: rotate(180deg); }
.ec-email-section-body { display: none; padding-top: 12px; }
.ec-email-section-body.open { display: block; }

/* Role toggle (agent / guest) */
.ec-role-toggle {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  background: #edf2f7;
  border-radius: 6px;
  padding: 2px;
}
.ec-role-toggle button {
  flex: 1;
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #718096;
  transition: all 0.15s;
}
.ec-role-toggle button.active {
  background: #fff;
  color: #2b6cb0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Role panels */
.ec-role-panel { display: none; }
.ec-role-panel.active { display: block; }

/* Value prop editor rows */
.ec-vp-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
  padding: 8px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.ec-vp-row .form-input { margin-bottom: 0; }

/* Template variable hint */
.ec-template-hint {
  font-size: 11px;
  color: #a0aec0;
  margin-top: 4px;
  font-style: italic;
}

/* Checkbox row */
.ec-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.ec-checkbox-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.ec-checkbox-row label { font-size: 13px; font-weight: 500; color: #333; cursor: pointer; margin: 0; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ec-filters {
    grid-template-columns: 1fr;
  }
  .data-table { font-size: 12px; }
  .data-table th,
  .data-table td { padding: 8px 10px; }
}
