/* ============================================
   Campaign Launcher - Shared Component Styles
   Unified card, KPI, upload, event styles
   ============================================ */

/* ── KPI Cards (Standardized) ─────────────── */
.kpi-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.kpi-card .card-body {
  padding: 1.25rem;
}
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bs-heading-color);
}
.kpi-label {
  font-size: 0.8rem;
  color: var(--bs-body-color);
  margin-top: 2px;
}
.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
}
.kpi-trend.up {
  color: #198754;
  background: rgba(25, 135, 84, 0.1);
}
.kpi-trend.down {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

/* ── Chart Cards ──────────────────────────── */
.chart-card {
}
.chart-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--bs-border-color);
  padding: 1rem 1.25rem;
}
.chart-card .card-body {
  padding: 1.25rem;
}

/* ── Upload Zone (Shared) ─────────────────── */
.upload-zone {
  border: 2px dashed var(--bs-border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background: var(--bs-body-bg);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.04);
}
.upload-zone .upload-icon {
  font-size: 2.5rem;
  color: var(--bs-primary);
  margin-bottom: 0.75rem;
  opacity: 0.7;
}
.upload-zone .upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  margin-bottom: 0.25rem;
}
.upload-zone .upload-subtitle {
  font-size: 0.8rem;
  color: var(--bs-body-color);
}

/* ── Event Feed (Shared) ──────────────────── */
.event-feed {
  max-height: 400px;
  overflow-y: auto;
}
.event-item {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid transparent;
  transition: background 0.15s;
  font-size: 0.85rem;
}
.event-item:hover {
  background: var(--bs-light);
}
.event-calling   { border-left-color: var(--bs-info); }
.event-answered  { border-left-color: var(--bs-success); }
.event-accept    { border-left-color: #00c853; }
.event-decline   { border-left-color: var(--bs-danger); }
.event-voicemail { border-left-color: #9c27b0; }
.event-noanswer  { border-left-color: var(--bs-warning); }
.event-failed    { border-left-color: var(--bs-secondary); }

/* ── Status Badges ────────────────────────── */
.campaign-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Pulse Animations ─────────────────────── */
.pulse-running {
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(25, 135, 84, 0); }
}
.pulse-dot {
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse-record {
  animation: pulse-record 1s infinite;
}
@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(220, 53, 69, 0); }
}

/* ── Control Button ───────────────────────── */
.control-btn {
  min-width: 100px;
}

/* ── Data Table Enhancements ──────────────── */
.stats-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-body-color);
  background: var(--bs-light);
}
.stats-table td {
  vertical-align: middle;
}

/* ── Filter Bar ───────────────────────────── */
.filter-bar {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

/* ── Date Filter Bar ──────────────────────── */
.date-filter-bar {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: var(--bs-body-bg);
}

/* ── Import Summary ───────────────────────── */
.import-summary {
  display: none;
}
.import-summary.show {
  display: block;
}
.import-stat {
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--bs-light);
}
.import-stat .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}
.import-stat .stat-label {
  font-size: 0.75rem;
  color: var(--bs-body-color);
}

/* ── Profile ──────────────────────────────── */
.profile-banner {
  height: 140px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, var(--bs-primary) 0%, #7c3aed 100%);
}
.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--bs-body-bg);
  margin-top: -45px;
  background: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
}

/* ── Password Strength ────────────────────── */
.password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--bs-border-color);
  overflow: hidden;
  margin-top: 6px;
}
.password-strength .strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.requirement {
  font-size: 0.8rem;
  color: var(--bs-body-color);
  transition: color 0.2s;
}
.requirement.met {
  color: var(--bs-success);
}

/* ── Status Banner (Live Monitor) ─────────── */
.status-banner {
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

/* ── Record Button (Audio) ────────────────── */
.record-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.2s;
}

/* ── Settings Tab Icons ───────────────────── */
.settings-tabs .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.settings-tabs .nav-link > i {
  font-size: 16px;
  opacity: 0.7;
}
.settings-tabs .nav-link.active > i {
  opacity: 1;
  color: var(--bs-primary);
}

/* ── Notes Cell (Leads) ──────────────────── */
.notes-cell {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Status Dropdown (Leads) ──────────────── */
.status-dropdown .badge {
  cursor: pointer;
}

/* ── Accent Colors as classes ─────────────── */
.text-accept { color: #00c853 !important; }
.bg-accept { background-color: #00c853 !important; }
.text-voicemail { color: #9c27b0 !important; }
.bg-voicemail { background-color: #9c27b0 !important; }
.bg-accept-subtle { background-color: rgba(0, 200, 83, 0.12) !important; }
.bg-voicemail-subtle { background-color: rgba(156, 39, 176, 0.12) !important; }

/* ── Page header (breadcrumb area) ────────── */
.app-page-head {
  margin-bottom: 1.25rem;
}

/* ── Scrollbar styling for simplebar ──────── */
.simplebar-scrollbar::before {
  border-radius: 4px;
}

/* ── Dark mode adjustments ────────────────── */
[data-bs-theme="dark"] .kpi-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}
[data-bs-theme="dark"] .upload-zone {
  background: transparent;
}
[data-bs-theme="dark"] .upload-zone:hover,
[data-bs-theme="dark"] .upload-zone.dragover {
  background: rgba(var(--bs-primary-rgb), 0.08);
}
[data-bs-theme="dark"] .filter-bar {
  background: transparent;
}

/* ── Date Filter Active Button (Analytics) ── */
.date-filter-bar .btn-outline-secondary.active {
  background: var(--bs-primary);
  color: #fff;
  border-color: var(--bs-primary);
}

/* ── Stats Table Totals Row (Analytics) ───── */
.stats-table .totals-row {
  font-weight: 700;
  background: var(--bs-light);
}

/* ── Status Dropdown (Leads) ──────────────── */
.status-dropdown {
  position: relative;
  display: inline-block;
}
.status-dropdown .badge {
  cursor: pointer;
}
.status-dropdown .dropdown-menu {
  min-width: 160px;
}

/* ── Upload Zone Icon (generic) ───────────── */
.upload-zone i {
  font-size: 3rem;
  color: var(--bs-primary);
}

/* ── Audio Recording ──────────────────────── */
.recording {
  animation: pulse-record 1s infinite;
}
#waveCanvas {
  background: var(--bs-light);
  border-radius: 8px;
}

/* ── Password Requirement Unmet ───────────── */
.requirement.unmet {
  color: var(--bs-secondary);
}
