/* Minimal audience + builder styles to unblock missing asset and keep layout usable */

/* Shell + layout */
.ecb-shell { display:block; }
.ecb-content { display:flex; gap:16px; align-items:flex-start; }
.ecb-sidebar { width:260px; flex:0 0 260px; }
.ecb-main { flex:1; min-width:0; }

/* Header */
.ecb-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.ecb-header-title h1 { margin:4px 0; font-size:22px; font-weight:700; color:#0f172a; }
.ecb-pill { display:inline-block; background:#e2e8f0; color:#334155; border-radius:999px; padding:2px 8px; font-size:12px; font-weight:600; }
.ecb-status-pill { display:inline-block; background:#eff6ff; color:#1d4ed8; border-radius:999px; padding:4px 10px; font-size:12px; font-weight:700; }
.ecb-saving-indicator { font-size:12px; color:#64748b; margin-left:8px; }
.ecb-header-buttons { display:flex; gap:8px; }

/* Stepper */
.ecb-stepper { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.ecb-step { display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid #e2e8f0; border-radius:8px; background:#fff; }
.ecb-step--active { border-color:#93c5fd; box-shadow:0 0 0 2px rgba(59,130,246,0.15) inset; }
.ecb-step--complete { opacity:0.85; }
.ecb-step-title { font-weight:700; color:#0f172a; }
.ecb-step-description { font-size:12px; color:#64748b; }

/* Panels */
.ecb-panel { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:16px; margin-bottom:16px; }
.ecb-field-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.ecb-field-grid.ecb-field-grid--schedule { grid-template-columns:repeat(2, minmax(0,1fr)); }
.ecb-field { display:flex; flex-direction:column; gap:6px; }
.ecb-label { font-weight:600; color:#334155; font-size:13px; }
.ecb-field input, .ecb-field select, .ecb-field textarea { border:1px solid #e2e8f0; border-radius:8px; padding:8px 10px; font-size:14px; }
.ecb-field .ecb-helper { color:#64748b; font-size:12px; }

/* Audience layout */
.ecb-audience-layout { display:grid; grid-template-columns:1fr 320px; gap:16px; }
.ecb-audience-options { display:flex; gap:12px; margin-bottom:12px; }
.ecb-type-card { display:flex; align-items:flex-start; gap:8px; padding:10px 12px; border:1px solid #e2e8f0; border-radius:8px; cursor:pointer; background:#fff; }
.ecb-type-card.is-selected { border-color:#93c5fd; box-shadow:0 0 0 2px rgba(59,130,246,0.15) inset; }

/* Tags */
.ecb-tag-selection { display:grid; grid-template-columns:1fr; gap:12px; }
.ecb-tag-list-panel { border:1px solid #e2e8f0; border-radius:8px; background:#fff; }
.ecb-tag-search-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-bottom:1px solid #e2e8f0; }
.ecb-search-input-group { display:flex; align-items:center; gap:6px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:6px 8px; flex:1; }
.ecb-tag-list { max-height:320px; overflow:auto; padding:6px; display:grid; gap:6px; }
.ecb-tag-list-item { text-align:left; border:1px solid #e2e8f0; border-radius:8px; padding:8px; background:#fff; cursor:pointer; }
.ecb-tag-list-item.selected { border-color:#22c55e; box-shadow:0 0 0 2px rgba(34,197,94,0.18) inset; }
.ecb-selected-tags { display:flex; flex-direction:column; gap:6px; }
.ecb-selected-tags-list { display:flex; flex-wrap:wrap; gap:6px; }
.ecb-tag-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; border:1px solid #e2e8f0; background:#f8fafc; font-size:12px; }
.ecb-tag-chip.selected { background:#ecfdf5; border-color:#bbf7d0; color:#065f46; }
.ecb-chip-count { color:#475569; font-weight:700; }

/* Segments */
.ecb-segment-selection { display:grid; grid-template-columns: 1fr 1.1fr; gap:12px; }
.ecb-segment-list-panel { border:1px solid #e2e8f0; border-radius:8px; background:#fff; }
.ecb-segment-search-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-bottom:1px solid #e2e8f0; }
.ecb-segment-list { max-height:340px; overflow:auto; padding:6px; display:grid; gap:6px; }
.ecb-segment-list-item { text-align:left; border:1px solid #e2e8f0; border-radius:8px; padding:10px; background:#fff; cursor:pointer; }
.ecb-segment-list-item.selected { border-color:#93c5fd; box-shadow:0 0 0 2px rgba(59,130,246,0.18) inset; }
.ecb-segment-detail-card { border:1px solid #e2e8f0; border-radius:8px; background:#fff; padding:12px; }
.ecb-segment-detail-header { display:flex; align-items:center; justify-content:space-between; }
.ecb-segment-detail-meta { display:flex; flex-wrap:wrap; gap:10px; margin:8px 0; color:#64748b; font-size:12px; }
.ecb-segment-detail-tags { display:flex; flex-wrap:wrap; gap:6px; }

/* Audience preview */
.ecb-audience-preview { border:1px solid #e2e8f0; border-radius:8px; background:#fff; padding:10px; }
.ecb-preview-placeholder { text-align:center; color:#64748b; padding:24px 8px; }
.ecb-preview-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.ecb-preview-stats { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0; }
.ecb-preview-stat { background:#f1f5f9; color:#334155; border:1px solid #e2e8f0; border-radius:999px; padding:2px 8px; font-size:12px; }
.ecb-preview-stat.highlight { background:#ecfdf5; border-color:#bbf7d0; color:#065f46; }
.ecb-preview-stat.warn { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.ecb-contacts-preview-table-wrap { border:1px solid #e2e8f0; border-radius:8px; overflow:auto; max-height:360px; }
.ecb-contacts-preview-table { width:100%; border-collapse:collapse; }
.ecb-contacts-preview-table th, .ecb-contacts-preview-table td { border-bottom:1px solid #e2e8f0; padding:8px 10px; text-align:left; }
.ecb-contacts-preview-table th { background:#f8fafc; font-weight:600; color:#475569; }
.ecb-sort { background:none; border:none; padding:0; font-weight:600; color:#334155; cursor:pointer; }

/* Preview frame */
.ecb-preview-pane { border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; margin-top:12px; }
.ecb-preview-toolbar { display:flex; align-items:center; gap:8px; justify-content:space-between; padding:8px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.ecb-preview-email-wrapper { background:#f1f5f9; padding:12px; display:flex; justify-content:center; }
.ecb-preview-email { transform: scale(var(--ecb-preview-scale, 1)); transform-origin: 0 0; }
.ecb-preview-email-surface { width:640px; max-width:100%; margin:0 auto; background:var(--ecb-preview-surface, #ffffff); color:#0f172a; border:1px solid #e5e7eb; border-radius:8px; padding:12px; box-shadow:0 1px 2px rgba(0,0,0,0.04); }
.ecb-preview-title { font-weight:700; margin:8px 0 12px; color:#0f172a; }

/* Quota + cards */
.ecb-card { border:1px solid #e2e8f0; border-radius:12px; background:#fff; padding:12px; }
.ecb-card header { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.ecb-chip { display:inline-block; background:#f1f5f9; color:#334155; border:1px solid #e2e8f0; border-radius:999px; padding:2px 8px; font-size:12px; font-weight:700; }
.ecb-summary-list { list-style:none; padding:0; margin:0; display:grid; grid-template-columns: auto 1fr; gap:4px 12px; }

/* Buttons - reuse existing email-campaigns-btn styles */
.email-campaigns-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 12px; border-radius:8px; font-weight:600; font-size:13px; }
.email-campaigns-btn-primary { background:#0284c7; color:#fff; border:1px solid #0369a1; }
.email-campaigns-btn-primary:hover { background:#0369a1; }
.email-campaigns-btn-secondary { background:#fff; color:#475569; border:1px solid #e2e8f0; }
.email-campaigns-btn-secondary:hover { background:#f8fafc; }
.email-campaigns-btn-danger { background:#ef4444; color:#fff; border:1px solid #dc2626; }
.email-campaigns-btn-warning { background:#f59e0b; color:#111827; border:1px solid #d97706; }

/* Utilities */
.ecb-inline-aside { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.ecb-inline-error { color:#991b1b; background:#fee2e2; border:1px solid #fecaca; border-radius:8px; padding:8px 10px; }
.ecb-inline-notice { color:#334155; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:8px; padding:8px 10px; }
.ecb-inline-notice--success { color:#065f46; background:#ecfdf5; border-color:#bbf7d0; }
.ecb-inline-notice--warning { color:#9a3412; background:#fff7ed; border-color:#fed7aa; }

/* Responsive */
@media (max-width: 1024px) {
  .ecb-content { flex-direction:column; }
  .ecb-sidebar { width:100%; }
  .ecb-audience-layout { grid-template-columns:1fr; }
  .ecb-inline-aside { grid-template-columns:1fr; }
}
