/**
 * UARCampaignList.css v1.2.0
 * Styles for UAR Campaign List View
 * 
 * NEW v1.2.0: Unified regenerated campaign styling
 * - Subtle gray "REGENERATED" badge instead of orange highlight
 * - Removed special yellow background for regenerated campaigns
 * - Regenerated campaigns now visually identical to regular campaigns
 * - Only indicator: small gray badge in header
 */

/* ==================== Container ==================== */
.uar-campaign-list-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ==================== Header ==================== */
.campaign-list-header {
  margin-bottom: 16px;
}

.campaign-list-title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
  gap: 24px;
}

.title-content {
  flex: 0 0 auto;
}

.campaign-list-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* Header Search Box */
.header-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  min-width: 280px;
  max-width: 400px;
  flex: 1;
}

.header-search-box i {
  width: 18px;
  height: 18px;
  color: #9CA3AF;
}

.header-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #111827;
  outline: none;
}

.header-search-box input::placeholder {
  color: #9CA3AF;
}

.header-search-box:focus-within {
  border-color: #6366F1;
  background: white;
}

/* Count badge inline with title */
.title-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: 16px;
  margin-left: 4px;
}

.title-badge {
  margin-left: auto;
}

.badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.badge-primary {
  background: #EEF2FF;
  color: #6366F1;
}

/* ==================== Filters ==================== */
.campaign-list-filters {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

/* Compact filter styles */
.campaign-list-filters.compact {
  margin-bottom: 16px;
  padding: 0;
  background: transparent;
  border: none;
  flex-wrap: nowrap;
}

.campaign-list-filters.compact .filter-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
}

.campaign-list-filters.compact .filter-item {
  min-width: auto;
  flex-direction: row;
}

.campaign-list-filters.compact .filter-item .filter-select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  min-width: 130px;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  background-size: 12px;
}

.filter-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  text-transform: none;
  letter-spacing: 0.3px;
}

.filter-item label i {
  width: 14px;
  height: 14px;
  color: #6B7280;
}

.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.filter-select:hover {
  border-color: #6366F1;
}

.filter-select:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: white;
  min-width: 280px;
  transition: all 0.2s;
}

.search-box:focus-within {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box i {
  width: 18px;
  height: 18px;
  color: #9CA3AF;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #111827;
}

.search-box input::placeholder {
  color: #9CA3AF;
}

/* ==================== Campaign Cards ==================== */
.campaign-list-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.campaign-card {
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clickable card hover effect */
.campaign-card.clickable-card {
  cursor: pointer;
}

.campaign-card.clickable-card:hover {
  border-color: #6366F1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.campaign-card.clickable-card:hover .campaign-card-title {
  color: #6366F1;
}

.campaign-card.clickable-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.1);
}

/* Compact Card Layout - Higher Specificity */
.campaign-card.compact {
  padding: 16px 20px;
}

.campaign-card.compact > .campaign-card-main {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.campaign-card.compact .campaign-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campaign-card.compact .campaign-card-title-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.campaign-card.compact .campaign-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campaign-card.compact .campaign-card-details {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6B7280;
  flex-wrap: wrap;
}

.campaign-card.compact .detail-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.campaign-card.compact .detail-item i {
  width: 14px;
  height: 14px;
  color: #6366F1;
  opacity: 0.7;
}

.campaign-card.compact .detail-separator {
  color: #D1D5DB;
  font-size: 10px;
}

.campaign-card.compact .detail-item.muted {
  color: #9CA3AF;
}

.campaign-card.compact .campaign-card-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Hide old layout elements in compact mode */
.campaign-card.compact .campaign-card-header,
.campaign-card.compact .campaign-card-body,
.campaign-card.compact .campaign-card-footer {
  display: none !important;
}
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.campaign-card.compact .detail-item i {
  width: 14px;
  height: 14px;
  color: #6366F1;
  opacity: 0.7;
}

.campaign-card.compact .detail-separator {
  color: #D1D5DB;
}

.campaign-card.compact .detail-item.muted {
  color: #9CA3AF;
}

.campaign-card.compact .campaign-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Compact Issues Summary */
.campaign-issues-compact {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
}

.issue-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.issue-chip i {
  width: 12px;
  height: 12px;
}

.issue-chip.critical {
  background: #FEF2F2;
  color: #DC2626;
}

.issue-chip.warning {
  background: #FFFBEB;
  color: #D97706;
}

.campaign-card:hover {
  border-color: #6366F1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
  transform: translateY(-2px);
}

/* Remove left border - status shown via badge instead */
.campaign-card.has-issues,
.campaign-card.ready {
  border-left: 2px solid transparent;
}

.campaign-card.has-issues {
  border-left-color: #F59E0B;
}

.campaign-card.ready {
  border-left-color: #10B981;
}

/* Card Header */
.campaign-card-header {
  margin-bottom: 16px;
}

.campaign-card-title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.campaign-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.campaign-card-title i {
  width: 22px;
  height: 22px;
  color: #6366F1;
}

/* Campaign ID Badge */
.campaign-id-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.campaign-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6B7280;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item i {
  width: 14px;
  height: 14px;
}

.meta-separator {
  color: #D1D5DB;
}

/* Issue Badge */
.issue-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.issue-badge i {
  width: 14px;
  height: 14px;
}

.issue-badge.critical {
  background: #FEF2F2;
  color: #DC2626;
}

.issue-badge.warning {
  background: #FFFBEB;
  color: #D97706;
}

.issue-badge.ready {
  background: #ECFDF5;
  color: #059669;
}

/* Card Body */
.campaign-card-body {
  margin-bottom: 20px;
}

.campaign-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #F9FAFB;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  margin-bottom: 16px;
}

.campaign-scope i {
  width: 16px;
  height: 16px;
  color: #6366F1;
}

.campaign-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.campaign-status i {
  width: 18px;
  height: 18px;
}

.campaign-status.ready {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #D1FAE5;
}

.campaign-issues {
  padding: 12px;
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  border-radius: 8px;
}

.campaign-issues strong {
  color: #92400E;
  font-size: 13px;
  font-weight: 600;
}

.issue-list {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.issue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}

.issue-item i {
  width: 14px;
  height: 14px;
}

.issue-item.critical {
  color: #DC2626;
}

.issue-item.warning {
  color: #D97706;
}

/* Card Footer */
.campaign-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Button Base Styles */
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-sm i {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  background: white;
  color: #374151;
  border-color: #D1D5DB;
}

.btn-secondary:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}

.btn-ghost {
  background: transparent;
  color: #6B7280;
  border-color: transparent;
}

.btn-ghost:hover {
  background: #F3F4F6;
}

.action-buttons-primary {
  display: flex;
  gap: 8px;
}

/* Overflow Menu */
.action-overflow-menu {
  position: relative;
  display: inline-flex;
}

.overflow-trigger {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
}

.overflow-trigger i {
  width: 18px;
  height: 18px;
  color: #6B7280;
}

.overflow-trigger:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
}

.overflow-trigger:hover i {
  color: #374151;
}

.overflow-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
}

.overflow-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.overflow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.overflow-item:first-child {
  border-radius: 8px 8px 0 0;
}

.overflow-item:last-child {
  border-radius: 0 0 8px 8px;
}

.overflow-item:hover {
  background: #F3F4F6;
}

.overflow-item i {
  width: 16px;
  height: 16px;
  color: #6B7280;
}

.overflow-item-danger {
  color: #DC2626;
}

.overflow-item-danger i {
  color: #DC2626;
}

.overflow-item-danger:hover {
  background: #FEF2F2;
}

.overflow-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 4px 0;
}

.btn-warning {
  background: #F59E0B;
  color: white;
  border: none;
}

.btn-warning:hover {
  background: #D97706;
}

.btn-success {
  background: #10B981;
  color: white;
  border: none;
}

.btn-success:hover {
  background: #059669;
}

/* ==================== Empty State ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border: 2px dashed #E5E7EB;
  border-radius: 12px;
}

.empty-state i {
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  color: #6B7280;
  margin: 0 0 20px 0;
}

/* ==================== Regenerated Campaigns ==================== */

/* Subtle regenerated badge - blends with regular badges */
.issue-badge.regenerated-subtle {
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #D1D5DB;
  font-weight: 500;
  font-size: 0.75rem;
}

.issue-badge.regenerated-subtle i {
  width: 12px;
  height: 12px;
  color: #6B7280;
}

/* Badge group for multiple badges */
.badge-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .filter-group {
    flex-direction: column;
  }
  
  .filter-item {
    min-width: unset;
    width: 100%;
  }
  
  .search-box {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 768px) {
  .uar-campaign-list-container {
    padding: 16px;
  }
  
  .campaign-list-title {
    font-size: 24px;
  }
  
  .campaign-list-title-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .title-badge {
    margin-left: 0;
  }
  
  .campaign-card {
    padding: 16px;
  }
  
  .campaign-card-title {
    font-size: 18px;
  }
  
  .campaign-card-footer {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .action-buttons-primary {
    flex: 1;
    flex-wrap: wrap;
  }
  
  .action-buttons-primary .btn-sm {
    flex: 1;
    min-width: 100px;
    justify-content: center;
  }
}
