/* These styles are generated from project.scss. */

/* ============================================================================
   CUSTOM COLOR PALETTE - List Armor Emerald Green (Calm, Professional)
   "We've got this" - Confident, trustworthy, approachable
   ============================================================================ */
:root {
  /* Primary - List Armor Emerald Green */
  --bs-primary: #059669;
  --bs-primary-rgb: 5, 150, 105;
  --bs-primary-bg-subtle: #d1fae5;
  --bs-primary-text-emphasis: #047857;
  --bs-primary-border-subtle: #6ee7b7;
  --bs-primary-light: #10b981;
  --bs-primary-dark: #047857;

  /* Success - Emerald Green (positive, growth) */
  --bs-success: #059669;
  --bs-success-rgb: 5, 150, 105;
  --bs-success-bg-subtle: #d1fae5;
  --bs-success-text-emphasis: #047857;
  --bs-success-border-subtle: #6ee7b7;

  /* Warning - Amber (attention, caution) */
  --bs-warning: #d97706;
  --bs-warning-rgb: 217, 119, 6;
  --bs-warning-bg-subtle: #fef3c7;
  --bs-warning-text-emphasis: #b45309;
  --bs-warning-border-subtle: #fcd34d;

  /* Info - Cyan/Teal (informational, neutral) */
  --bs-info: #0891b2;
  --bs-info-rgb: 8, 145, 178;
  --bs-info-bg-subtle: #cffafe;
  --bs-info-text-emphasis: #0e7490;
  --bs-info-border-subtle: #67e8f9;

  /* Danger - Red (errors, destructive) */
  --bs-danger: #dc2626;
  --bs-danger-rgb: 220, 38, 38;
  --bs-danger-bg-subtle: #fee2e2;
  --bs-danger-text-emphasis: #b91c1c;
  --bs-danger-border-subtle: #fca5a5;

  /* Secondary - Slate Gray (neutral, secondary actions) */
  --bs-secondary: #64748b;
  --bs-secondary-rgb: 100, 116, 139;
  --bs-secondary-bg-subtle: #f1f5f9;
  --bs-secondary-text-emphasis: #475569;
  --bs-secondary-border-subtle: #cbd5e1;

  /* Dark - Charcoal (text, headers) */
  --bs-dark: #1e293b;
  --bs-dark-rgb: 30, 41, 59;

  /* Light variants for subtle backgrounds */
  --bs-light: #f8fafc;
  --bs-light-rgb: 248, 250, 252;
}

/* Color-specific text classes */
.text-primary { color: var(--bs-primary) !important; }
.text-success { color: var(--bs-success) !important; }
.text-warning { color: var(--bs-warning) !important; }
.text-info { color: var(--bs-info) !important; }
.text-danger { color: var(--bs-danger) !important; }
.text-secondary { color: var(--bs-secondary) !important; }
.text-dark { color: var(--bs-dark) !important; }

/* Background color classes */
.bg-primary { background-color: var(--bs-primary) !important; }
.bg-success { background-color: var(--bs-success) !important; }
.bg-warning { background-color: var(--bs-warning) !important; }
.bg-info { background-color: var(--bs-info) !important; }
.bg-danger { background-color: var(--bs-danger) !important; }

/* Subtle background classes (for badges, etc.) */
.bg-primary-subtle { background-color: var(--bs-primary-bg-subtle) !important; color: var(--bs-primary-text-emphasis) !important; }
.bg-success-subtle { background-color: var(--bs-success-bg-subtle) !important; color: var(--bs-success-text-emphasis) !important; }
.bg-warning-subtle { background-color: var(--bs-warning-bg-subtle) !important; color: var(--bs-warning-text-emphasis) !important; }
.bg-info-subtle { background-color: var(--bs-info-bg-subtle) !important; color: var(--bs-info-text-emphasis) !important; }
.bg-danger-subtle { background-color: var(--bs-danger-bg-subtle) !important; color: var(--bs-danger-text-emphasis) !important; }
.bg-secondary-subtle { background-color: var(--bs-secondary-bg-subtle) !important; color: var(--bs-secondary-text-emphasis) !important; }

/* Border colors */
.border-primary { border-color: var(--bs-primary) !important; }
.border-success { border-color: var(--bs-success) !important; }
.border-warning { border-color: var(--bs-warning) !important; }
.border-info { border-color: var(--bs-info) !important; }
.border-danger { border-color: var(--bs-danger) !important; }

/* ============================================================================
   TYPOGRAPHY - Inter Font Family
   ============================================================================ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Wider content area for better use of screen space */
/* Using !important to override Material Pro's dynamic JS changes */
.body-wrapper .container-fluid {
  max-width: 1800px !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* Even wider for very large screens */
@media (min-width: 1920px) {
  .body-wrapper .container-fluid {
    max-width: 2000px !important;
  }
}

/* ============================================================================
   MODERN CARD STYLING
   ============================================================================ */
.card {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.06), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-weight: 600 !important;
}

/* ============================================================================
   MODERN SIDEBAR NAVIGATION
   ============================================================================ */
.sidebar-link {
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
  font-weight: 500 !important;
}

.sidebar-link:hover {
  background-color: rgba(5, 150, 105, 0.08) !important;
}

.nav-small-cap {
  text-transform: uppercase !important;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  color: #94a3b8 !important;
}

/* ============================================================================
   MODERN BUTTON STYLING
   ============================================================================ */
.btn {
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 8px !important;
  transition: all 0.15s ease;
}


/* Button group styling - rounded only on first and last buttons */
.btn-group .btn {
  border-radius: 0 !important;
}

.btn-group .btn:first-child {
  border-radius: 8px 0 0 8px !important;
}

.btn-group .btn:last-child {
  border-radius: 0 8px 8px 0 !important;
}

/* Primary button - List Armor Sage Green */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--bs-primary-dark);
  border-color: var(--bs-primary-dark);
  color: white;
  filter: brightness(0.95);
}

.btn-primary:active {
  background-color: #15803d;
  border-color: #15803d;
}

/* Light primary button variant */
.btn-light-primary {
  background-color: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
  color: var(--bs-primary-text-emphasis);
}

.btn-light-primary:hover,
.btn-light-primary:focus {
  background-color: #a7f3d0;
  border-color: #10b981;
  color: var(--bs-primary-dark);
}

/* Success button - Emerald Green */
.btn-success {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
  color: white;
}

.btn-success:hover,
.btn-success:focus {
  background-color: #047857;
  border-color: #047857;
  color: white;
}

/* Info button - Cyan/Teal */
.btn-info {
  background-color: var(--bs-info);
  border-color: var(--bs-info);
  color: white;
}

.btn-info:hover,
.btn-info:focus {
  background-color: #0e7490;
  border-color: #0e7490;
  color: white;
}

/* Warning button - Amber */
.btn-warning {
  background-color: var(--bs-warning);
  border-color: var(--bs-warning);
  color: white;
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #b45309;
  border-color: #b45309;
  color: white;
}

/* Danger button - Red */
.btn-danger {
  background-color: var(--bs-danger);
  border-color: var(--bs-danger);
  color: white;
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

/* Secondary button - Subtle light style */
.btn-secondary {
  background-color: rgba(100, 116, 139, 0.1);
  border-color: var(--bs-secondary);
  color: var(--bs-secondary);
  transition: all 0.15s ease;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: rgba(100, 116, 139, 0.18);
  border-color: var(--bs-secondary);
  color: var(--bs-secondary);
}

.btn-secondary:active {
  background-color: rgba(100, 116, 139, 0.25);
}

/* Light variant buttons for all colors */
.btn-light-success {
  background-color: var(--bs-success-bg-subtle);
  border-color: var(--bs-success-border-subtle);
  color: var(--bs-success-text-emphasis);
}

.btn-light-info {
  background-color: var(--bs-info-bg-subtle);
  border-color: var(--bs-info-border-subtle);
  color: var(--bs-info-text-emphasis);
}

.btn-light-warning {
  background-color: var(--bs-warning-bg-subtle);
  border-color: var(--bs-warning-border-subtle);
  color: var(--bs-warning-text-emphasis);
}

.btn-light-danger {
  background-color: var(--bs-danger-bg-subtle);
  border-color: var(--bs-danger-border-subtle);
  color: var(--bs-danger-text-emphasis);
}

/* Outline buttons - subtle hover */
.btn-outline-primary {
  --bs-btn-hover-color: var(--bs-primary);
  --bs-btn-hover-bg: rgba(5, 150, 105, 0.1);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-active-color: var(--bs-primary);
  --bs-btn-active-bg: rgba(5, 150, 105, 0.15);
  --bs-btn-active-border-color: var(--bs-primary);
}

.btn-outline-secondary {
  --bs-btn-hover-color: var(--bs-secondary);
  --bs-btn-hover-bg: rgba(100, 116, 139, 0.1);
  --bs-btn-hover-border-color: var(--bs-secondary);
  --bs-btn-active-color: var(--bs-secondary);
  --bs-btn-active-bg: rgba(100, 116, 139, 0.15);
  --bs-btn-active-border-color: var(--bs-secondary);
}

.btn-outline-success {
  --bs-btn-hover-color: var(--bs-success);
  --bs-btn-hover-bg: rgba(5, 150, 105, 0.1);
  --bs-btn-hover-border-color: var(--bs-success);
  --bs-btn-active-color: var(--bs-success);
  --bs-btn-active-bg: rgba(5, 150, 105, 0.15);
  --bs-btn-active-border-color: var(--bs-success);
}

.btn-outline-danger {
  --bs-btn-hover-color: var(--bs-danger);
  --bs-btn-hover-bg: rgba(220, 38, 38, 0.1);
  --bs-btn-hover-border-color: var(--bs-danger);
  --bs-btn-active-color: var(--bs-danger);
  --bs-btn-active-bg: rgba(220, 38, 38, 0.15);
  --bs-btn-active-border-color: var(--bs-danger);
}

.btn-outline-warning {
  --bs-btn-hover-color: var(--bs-warning);
  --bs-btn-hover-bg: rgba(217, 119, 6, 0.1);
  --bs-btn-hover-border-color: var(--bs-warning);
  --bs-btn-active-color: var(--bs-warning);
  --bs-btn-active-bg: rgba(217, 119, 6, 0.15);
  --bs-btn-active-border-color: var(--bs-warning);
}

.btn-outline-info {
  --bs-btn-hover-color: var(--bs-info);
  --bs-btn-hover-bg: rgba(6, 182, 212, 0.1);
  --bs-btn-hover-border-color: var(--bs-info);
  --bs-btn-active-color: var(--bs-info);
  --bs-btn-active-bg: rgba(6, 182, 212, 0.15);
  --bs-btn-active-border-color: var(--bs-info);
}

/* ============================================================================
   MODERN BADGE STYLING - Tinted backgrounds with 10% opacity
   ============================================================================ */
.badge {
  font-weight: 500 !important;
  padding: 0.4em 0.75em !important;
  border-radius: 6px !important;
}

.badge.bg-primary-subtle {
  background-color: rgba(5, 150, 105, 0.1) !important;
  color: #16a34a !important;
}

.badge.bg-success-subtle {
  background-color: rgba(5, 150, 105, 0.1) !important;
  color: #047857 !important;
}

.badge.bg-warning-subtle {
  background-color: rgba(217, 119, 6, 0.1) !important;
  color: #b45309 !important;
}

.badge.bg-danger-subtle {
  background-color: rgba(220, 38, 38, 0.1) !important;
  color: #b91c1c !important;
}

.badge.bg-info-subtle {
  background-color: rgba(8, 145, 178, 0.1) !important;
  color: #0e7490 !important;
}

.badge.bg-secondary-subtle {
  background-color: rgba(100, 116, 139, 0.1) !important;
  color: #475569 !important;
}

/* Solid badges - lighter tinted backgrounds instead of dark solid colors */
.badge.bg-primary {
  background-color: rgba(5, 150, 105, 0.15) !important;
  color: var(--bs-primary) !important;
  transition: all 0.15s ease;
}

.badge.bg-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #047857 !important;
  transition: all 0.15s ease;
}

.badge.bg-danger {
  background-color: rgba(220, 38, 38, 0.15) !important;
  color: #b91c1c !important;
  transition: all 0.15s ease;
}

.badge.bg-warning {
  background-color: rgba(217, 119, 6, 0.15) !important;
  color: #b45309 !important;
  transition: all 0.15s ease;
}

.badge.bg-info {
  background-color: rgba(6, 182, 212, 0.15) !important;
  color: #0e7490 !important;
  transition: all 0.15s ease;
}

.badge.bg-secondary {
  background-color: rgba(100, 116, 139, 0.15) !important;
  color: #475569 !important;
  transition: all 0.15s ease;
}

/* Badge hover - slightly increase opacity */
.badge.bg-primary:hover { background-color: rgba(5, 150, 105, 0.25) !important; }
.badge.bg-success:hover { background-color: rgba(16, 185, 129, 0.25) !important; }
.badge.bg-danger:hover { background-color: rgba(220, 38, 38, 0.25) !important; }
.badge.bg-warning:hover { background-color: rgba(217, 119, 6, 0.25) !important; }
.badge.bg-info:hover { background-color: rgba(6, 182, 212, 0.25) !important; }
.badge.bg-secondary:hover { background-color: rgba(100, 116, 139, 0.25) !important; }

.badge.bg-primary-subtle:hover { background-color: rgba(5, 150, 105, 0.18) !important; }
.badge.bg-success-subtle:hover { background-color: rgba(5, 150, 105, 0.18) !important; }
.badge.bg-danger-subtle:hover { background-color: rgba(220, 38, 38, 0.18) !important; }
.badge.bg-warning-subtle:hover { background-color: rgba(217, 119, 6, 0.18) !important; }
.badge.bg-info-subtle:hover { background-color: rgba(8, 145, 178, 0.18) !important; }
.badge.bg-secondary-subtle:hover { background-color: rgba(100, 116, 139, 0.18) !important; }

/* ============================================================================
   MODERN FORM STYLING
   ============================================================================ */
.form-control {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-select {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: #1e293b;
}

.form-check-input {
  width: 1.25rem !important;
  height: 1.25rem !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 4px !important;
}

.form-check-input:checked {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.form-check-input:focus {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* ============================================================================
   MODERN TABLE STYLING
   ============================================================================ */
.table > thead > tr > th {
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  color: var(--bs-secondary) !important;
  border-bottom: 2px solid #e2e8f0 !important;
  padding: 1rem 0.75rem !important;
  background-color: transparent !important;
}

.table > tbody > tr > td {
  padding: 1rem 0.75rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}

.table > tbody > tr:last-child > td {
  border-bottom: none !important;
}

.table-hover > tbody > tr:hover {
  background-color: rgba(5, 150, 105, 0.03) !important;
}

/* Round utility classes to match Material Pro */
.round-30 {
  width: 30px;
  height: 30px;
}

.round-40 {
  width: 40px;
  height: 40px;
}

.round-80 {
  width: 80px;
  height: 80px;
}

/* Table column width utilities */
.col-w-80 {
  width: 80px;
}

.col-max-w-200 {
  max-width: 200px;
}

/* Icon size utilities */
.icon-3rem {
  font-size: 3rem;
}

.icon-2rem {
  font-size: 2rem;
}

/* Preference center preview */
.preview-logo {
  max-height: 40px;
  max-width: 120px;
}

.preference-center-preview-iframe {
  width: 100%;
  height: 800px;
  border: none;
  pointer-events: none; /* Prevent interaction - it's just a preview */
}

.email-preview-iframe {
  width: 100%;
  height: 400px;
  border: none;
}

.filter-select-auto {
  width: auto;
}

/* ============================================================================
   MODERN ALERT STYLING - Tinted backgrounds
   ============================================================================ */
.alert {
  border: none !important;
  border-radius: 10px !important;
}

.alert-success {
  background-color: rgba(5, 150, 105, 0.1) !important;
  color: #047857 !important;
}

.alert-danger {
  background-color: rgba(220, 38, 38, 0.1) !important;
  color: #b91c1c !important;
}

.alert-warning {
  background-color: rgba(217, 119, 6, 0.1) !important;
  color: #b45309 !important;
}

.alert-info {
  background-color: rgba(8, 145, 178, 0.1) !important;
  color: #0e7490 !important;
}

.alert-primary {
  background-color: rgba(5, 150, 105, 0.1) !important;
  color: #16a34a !important;
}

/* Alpine.js x-cloak improvements */
[x-cloak] {
  display: none !important;
}

/* Cursor utilities */
.cursor-pointer {
  cursor: pointer;
}

/* Hover highlight for clickable rows */
.hover-highlight:hover {
  background-color: rgba(5, 150, 105, 0.05);
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

/* Let Alpine.js fully control modal visibility - remove CSS override */


/* Alpine.js Modal Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  /* Remove flexbox centering to allow proper scrolling */
  padding: 1rem 0;
}

/* Example modal backdrop for demo page */
.modal-backdrop-example {
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog-container {
  max-width: 800px;
  margin: 1.75rem auto 3rem auto;
  width: calc(100% - 2rem);
}

.modal-dialog-custom {
  max-width: 500px;
  margin: 1.5rem auto;
  position: relative;
  pointer-events: auto;
  /* Add horizontal padding here instead of backdrop */
  padding: 0 1rem;
}

.modal-dialog-custom.modal-md {
  max-width: 600px !important;
}

.modal-dialog-custom.modal-lg {
  max-width: 1000px !important;
  width: 100%;
}

.modal-dialog-custom.modal-xl {
  max-width: 1200px !important;
}

.modal-content-custom {
  background: white;
  border-radius: 16px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid #e2e8f0 !important;
}

.modal-header-custom {
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-custom {
  margin: 0;
  font-weight: 600 !important;
  flex: 1;
}

.modal-close-btn {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  opacity: 0.5;
  background: none;
  border: 0;
  padding: 0.25rem;
}

.modal-body-custom {
  padding: 1.5rem !important;
}

.modal-body-custom.modal-body-fixed-height {
  height: 400px !important;
  min-height: 400px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
}

/* Campaign modal scrollable list section */
.campaign-list-scroll-container {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Fixed height tab content for consistent modal size */
.tab-content-fixed-height {
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
}

.tab-content-fixed-height .tab-pane {
  min-height: 400px;
}

/* Email search form */
.email-search-form {
  max-width: 500px;
}

/* Portal affiliate card styles */
.text-truncate-container {
  min-width: 0;
}

.access-key-text {
  font-family: monospace;
  font-size: 0.85rem;
}

.spinner-hidden {
  display: none;
}

/* MFA Step Badge - Circular numbered badges for multi-step forms */
.step-badge {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MFA Secret Code - Monospace code display */
.mfa-secret-code {
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* ============================================================================
   MODERN TAB STYLING
   ============================================================================ */
.nav-tabs {
  border-bottom: 2px solid #e2e8f0;
}

.nav-tabs .nav-link {
  color: var(--bs-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: -2px;
  border-radius: 0 !important;
}

.nav-tabs .nav-link:hover {
  color: var(--bs-primary);
  border-color: transparent;
  background-color: rgba(5, 150, 105, 0.05);
}

.nav-tabs .nav-link.active {
  color: var(--bs-primary);
  background-color: transparent;
  border-color: transparent transparent var(--bs-primary);
  font-weight: 600;
}

.nav-tabs .nav-link.active:hover {
  background-color: rgba(5, 150, 105, 0.05);
}

/* Campaign Affiliate Table Styles */
.badge-xs {
  font-size: 0.75rem;
}

.text-truncate-container {
  min-width: 0;
}

/* ============================================================================
   MODERN HEADER STYLING
   ============================================================================ */
header.topbar {
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Make logo icon and text green */
header.topbar .logo-icon img,
header.topbar .logo-text img {
  filter: brightness(0) saturate(100%) invert(65%) sepia(52%) saturate(5765%) hue-rotate(103deg) brightness(96%) contrast(83%);
}

/* Make header icons visible on white background */
header.topbar .nav-link iconify-icon {
  color: #6c757d;
  font-size: 1.75rem !important;
}

/* Hide moon/sun mode toggle in top bar (keep in profile dropdown) */
header.topbar .nav-item.nav-icon-hover-bg {
  display: none;
}

/* Sidebar Navigation */
#sidebarnav > .sidebar-item:first-child {
  margin-top: 30px;
}

.sidebar-divider {
  height: 1px;
  margin: 15px 20px;
  background-color: rgba(0, 0, 0, 0.1);
  list-style: none;
}

/* Active sidebar link with green accent */
.sidebar-link.active {
  background-color: rgba(5, 150, 105, 0.1) !important;
  color: var(--bs-primary) !important;
}

.sidebar-link.active iconify-icon {
  color: var(--bs-primary) !important;
}

.sidebar-link.active .hide-menu {
  color: var(--bs-primary) !important;
}

/* ============================================================================
   EMAIL VIEWER COMPONENT STYLES
   Used by partials/email_viewer.html for journey detail, complaints, seed hits
   ============================================================================ */

/* Email HTML preview container */
.email-html-preview-container {
  max-height: 500px;
  overflow-y: auto;
}

.email-html-preview-iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* Email headers table */
.headers-table-container {
  max-height: 350px;
  overflow-y: auto;
}

.headers-table-container th:first-child {
  width: 180px;
}

/* Email body text (plain text tab) */
.email-body-text-pre {
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

/* ============================================================================
   HTMX LOADING INDICATOR - Top Progress Bar
   ============================================================================ */
body.htmx-request::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 30%;
  background: var(--bs-primary);
  z-index: 9999;
  animation: htmx-loading-bar 1s ease-in-out infinite;
}

@keyframes htmx-loading-bar {
  0% {
    width: 30%;
    left: 0;
  }
  50% {
    width: 60%;
    left: 20%;
  }
  100% {
    width: 30%;
    left: 70%;
  }
}

/* ============================================================================
   FINAL POLISH - Transitions, Accessibility, Reduced Motion
   ============================================================================ */

/* Global smooth transitions for interactive elements */
a:not(.btn),
.nav-link {
  transition: color 0.15s ease;
}

/* Accessibility: Enhanced focus styles */
:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover {
    transform: none;
  }

  body.htmx-request::before {
    animation: none;
    width: 100%;
  }
}
