/* Custom Styles for Campaign Management Platform */

:root {
  --primary-blue: #2563EB;
  --primary-blue-light: #3B82F6;
  --primary-blue-dark: #1E40AF;
  --bg-blue-50: #EFF6FF;
  --bg-blue-100: #DBEAFE;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--gray-50);
}

/* Active Navigation Link */
.nav-link.active,
.nav-link.active:hover {
  background-color: #EFF6FF !important;
  color: #2563EB !important;
}

.nav-link:not(.active) {
  color: #374151;
}

.nav-link:not(.active):hover {
  background-color: #EFF6FF;
  color: #2563EB;
}

/* Channel Card Selected State */
.channel-card.selected {
  border-color: #2563EB;
  background-color: #EFF6FF;
}

/* Filter Button Active State */
.filter-btn.active {
  background-color: #E5E7EB;
  font-weight: 600;
}

/* Wizard Step Hidden */
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 16px;
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid #10B981;
}

.toast.error {
  border-left: 4px solid #EF4444;
}

.toast.info {
  border-left: 4px solid #3B82F6;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Drag and Drop Area */
.drag-drop-area {
  border: 2px dashed #D1D5DB;
  border-radius: 8px;
  padding: 48px;
  text-align: center;
  transition: all 0.3s;
}

.drag-drop-area.dragging {
  border-color: #3B82F6;
  background-color: #EFF6FF;
}

/* Table Row Hover */
table tbody tr:hover {
  background-color: #F9FAFB;
}

/* Badge Variants */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.badge-green {
  background-color: #D1FAE5;
  color: #065F46;
}

.badge-blue {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.badge-yellow {
  background-color: #FEF3C7;
  color: #92400E;
}

.badge-red {
  background-color: #FEE2E2;
  color: #991B1B;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-blue-dark);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: white;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
}

/* Card Styles */
.card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.card-body {
  padding: 1.5rem;
}

/* Chart Container */
.chart-container {
  position: relative;
  width: 100%;
  min-height: 300px;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* Table Improvements */
.table-container {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

table thead {
  background-color: var(--gray-50);
}

table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
}

table tbody tr {
  transition: background-color 0.15s;
  border-bottom: 1px solid var(--gray-100);
}

table tbody tr:last-child {
  border-bottom: none;
}

table tbody tr:hover {
  background-color: var(--bg-blue-50);
}

table tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-800);
}

/* Form Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  transition: all 0.2s;
  background-color: white;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

/* Icon search inputs - keep left padding */
input.pl-10 {
  padding-left: 2.5rem !important;
}

/* Template Cards */
.template-card {
  transition: all 0.2s;
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Channel Option Selection */
.channel-option input:checked + div {
  border-color: var(--primary-blue);
  background-color: var(--bg-blue-50);
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}
