/* ===============================
   Conjour - Custom Styles & Color Palette
   =============================== */
   
:root {
  /* Primary Brand Color - Coral Pink (#F3557C) */
  /* Usage: CTAs, buttons, links, and highlights that pop */
  --color-primary:              #F3557C;
  --color-primary-cta:          #F3557C;
  --color-primary-dark:         #d63a5f;
  --color-primary-cta-hover:    #d63a5f;
  --color-primary-light:        #fde8ed;
  --color-light-primary:        #fde8ed;
  
  /* Dark Grey (#393E41) */
  /* Usage: Text, headers, neutral elements that need contrast */
  --color-dark:                 #393E41;
  --color-dark-grey:            #393E41;
  
  /* Light Accent (#F6F7EB) */
  /* Usage: Subtle backgrounds, light sections, page backgrounds */
  --color-light-accent:         #F6F7EB;
  --color-light-bg:             #F6F7EB;
  
  /* Bright Yellow (#FDD283) */
  /* Usage: Secondary highlights, badges, accent elements */
  --color-secondary:            #FDD283;
  --color-secondary-light:      #fef3c7;
  --color-warning:              #FDD283;
  --color-warning-light:        #fef3c7;
  
  /* Washed Blue (#8DD1E4) */
  /* Usage: Informational elements, alternate highlights, cool accents */
  --color-info:                 #8DD1E4;
  --color-info-dark:            #6bb8cf;
  --color-info-light:           #e6f7fb;
  
  /* Success - Mapped to Washed Blue for brand consistency */
  --color-success:              #8DD1E4;
  --color-success-dark:         #6bb8cf;
  --color-success-light:        #e6f7fb;
  
  /* Links */
  --color-link:                 #F3557C;
  --color-link-hover:           #d63a5f;
}

/* ===============================
   Bootstrap Color Overrides
   =============================== */

/* Text Colors */
.text-primary {
  color: var(--color-primary) !important;
}

.text-success {
  color: var(--color-success) !important;
}

.text-info {
  color: var(--color-info) !important;
}

.text-warning {
  color: var(--color-warning) !important;
}

.text-dark {
  color: var(--color-dark) !important;
}

.text-danger {
  color: var(--color-primary) !important;
}

/* Background Colors */
.bg-primary {
  background-color: var(--color-primary) !important;
}

.bg-success {
  background-color: var(--color-success) !important;
}

.bg-info {
  background-color: var(--color-info) !important;
}

.bg-warning {
  background-color: var(--color-warning) !important;
}

.bg-light {
  background-color: var(--color-light-accent) !important;
}

.bg-dark {
  background-color: var(--color-dark) !important;
}

.bg-danger {
  background-color: var(--color-primary) !important;
}

/* Border Colors */
.border-primary {
  border-color: var(--color-primary) !important;
}

.border-success {
  border-color: var(--color-success) !important;
}

.border-info {
  border-color: var(--color-info) !important;
}

.border-dark {
  border-color: var(--color-dark) !important;
}

.border-danger {
  border-color: var(--color-primary) !important;
}

/* Button Color Variants */
.btn-success {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.btn-success:hover,
.btn-success:focus {
  background-color: var(--color-success-dark);
  border-color: var(--color-success-dark);
  color: #fff;
}

.btn-info {
  background-color: var(--color-info);
  border-color: var(--color-info);
  color: #fff;
}

.btn-info:hover,
.btn-info:focus {
  background-color: var(--color-info-dark);
  border-color: var(--color-info-dark);
  color: #fff;
}

.btn-secondary {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-dark);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #fcc870;
  border-color: #fcc870;
  color: var(--color-dark);
}

.btn-warning {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
  color: var(--color-dark);
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #fcc870;
  border-color: #fcc870;
  color: var(--color-dark);
}

/* Button Danger Variant */
.btn-danger {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}

/* Outline Button Variants */
.btn-outline-info {
  color: var(--color-info);
  border-color: var(--color-info);
}

.btn-outline-info:hover,
.btn-outline-info:focus {
  background-color: var(--color-info-light);
  border-color: var(--color-info);
  color: var(--color-info-dark);
}

.btn-outline-success {
  color: var(--color-success);
  border-color: var(--color-success);
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background-color: var(--color-success-light);
  border-color: var(--color-success);
  color: var(--color-success-dark);
}

.btn-outline-danger {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* Badge Variants */
.badge.bg-primary {
  background-color: var(--color-primary) !important;
  color: #fff !important;
}

.badge.bg-success {
  background-color: var(--color-success) !important;
  color: #fff !important;
}

.badge.bg-info {
  background-color: var(--color-info) !important;
  color: #fff !important;
}

.badge.bg-warning {
  background-color: var(--color-warning) !important;
  color: var(--color-dark) !important;
}

.badge.bg-secondary {
  background-color: var(--color-secondary) !important;
  color: var(--color-dark) !important;
}

.badge.bg-dark {
  background-color: var(--color-dark) !important;
  color: #fff !important;
}

.badge.bg-danger {
  background-color: var(--color-primary) !important;
  color: #fff !important;
}

/* ============================================
   CONJOUR PROGRESS BAR - Reusable Component
   ============================================ */

/* Progress container with Conjour branding */
.conjour-progress-container {
  background: linear-gradient(135deg, #fef2f7 0%, #fce7f0 100%);
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(243, 85, 124, 0.1);
}

/* Progress status text */
.conjour-progress-status {
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Progress message (sub-text) */
.conjour-progress-message {
  color: var(--color-dark);
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-style: italic;
}

/* Progress bar track */
.conjour-progress-bar-track {
  background-color: #fff;
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  height: 28px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Progress bar fill */
.conjour-progress-bar-fill {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-primary) 100%);
  background-size: 200% 100%;
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  transition: width 0.3s ease;
  animation: conjour-progress-shine 2s linear infinite;
  box-shadow: 0 2px 4px rgba(243, 85, 124, 0.3);
}

/* Animated shine effect */
@keyframes conjour-progress-shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Spinner for progress indicator */
.conjour-progress-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(243, 85, 124, 0.3);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: conjour-spinner-spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

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







/* BUTTONS */
.btn-primary {
  background-color: var(--color-primary-cta);
  border-color:     var(--color-primary-cta);
  color:            #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-cta-hover);
  border-color:     var(--color-primary-cta-hover);
  color:            #fff;
}

a.action-icon:hover,
a.action-icon:focus,
.action-icon:hover,
.action-icon:focus {
  color: var(--color-primary-cta-hover);
}

.btn-outline-primary {
  color: var(--color-primary-cta);
  border-color: var(--color-primary-cta);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: var(--color-primary-cta);
  border-color: var(--color-primary-cta);
  background-color: var(--color-light-primary)
}

/* NAV PILLS - Bootstrap Override for Active State */
:root {
  --bs-nav-pills-link-active-bg: var(--color-primary);
  --bs-nav-pills-link-active-color: #fff;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #fff;
  background-color: var(--color-primary);
}

/* LINKS & ICONS */
a {
  color: var(--color-link);
}

/* Auth links - use muted pink to match site styling */
a.auth-link {
  color: var(--color-primary-cta);
}

a.auth-link:hover,
a.auth-link:focus {
  color: var(--color-primary-cta-hover);
  text-decoration: none;
}
.text-secondary {
  color: var(--color-secondary) !important;
}

action-btn {
  background-color: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
}

a.action-icon,
.action-icon {
  border:           none;
  color:            var(--color-primary-cta);
}

/* Admin Sidebar Styles */
.admin-sidebar {
  background-color: #fff;
  border-right: 1px solid #e9ecef;
  width: 260px;
  min-width: 260px; /* Prevent flex shrinking */
  max-width: 260px; /* Prevent flex growing */
  flex-shrink: 0; /* Prevent flex container from shrinking sidebar */
  min-height: 100vh;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 76px; /* Account for navbar height */
  left: 0;
  height: calc(100vh - 76px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
}

/* Main content area with fixed sidebar - VERY specific to avoid affecting other pages */
/* Only apply margin on desktop when sidebar is visible */
@media (min-width: 992px) {
  .d-flex:has(> .admin-sidebar) > .flex-grow-1 {
    margin-left: 260px;
  }
}

.admin-nav {
  gap: 0.25rem;
}

.admin-nav .nav-item {
  margin-bottom: 0.25rem;
}

.admin-nav-link {
  color: #6c757d;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.admin-nav-link:hover,
.admin-nav-link:focus {
  color: var(--color-primary-cta);
  background-color: var(--color-light-primary);
  text-decoration: none;
}

.admin-nav-link.active {
  color: var(--color-primary-cta);
  background-color: var(--color-light-primary);
  font-weight: 600;
  position: relative;
}

.admin-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background-color: var(--color-primary-cta);
  border-radius: 0 2px 2px 0;
}

.admin-nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Mobile: Navigation is in top navbar collapse, no sidebar or toggle needed */
@media (max-width: 991.98px) {
  /* Ensure main content takes full width on mobile (no sidebar) */
  .d-flex > .flex-grow-1 {
    width: 100%;
    margin-left: 0 !important;
  }
  
  /* Style admin nav links in mobile navbar */
  .navbar-collapse .admin-nav-link {
    padding: 0.75rem 1rem;
    margin: 0;
  }
  
  .navbar-collapse .admin-nav-link.active::before {
    /* Remove the left border indicator on mobile */
    display: none;
  }
  
  .navbar-collapse .admin-nav {
    gap: 0;
  }
  
  .navbar-collapse .admin-nav .nav-item {
    margin-bottom: 0;
  }
  
  /* Mobile navbar padding adjustments */
  .navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* -------- BASIC STYLES -------- */

/* Basic Typography */
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Table hover effect */
.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

/* Clean up button spacing */
.table td .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

/* Compact form spacing */
form .form-control, form .form-select, .form-btn-sm {
  margin-bottom: 0.75rem;
}

/* Icon action container inside table row */
.table .position-absolute {
  display: flex;
  gap: 0.5rem;
}

/* Optional: consistent icon size */
.bi {
  font-size: 1rem;
  vertical-align: middle;
}

h3 a i {
  font-size: 0.85rem;
  vertical-align: baseline;
}

/* Quill Editor Styles */
.quill-editor {
  width: 100%;
}

.quill-editor .ql-container {
  border: none !important;
  font-size: 1rem;
  background: transparent !important;
}

.quill-editor .ql-editor {
  min-height: 150px;
  padding: 1rem;
  border: none !important;
}

.quill-toolbar {
  border: none !important;
  background: transparent !important;
  padding: 0.5rem 0;
  display: block !important;
  visibility: visible !important;
  min-height: 42px !important;
  width: 100% !important;
}

/* Target Quill's internal toolbar structure */
.quill-toolbar .ql-toolbar,
.quill-toolbar .ql-toolbar.ql-snow {
  border: none !important;
  background: #f8f9fa !important; /* Match Bootstrap bg-light */
  padding: 0.5rem 0 !important;
}

.quill-toolbar .ql-formats {
  margin-right: 0.5rem;
}

/* Remove all Quill borders globally */
.ql-container,
.ql-container.ql-snow {
  border: none !important;
  background: transparent !important;
}

.ql-toolbar,
.ql-toolbar.ql-snow {
  border: none !important;
}

/* Remove borders from Quill editor wrapper */
.quill-editor.ql-container.ql-snow {
  border: none !important;
}

/* Target Quill buttons and icons to ensure they work on grey background */
.quill-toolbar .ql-toolbar button,
.quill-toolbar .ql-toolbar .ql-picker-label {
  color: #495057 !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-block !important;
}

/* Ensure all SVG elements inside buttons are visible */
.quill-toolbar .ql-toolbar button svg,
.quill-toolbar .ql-toolbar .ql-picker-label svg,
.quill-toolbar .ql-toolbar svg {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 18px !important;
  height: 18px !important;
}

/* Ensure all paths, lines, and shapes in SVG are visible */
/* Stroke-only elements should have no fill */
.quill-toolbar .ql-toolbar .ql-stroke,
.quill-toolbar .ql-toolbar svg path.ql-stroke,
.quill-toolbar .ql-toolbar svg line,
.quill-toolbar .ql-toolbar svg polyline,
.quill-toolbar .ql-toolbar svg polygon {
  stroke: #495057 !important;
  fill: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fill elements should be filled */
.quill-toolbar .ql-toolbar .ql-fill,
.quill-toolbar .ql-toolbar svg path.ql-fill {
  stroke: none !important;
  fill: #495057 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure all Quill toolbar buttons and icons are visible */
.bg-light .ql-toolbar button,
.bg-light .ql-toolbar .ql-picker-label,
.bg-light .ql-toolbar button svg,
.bg-light .ql-toolbar .ql-picker-label svg {
  color: #495057 !important;
}

/* Stroke elements in bg-light should have no fill */
.bg-light .ql-toolbar .ql-stroke,
.bg-light .ql-toolbar svg path.ql-stroke {
  stroke: #495057 !important;
  fill: none !important;
}

/* Fill elements in bg-light should be filled */
.bg-light .ql-toolbar .ql-fill,
.bg-light .ql-toolbar svg path.ql-fill {
  fill: #495057 !important;
  stroke: none !important;
}

/* Make sure toolbar icons are visible */
.quill-toolbar .ql-toolbar .ql-formats button,
.quill-toolbar .ql-toolbar .ql-formats .ql-picker {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure all Quill toolbar SVG icons are visible - more specific */
/* Stroke elements should be outlines only */
.quill-toolbar .ql-toolbar .ql-stroke,
.quill-toolbar .ql-toolbar .ql-stroke.ql-thin,
.bg-light .ql-toolbar .ql-stroke,
.bg-light .ql-toolbar .ql-stroke.ql-thin,
.bg-light .ql-toolbar svg path.ql-stroke,
.bg-light .ql-toolbar svg line,
.bg-light .ql-toolbar svg polyline,
.bg-light .ql-toolbar svg polygon {
  stroke: #495057 !important;
  fill: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fill elements should be filled */
.quill-toolbar .ql-toolbar .ql-fill,
.bg-light .ql-toolbar .ql-fill,
.bg-light .ql-toolbar svg path.ql-fill {
  fill: #495057 !important;
  stroke: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Make sure button content is visible */
.quill-toolbar .ql-toolbar button::before,
.quill-toolbar .ql-toolbar button::after {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure toolbar buttons are visible and clickable */
.quill-toolbar .ql-toolbar button,
.bg-light .ql-toolbar button {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #495057 !important;
}

.quill-toolbar .ql-toolbar button:hover,
.bg-light .ql-toolbar button:hover {
  color: #212529 !important;
}

/* Aggressively remove all Quill borders - catch all cases */
.bg-light .ql-toolbar,
.bg-light .ql-toolbar.ql-snow,
.bg-light .ql-container,
.bg-light .ql-container.ql-snow {
  border: none !important;
  background: #f8f9fa !important;
}

.bg-white .ql-container,
.bg-white .ql-container.ql-snow {
  border: none !important;
}

/* Remove borders from Quill editor when inside our structure */
.quill-editor.ql-container,
.quill-editor.ql-container.ql-snow {
  border: none !important;
}

/* Ensure toolbar matches grey background and is visible */
#toolbar-* .ql-toolbar,
[id^="toolbar-"] .ql-toolbar,
.quill-toolbar .ql-toolbar {
  background: #f8f9fa !important;
  border: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 42px !important;
  padding: 8px !important;
}

/* Ensure toolbar container is visible */
.quill-toolbar {
  display: block !important;
  visibility: visible !important;
  min-height: 42px !important;
}

/* Make sure all toolbar buttons are visible */
[id^="toolbar-"] .ql-toolbar button,
.quill-toolbar .ql-toolbar button {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #495057 !important;
  width: auto !important;
  height: auto !important;
}

/* Messaging Block Container Border */
.messaging-block-container {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  overflow: hidden;
}

.messaging-block-top {
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.messaging-block-bottom {
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}

/* Disabled Save Button Styling */
button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button[type="submit"].btn-secondary:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

/* Persona Header Image - connects to left edge like inline form field */
.persona-image-wrapper {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

.persona-header-image {
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  object-fit: cover;
  border-radius: 0 4px 4px 0;
  display: block;
  flex-shrink: 0;
}

/* Persona Image Grid - 3 images per row, centered, filling space */
.persona-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-items: center;
  width: 100%;
}

.persona-image-item {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.persona-image-item:hover {
  transform: translateY(-2px);
}

.persona-image-item img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Modal improvements */
.modal-header.border-bottom {
  border-bottom: 1px solid #dee2e6 !important;
  padding: 1.25rem 1.5rem;
}

.modal-footer.border-top {
  border-top: 1px solid #dee2e6 !important;
  padding: 1rem 1.5rem;
}

.modal-footer.bg-light {
  background-color: #f8f9fa !important;
}

.modal-body.py-4 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.form-label.fw-semibold {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.form-text.text-muted {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Persona Selection Grid for Topic Management */
.persona-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.persona-selection-item {
  display: block;
}

.persona-selection-card {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 140px;
}

.persona-selection-card:hover {
  border-color: var(--color-primary-cta);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.persona-selection-card.selected {
  border-color: var(--color-primary-cta);
  background-color: var(--color-light-primary);
  box-shadow: 0 0 0 3px rgba(179, 15, 75, 0.1);
}

.persona-selection-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  display: block;
}

.persona-selection-card.selected .persona-selection-image {
  border-color: var(--color-primary-cta);
}

.persona-selection-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 1.5rem;
}

.persona-selection-card.selected .persona-selection-placeholder {
  border-color: var(--color-primary-cta);
  background-color: var(--color-light-primary);
}

.persona-selection-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  text-align: center;
  word-break: break-word;
}

.persona-selection-card.selected .persona-selection-name {
  color: var(--color-primary-cta);
  font-weight: 600;
}

/* Ensure modals display properly even when nested */
.modal {
  z-index: 1055 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
}

/* Fix for modals nested in card structures */
.card-body .modal,
section .modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

/* ===============================
   PUBLIC GUIDE STYLES
   PowerPoint-Inspired Design
   =============================== */

/* Body & Container */
.public-guide-body {
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

.public-guide-container {
  display: flex;
  min-height: 100vh;
  max-width: 100%;
}

/* Left Navigation Sidebar */
.public-nav-sidebar {
  width: 280px;
  min-width: 280px;
  background-color: var(--color-light-accent);
  border-right: 2px solid #d5d6c8;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
}

.public-nav-header {
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 2px solid #d5d6c8;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.public-nav-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}

.public-nav-content {
  padding: 1.5rem 0;
}

.public-nav-section {
  margin-bottom: 2rem;
}

.public-nav-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 1px;
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
}

/* Chapter Navigation */
.public-nav-chapter {
  margin-bottom: 0.5rem;
}

.public-nav-chapter-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.public-nav-chapter-link:hover {
  background-color: var(--color-light-primary);
  color: var(--color-primary-cta);
}

.public-nav-chapter-link.active {
  background-color: var(--color-light-primary);
  color: var(--color-primary-cta);
  border-left: 3px solid var(--color-primary-cta);
}

.chapter-chevron {
  margin-right: 0.5rem;
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

/* Topic Navigation */
.public-nav-topics {
  display: none;
  padding-left: 1rem;
}

.public-nav-topic-link {
  display: block;
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.public-nav-topic-link:hover {
  color: var(--color-primary-cta);
  background-color: #ffffff;
}

.public-nav-topic-link.active {
  color: var(--color-primary-cta);
  font-weight: 600;
  border-left-color: var(--color-primary-cta);
  background-color: var(--color-light-primary);
}

/* Persona Navigation */
.public-nav-persona-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 1.5rem;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  gap: 0.75rem;
}

.public-nav-persona-link:hover {
  background-color: var(--color-light-primary);
  color: var(--color-primary-cta);
}

.public-nav-persona-link.active {
  background-color: var(--color-light-primary);
  color: var(--color-primary-cta);
  font-weight: 600;
  border-left: 3px solid var(--color-primary-cta);
}

.public-nav-persona-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}

.public-nav-persona-link i {
  font-size: 1.5rem;
  color: #999;
}

/* Main Content Area */
.public-content-area {
  flex: 1;
  max-width: 100%;
  padding: 3rem 4rem;
  background-color: #ffffff;
  overflow-y: auto;
}

/* Welcome Section */
.public-welcome-section {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--color-primary);
}

.public-main-title {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.public-main-subtitle {
  font-size: 1.25rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Chapter Section */
.public-chapter-section {
  margin-bottom: 5rem;
  scroll-margin-top: 2rem;
}

.public-chapter-header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.public-chapter-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary-cta);
  margin: 0;
  letter-spacing: -0.3px;
}

/* Topic Article */
.public-topic-article {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.public-topic-header {
  margin-bottom: 2rem;
}

.public-topic-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 0.75rem;
}

.public-topic-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Target Personas for Topic */
.public-target-personas {
  background-color: #f9f9f9;
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 4px;
}

.public-personas-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.public-personas-label i {
  color: var(--color-primary-cta);
  font-size: 1.1rem;
}

.public-personas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Persona Cards (inline in topics) */
.public-persona-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  background-color: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 90px;
  cursor: pointer;
}

.public-persona-card:hover {
  border-color: var(--color-primary-cta);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.public-persona-card-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 2px solid #e0e0e0;
}

.public-persona-card-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: #999;
  font-size: 1.5rem;
}

.public-persona-card-name {
  font-size: 0.813rem;
  font-weight: 500;
  color: #333;
  text-align: center;
  line-height: 1.3;
}

.public-persona-card:hover .public-persona-card-name {
  color: var(--color-primary-cta);
}

/* Messaging Block */
.public-messaging-block {
  background-color: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.2s ease;
}

.public-messaging-block:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.public-block-header {
  margin-bottom: 1.5rem;
}

.public-block-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.public-block-description {
  font-size: 0.938rem;
  color: #777;
  font-style: italic;
  margin: 0;
}

.public-block-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
}

.public-block-content p {
  margin-bottom: 1rem;
}

.public-block-content p:last-child {
  margin-bottom: 0;
}

.public-block-content ul,
.public-block-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.public-block-content strong {
  color: #222;
  font-weight: 600;
}

/* Related Content */
.public-related-content {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.public-related-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1rem;
}

.public-related-title i {
  color: var(--color-primary-cta);
}

.public-content-table-wrapper {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.public-content-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-size: 0.875rem;
}

.public-content-table thead {
  background-color: #f5f5f5;
}

.public-content-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.public-content-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}

.public-content-table tbody tr:last-child td {
  border-bottom: none;
}

.public-content-table tbody tr:hover {
  background-color: #fafafa;
}

.content-title-cell {
  font-weight: 500;
  color: #333;
}

.content-title-link {
  color: var(--color-primary-cta);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.content-title-link:hover {
  color: var(--color-primary-cta-hover);
  text-decoration: underline;
}

.content-title-link i {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.content-title-link:hover i {
  opacity: 1;
}

.content-type-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background-color: #e8f4f8;
  color: #0066a1;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.stage-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background-color: var(--color-light-primary);
  color: var(--color-primary-cta);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Personas Section */
.public-personas-section {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.public-section-header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.public-section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary-cta);
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.public-section-subtitle {
  font-size: 1.125rem;
  color: #666;
  margin: 0;
}

/* Persona Article */
.public-persona-article {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.public-persona-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.public-persona-header-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.public-persona-header-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 2.5rem;
  border: 3px solid #e0e0e0;
}

.public-persona-name {
  font-size: 2rem;
  font-weight: 600;
  color: #2c2c2c;
  margin: 0;
}

/* Right Chat Sidebar - HIDDEN (using floating widget instead) */
.public-chat-sidebar {
  display: none; /* Hidden - chat now uses floating widget */
  width: 320px;
  min-width: 320px;
  background-color: #fafafa;
  border-left: 1px solid #e0e0e0;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.public-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem 1.5rem;
}

.public-chat-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.public-chat-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.public-chat-title i {
  color: var(--color-primary-cta);
  font-size: 1.25rem;
}

.public-chat-subtitle {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

.public-chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

.public-chat-welcome {
  text-align: center;
  padding: 2rem 1rem;
  color: #777;
}

.public-chat-welcome i {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
}

.public-chat-welcome p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.public-chat-input-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.public-chat-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.public-chat-input:focus {
  outline: none;
  border-color: var(--color-primary-cta);
  box-shadow: 0 0 0 3px rgba(179, 15, 75, 0.1);
}

.public-chat-send-btn {
  width: 100%;
  padding: 0.875rem;
  background-color: var(--color-primary-cta);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.938rem;
  cursor: not-allowed;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.6;
}

.public-chat-send-btn:not(:disabled):hover {
  background-color: var(--color-primary-cta-hover);
  cursor: pointer;
  opacity: 1;
}

.public-chat-hint {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  font-style: italic;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .public-content-area {
    max-width: 100%;
  }
  
  .public-chat-sidebar {
    display: none; /* Hidden on all screen sizes */
  }
}

@media (max-width: 1200px) {
  .public-nav-sidebar {
    width: 240px;
    min-width: 240px;
  }
  
  .public-content-area {
    padding: 2rem 3rem;
  }
  
  .public-chat-sidebar {
    display: none; /* Hidden on all screen sizes */
  }
}

@media (max-width: 992px) {
  .public-guide-container {
    flex-direction: column;
  }
  
  .public-nav-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    position: relative;
    height: auto;
  }
  
  .public-chat-sidebar {
    display: none; /* Hidden on all screen sizes */
  }
  
  .public-content-area {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }
}


/* ===============================
   FLOATING CHAT WIDGET STYLES
   =============================== */

.floating-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  isolation: isolate; /* Create stacking context to prevent scroll interference */
}

.floating-chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(243, 85, 124, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.floating-chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(243, 85, 124, 0.5);
}

.floating-chat-button .chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--color-secondary);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.floating-chat-container {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 480px;
  height: 700px;
  max-height: calc(100vh - 80px); /* Ensure it fits on screen */
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Keep this to clip rounded corners */
  animation: slideIn 0.3s ease;
  overscroll-behavior: contain; /* Prevent scroll from propagating to page behind */
}

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

.floating-chat-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent shrinking */
}

.floating-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}

.floating-chat-title i {
  font-size: 20px;
}

.floating-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-chat-expand,
.floating-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 4px;
}

.floating-chat-expand:hover,
.floating-chat-close:hover {
  opacity: 1;
}

/* Mode Selection */
.floating-chat-mode-selection {
  padding: 24px 20px;
  flex-shrink: 0; /* Prevent shrinking */
}

.mode-selection-text {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 16px;
  font-weight: 500;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-button {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-button:hover {
  border-color: var(--color-primary);
  background: #fef2f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 85, 124, 0.1);
}

.mode-button i {
  font-size: 24px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.mode-button span {
  font-weight: 600;
  font-size: 15px;
  color: #1f2937;
  display: block;
}

.mode-button small {
  font-size: 13px;
  color: #6b7280;
}

/* Q&A Mode */
.floating-chat-qa-mode {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  flex: 1; /* Take up remaining space */
  overflow: hidden; /* Prevent overall scroll, only messages should scroll */
}

.floating-chat-messages {
  flex: 1 1 0; /* Grow to fill space, but start from 0 */
  min-height: 0;
  overflow-y: auto !important; /* Force scrolling */
  overflow-x: hidden;
  padding: 20px;
  background: #f9fafb;
  scroll-behavior: smooth;
  overscroll-behavior: contain; /* Prevent scroll from propagating to page behind */
  touch-action: pan-y; /* Allow vertical scrolling on touch devices */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.chat-welcome-message {
  background: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.chat-welcome-message i {
  font-size: 32px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.chat-welcome-message p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.public-chat-message {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.public-chat-user {
  text-align: right;
}

.public-chat-user .public-chat-message-content {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  max-width: 85%;
  text-align: left;
  word-wrap: break-word;
  font-size: 14px;
}

.public-chat-assistant .public-chat-message-content {
  display: inline-block;
  background-color: white;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  max-width: 85%;
  text-align: left;
  word-wrap: break-word;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.floating-chat-input-area {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0; /* Prevent shrinking */
  margin-top: auto; /* Push to bottom if there's extra space */
}

.floating-chat-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  transition: border-color 0.2s;
}

.floating-chat-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.floating-chat-send-btn {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.floating-chat-send-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.floating-chat-send-btn:not(:disabled):hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

.floating-chat-back-btn {
  margin: 0 16px 16px 16px; /* Remove top margin, keep sides and bottom */
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 16px;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  flex-shrink: 0; /* Prevent shrinking */
}

.floating-chat-back-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.chat-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
}

.chat-loading .spinner-border {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* Chat Message Enhancements */
.public-chat-message-content .chat-link {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.public-chat-message-content .chat-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.chat-list-item {
  margin: 4px 0;
  line-height: 1.5;
}

.chat-code-block {
  margin: 12px 0;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.chat-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #e9ecef;
  border-bottom: 1px solid #dee2e6;
}

.chat-code-lang {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-code-copy {
  background: white;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.chat-code-copy:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.chat-code-copy.copied {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

.chat-code-content {
  margin: 0;
  padding: 12px;
  background: #f8f9fa;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #212529;
}

.chat-code-content code {
  font-family: inherit;
  background: none;
  padding: 0;
  color: inherit;
}

/* Expanded/Fullscreen Mode */
.floating-chat-widget.expanded .floating-chat-container {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 1200px;
  height: 85vh;
  max-height: 85vh;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Backdrop when expanded */
.floating-chat-widget.expanded::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  animation: fadeIn 0.2s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-chat-container {
    width: calc(100vw - 32px);
    max-height: 80vh;
    bottom: 0;
    right: 16px;
  }
  
  .floating-chat-widget {
    right: 16px;
    bottom: 16px;
  }
  
  .floating-chat-button {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  
  /* Expanded mode on mobile - take full screen */
  .floating-chat-widget.expanded .floating-chat-container {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Asset Generation Modal - Look-alike and Content Rows */
.lookalike-row {
  cursor: pointer;
}

.lookalike-row:hover {
  background-color: #f8f9fa !important;
}

.lookalike-row td {
  vertical-align: middle;
}

.lookalike-row label {
  cursor: pointer;
  width: 100%;
  margin: 0;
}

.content-item-row {
  cursor: pointer;
}

.content-item-row:hover {
  background-color: #f8f9fa !important;
}

/* ===============================
   ACCOUNT ADMIN & TOP NAV STYLES
   =============================== */

/* Navbar z-index - ensure it's above sidebar */
.navbar.sticky-top {
  z-index: 1050;
}

/* Navbar dropdown styling */
.navbar .dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #dee2e6;
  padding: 0.5rem 0;
}

.navbar .dropdown-item {
  padding: 0.625rem 1.25rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
  background-color: var(--color-light-primary);
  color: var(--color-primary-cta);
}

.navbar .dropdown-item i {
  width: 20px;
  text-align: center;
}

/* Custom Solutions Dropdown Menu */
.dropdown-menu-solutions {
  border-radius: 12px;
  margin-top: 0.5rem;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item-solutions {
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.dropdown-item-solutions:hover {
  background-color: #f8f9fa;
  border-color: var(--color-primary);
  transform: translateX(4px);
}

.dropdown-item-solutions:active {
  background-color: var(--color-light-primary);
}

.dropdown-item-solutions i {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-item-solutions:hover i {
  transform: scale(1.1);
}

/* Remove dropdown arrow from Solutions link */
.nav-link[data-bs-toggle="dropdown"]::after {
  display: none !important;
}

/* Custom Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--color-primary-cta);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Info icon tooltip styling */
.info-icon-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #6c757d;
  color: white;
  font-size: 0.75rem;
  cursor: help;
  margin-left: 0.5rem;
}

.info-icon-tooltip:hover {
  background-color: #5a6268;
}

/* Account admin section styles */
.admin-section-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.admin-section-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1.25rem 1.5rem;
}

.admin-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.admin-section-description {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0.5rem 0 0 0;
}

.admin-section-body {
  padding: 1.5rem;
}

.placeholder-content {
  text-align: center;
  padding: 3rem 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.placeholder-content i {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.placeholder-content h4 {
  color: #6c757d;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.placeholder-content p {
  color: #adb5bd;
  font-size: 0.95rem;
  margin: 0;
}

/* Market Expertise - Tab Styling */
.nav-tabs .nav-link {
  color: var(--color-primary);
  border: 1px solid transparent;
}

.nav-tabs .nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
  color: var(--color-primary-cta-hover);
}

.nav-tabs .nav-link.active {
  color: #495057;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

/* ===============================
   HELP GUIDE STYLES
   =============================== */

/* Main wrapper with floating nav */
.help-guide-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  margin-left: -1.5rem; /* Remove default dashboard content padding */
  margin-right: -1.5rem;
  margin-top: -1.5rem;
  margin-bottom: -1.5rem;
}

/* Floating Navigation */
.help-floating-nav {
  position: sticky;
  top: 72px; /* Height of navbar + padding */
  width: 260px;
  min-width: 260px;
  height: calc(100vh - 72px);
  background: white;
  border-right: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 5; /* Below navbar (which is typically 1000+) */
}

.help-nav-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 2px solid var(--color-primary);
  background: linear-gradient(135deg, var(--color-light-accent) 0%, #fff 100%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
}

.help-nav-header i {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.help-nav-list {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  flex: 1;
}

.help-nav-list li {
  margin-bottom: 0.25rem;
}

.help-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.938rem;
  border-left: 3px solid transparent;
}

.help-nav-link i {
  font-size: 1.25rem;
  color: #999;
  transition: color 0.2s ease;
}

.help-nav-link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-left-color: var(--color-primary-light);
}

.help-nav-link:hover i {
  color: var(--color-primary);
}

.help-nav-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
}

.help-nav-link.active i {
  color: var(--color-primary);
}

.help-nav-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.help-nav-support {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  justify-content: center;
  border: none;
  width: 100%;
  cursor: pointer;
}

.help-nav-support:hover {
  background: var(--color-primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(243, 85, 124, 0.3);
}

.help-nav-support i {
  font-size: 1rem;
}

/* Main content area */
.help-guide-container {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 3rem 3rem 3rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.help-guide-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--color-primary);
}

.help-guide-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.help-guide-title i {
  color: var(--color-primary);
  font-size: 2.25rem;
}

.help-guide-subtitle {
  font-size: 1.125rem;
  color: #666;
  margin: 0;
}

/* Support Contact Card */
.help-support-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, var(--color-light-accent) 0%, #fff 100%);
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 12px rgba(243, 85, 124, 0.1);
}

.help-support-icon {
  font-size: 3.5rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.help-support-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.help-support-content p {
  color: #666;
  margin-bottom: 1rem;
}

.help-support-content .btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.help-support-content .btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* Section Wrappers (always open) */
.help-guide-sections {
  margin-bottom: 3rem;
}

.help-section-wrapper {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  margin-bottom: 3rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  scroll-margin-top: 20px;
}

.help-section-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.help-section-header i {
  font-size: 2rem;
  color: white;
}

.help-section-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: white;
}

.help-section-content {
  padding: 2.5rem 2rem;
  background: white;
}

/* Section Styling */
.help-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.help-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.help-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.help-section-title i {
  font-size: 1.5rem;
}

/* Quick Wins / Use Cases / Hierarchy */
.help-quick-wins,
.help-use-cases,
.help-hierarchy,
.help-content-types {
  background: var(--color-light-accent);
  border-left: 4px solid var(--color-secondary);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.help-quick-wins h4,
.help-use-cases h4,
.help-content-types h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.help-quick-wins ul,
.help-use-cases ul,
.help-content-types ul {
  margin: 0;
  padding-left: 1.5rem;
}

.help-quick-wins li,
.help-use-cases li,
.help-content-types li {
  margin-bottom: 0.5rem;
  color: #444;
}

.help-hierarchy-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.help-hierarchy-item:last-child {
  margin-bottom: 0;
}

.help-hierarchy-item i {
  color: var(--color-primary);
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.help-hierarchy-item strong {
  color: var(--color-dark);
}

/* Template Types Cards */
.help-template-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.help-template-type-card {
  background: var(--color-light-accent);
  border: 2px solid var(--color-info);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.help-template-type-card i {
  font-size: 2.5rem;
  color: var(--color-info);
  margin-bottom: 1rem;
  display: block;
}

.help-template-type-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.help-template-type-card p {
  font-size: 0.938rem;
  color: #555;
  margin: 0;
}

/* Market Sources */
.help-market-sources {
  margin: 1.5rem 0;
}

.help-market-sources h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.help-source-type {
  background: var(--color-light-accent);
  border-left: 4px solid var(--color-info);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.help-source-type:last-child {
  margin-bottom: 0;
}

.help-source-type i {
  color: var(--color-info);
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.help-source-type strong {
  color: var(--color-dark);
  font-size: 1.063rem;
}

.help-source-type p {
  margin: 0.5rem 0 0 2rem;
  color: #555;
}

/* Walkthrough Styling */
.help-walkthrough {
  margin-bottom: 2.5rem;
}

.help-walkthrough:last-child {
  margin-bottom: 0;
}

.help-walkthrough h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}

.help-walkthrough-why {
  margin: 0 0 1.25rem 0;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-left: 3px solid var(--color-info);
  border-radius: 4px;
  color: #495057;
  font-size: 0.95rem;
  line-height: 1.6;
}

.help-walkthrough ol {
  margin: 0;
  padding-left: 1.75rem;
  counter-reset: step-counter;
  list-style: none;
}

.help-walkthrough ol li {
  counter-increment: step-counter;
  margin-bottom: 1rem;
  padding-left: 1rem;
  position: relative;
  color: #444;
  line-height: 1.6;
}

.help-walkthrough ol li::before {
  content: counter(step-counter);
  position: absolute;
  left: -1.75rem;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.help-walkthrough ol li strong {
  color: var(--color-dark);
  font-weight: 600;
}

.help-walkthrough ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.help-walkthrough ul li {
  margin-bottom: 0.75rem;
  color: #444;
}

/* Tips & Tricks List */
.help-tips-list {
  margin: 0;
  padding-left: 1.5rem;
}

.help-tips-list li {
  margin-bottom: 1rem;
  color: #444;
  line-height: 1.6;
}

.help-tips-list li strong {
  color: var(--color-dark);
  font-weight: 600;
}

/* Troubleshooting */
.help-troubleshooting {
  background: #fff9f9;
  border: 1px solid #f8d7da;
  border-radius: 8px;
  padding: 1.5rem;
}

.help-trouble-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f8d7da;
}

.help-trouble-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.help-trouble-question {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.help-trouble-answer {
  color: #444;
  margin: 0;
  line-height: 1.6;
}

/* Screenshot Placeholder */
.help-screenshot-placeholder {
  background: var(--color-light-accent);
  border: 3px dashed var(--color-primary);
  border-radius: 8px;
  padding: 3rem 2rem;
  margin: 1.5rem 0;
  text-align: center;
  transition: all 0.3s ease;
}

.help-screenshot-placeholder:hover {
  background: #fff;
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(243, 85, 124, 0.15);
}

.help-screenshot-content {
  max-width: 600px;
  margin: 0 auto;
}

.help-screenshot-content i {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
  opacity: 0.5;
}

.help-screenshot-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.help-screenshot-placeholder code {
  display: block;
  background: white;
  color: var(--color-primary);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  border: 1px solid var(--color-primary-light);
}

/* Footer */
.help-guide-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 2px solid var(--color-primary-light);
  color: #666;
}

.help-guide-footer p {
  margin: 0.5rem 0;
  font-size: 0.938rem;
}

.help-guide-footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.help-guide-footer a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .help-guide-container {
    padding: 1rem 2rem 3rem 2rem;
  }
  
  .help-floating-nav {
    width: 220px;
    min-width: 220px;
  }
}

@media (max-width: 992px) {
  .help-guide-wrapper {
    flex-direction: column;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-top: -1.5rem;
    margin-bottom: -1.5rem;
  }
  
  .help-floating-nav {
    position: sticky;
    top: 72px; /* Keep below navbar on mobile too */
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid #e0e0e0;
    z-index: 5;
  }
  
  .help-nav-list {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem;
  }
  
  .help-nav-list li {
    flex: 0 0 auto;
    margin: 0;
  }
  
  .help-nav-link {
    padding: 0.625rem 1rem;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .help-nav-link.active {
    border-left: none;
    border-bottom-color: var(--color-primary);
  }
  
  .help-guide-container {
    padding: 1rem 1.5rem 3rem 1.5rem;
  }
  
  .help-guide-title {
    font-size: 2rem;
  }
  
  .help-support-card {
    flex-direction: column;
    text-align: center;
  }
  
  .help-template-types {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .help-guide-container {
    padding: 1rem 1rem 3rem 1rem;
  }
  
  .help-guide-title {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .help-section-header {
    padding: 1.25rem 1.5rem;
  }
  
  .help-section-header h2 {
    font-size: 1.5rem;
  }
  
  .help-section-content {
    padding: 2rem 1.5rem;
  }
  
  .help-support-card {
    padding: 1.5rem;
  }
  
  .help-nav-list {
    flex-direction: column;
  }
  
  .help-nav-list li {
    width: 100%;
  }
}

/* ===============================
   TUTORIAL HELP MODAL STYLES
   =============================== */

.tutorial-help-modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.tutorial-help-modal-content .modal-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.tutorial-help-modal-content .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-dark);
}

.tutorial-help-modal-content .modal-title i {
  color: var(--color-primary);
}

.tutorial-help-modal-content .modal-body {
  padding: 1.5rem;
}

.tutorial-help-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tutorial-help-option {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
  width: 100%;
}

.tutorial-help-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(243, 85, 124, 0.15);
}

.tutorial-help-option-icon {
  font-size: 2rem;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tutorial-help-option:hover .tutorial-help-option-icon {
  transform: scale(1.1);
}

.tutorial-help-option-content {
  flex: 1;
}

.tutorial-help-option-content h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.tutorial-help-option-content p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.tutorial-help-option:hover .tutorial-help-option-content h6 {
  color: var(--color-primary);
}

.tutorial-help-option-arrow {
  font-size: 1.25rem;
  color: #9ca3af;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.tutorial-help-option:hover .tutorial-help-option-arrow {
  color: var(--color-primary);
  transform: translateX(4px);
}

/* Mobile responsive */
@media (max-width: 576px) {
  .tutorial-help-option {
    padding: 1rem;
    gap: 1rem;
  }
  
  .tutorial-help-option-icon {
    font-size: 1.5rem;
  }
  
  .tutorial-help-option-content h6 {
    font-size: 0.938rem;
  }
  
  .tutorial-help-option-content p {
    font-size: 0.813rem;
  }
}

/* ===============================
   Dashboard UX Enhancements
   Modern UX improvements for Persona & Messaging Dashboards
   (Merged from dashboard_ux_enhancements.css)
   =============================== */

/* ===============================
   1. Enhanced Card Design
   =============================== */

.dashboard-card {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.dashboard-card-header {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.dashboard-card-header:hover {
  background: linear-gradient(135deg, #fef2f5 0%, #fef7f9 100%);
}

.dashboard-card-body {
  padding: 1.5rem;
  background: #ffffff;
}

/* Nested card styling */
.nested-card {
  background: #fafbfc;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.nested-card:hover {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Block container with enhanced visual */
.block-container {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-left: 4px solid var(--color-primary);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.block-container:hover {
  background: #ffffff;
  border-left-color: var(--color-primary-dark);
  box-shadow: 0 2px 8px rgba(243, 85, 124, 0.1);
}

/* ===============================
   2. Improved Action Button UX
   =============================== */

.action-button-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 6px;
  color: #6b7280;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 1rem;
}

.action-button:hover {
  background: var(--color-light-primary);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.action-button:active {
  transform: scale(0.95);
}

.action-button i {
  font-size: 1rem;
}

.action-button-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.action-button-primary:hover {
  background: var(--color-primary-dark);
  color: white;
  border-color: var(--color-primary-dark);
}

.action-button-danger:hover {
  background: #fee;
  color: #dc3545;
  border-color: #dc3545;
}

/* Button separator */
.action-separator {
  width: 1px;
  height: 24px;
  background: #e5e7eb;
  margin: 0 4px;
}

/* Enhanced primary buttons */
.btn-enhanced {
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn-enhanced:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ===============================
   3. Better Visual Hierarchy
   =============================== */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Visual nesting indicators */
.nested-level-1 {
  margin-left: 0;
}

.nested-level-2 {
  margin-left: 1.5rem;
  border-left: 2px solid #e5e7eb;
  padding-left: 1rem;
}

.nested-level-3 {
  margin-left: 3rem;
  border-left: 2px solid #f3f4f6;
  padding-left: 1rem;
}

/* Spacing utilities */
.spacing-xs { margin-bottom: 0.5rem; }
.spacing-sm { margin-bottom: 0.75rem; }
.spacing-md { margin-bottom: 1rem; }
.spacing-lg { margin-bottom: 1.5rem; }
.spacing-xl { margin-bottom: 2rem; }
.spacing-2xl { margin-bottom: 3rem; }

/* ===============================
   4. Enhanced Interactive States
   =============================== */

.interactive-element {
  transition: all 0.2s ease;
  cursor: pointer;
}

.interactive-element:hover {
  background: var(--color-light-primary);
  border-color: var(--color-primary);
}

.interactive-element:active {
  transform: scale(0.98);
}

.interactive-element:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Loading state */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Success state animation */
@keyframes success-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.success-animation {
  animation: success-pulse 0.4s ease;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===============================
   5. Improved Color Usage
   =============================== */

.badge-enhanced {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.badge-primary-enhanced {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary);
}

.badge-secondary-enhanced {
  background: var(--color-secondary-light);
  color: var(--color-dark);
  border: 1px solid var(--color-secondary);
}

.badge-info-enhanced {
  background: var(--color-info-light);
  color: var(--color-info-dark);
  border: 1px solid var(--color-info);
}

/* Highlight variations */
.highlight-primary {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

.highlight-secondary {
  background: var(--color-secondary-light);
  border-left: 3px solid var(--color-secondary);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

.highlight-info {
  background: var(--color-info-light);
  border-left: 3px solid var(--color-info);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

/* ===============================
   6. Better Spacing & Layout
   =============================== */

.content-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

.content-section {
  margin-bottom: 2rem;
}

.content-block {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* Improved card padding */
.card-padding-sm {
  padding: 0.75rem 1rem;
}

.card-padding-md {
  padding: 1rem 1.5rem;
}

.card-padding-lg {
  padding: 1.5rem 2rem;
}

/* Text content breathing room */
.text-content {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.text-content p {
  margin-bottom: 0.75rem;
}

.text-content p:last-child {
  margin-bottom: 0;
}

/* Responsive spacing adjustments */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 1rem;
  }
  
  .dashboard-card-header,
  .dashboard-card-body {
    padding: 1rem;
  }
  
  .spacing-xl { margin-bottom: 1.5rem; }
  .spacing-2xl { margin-bottom: 2rem; }
}

/* ===============================
   7. Enhanced Collapse/Expand UX
   =============================== */

.collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 0;
  margin-right: 8px; /* Add space between arrow and title */
}

.collapse-toggle:hover {
  background: var(--color-light-primary);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.1);
}

.collapse-toggle i {
  font-size: 1.125rem;
  transition: transform 0.3s ease;
}

/* When collapsed (closed) - point right */
.collapse-toggle[aria-expanded="false"] i {
  transform: rotate(-90deg);
}

/* When expanded (open) - point down */
.collapse-toggle[aria-expanded="true"] i {
  transform: rotate(0deg);
}

/* Enhanced collapse animation */
.collapse {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only apply fade-in animation to collapse elements, not modals */
.collapse.show:not(.modal) {
  animation: collapse-fade-in 0.3s ease;
}

@keyframes collapse-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Collapsible header hover state */
.collapsible-header {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  padding: 0.5rem;
  margin: -0.5rem;
}

.collapsible-header:hover {
  background: var(--color-light-accent);
}

/* ===============================
   8. Improved Block Editor Experience
   =============================== */

.block-editor-wrapper {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.block-editor-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.block-editor-header {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.block-editor-content {
  padding: 1rem;
  min-height: 120px;
}

.block-title-enhanced {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.character-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem;
  background: #f3f4f6;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
}

.character-counter.near-limit {
  background: var(--color-warning-light);
  color: var(--color-dark);
}

.character-counter.over-limit {
  background: #fee;
  color: #dc3545;
  font-weight: 600;
}

.save-button-enhanced {
  min-width: 80px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.save-button-enhanced:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.save-button-enhanced:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.unsaved-indicator-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: var(--color-warning-light);
  border: 1px solid var(--color-warning);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-dark);
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.unsaved-indicator-enhanced i {
  font-size: 0.625rem;
  color: var(--color-warning);
}

/* Edit mode distinction */
.edit-mode {
  border: 2px solid var(--color-primary);
  background: var(--color-light-primary);
}

.view-mode {
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

/* ===============================
   9. Empty State Improvements
   =============================== */

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.empty-state:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #ffffff 0%, var(--color-light-primary) 100%);
  transform: translateY(-2px);
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: float-icon 3s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.empty-state-description {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-cta {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(243, 85, 124, 0.2);
  transition: all 0.2s ease;
}

.empty-state-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(243, 85, 124, 0.3);
}

/* Compact Empty State (for areas where space is limited) */
.empty-state.empty-state-compact {
  padding: 2rem 1.5rem;
  margin: 1rem 0;
}

.empty-state-compact .empty-state-icon {
  font-size: 3.5rem !important;
  margin-bottom: 1rem;
}

.empty-state-compact .empty-state-icon i,
.empty-state-compact .empty-state-icon .bi {
  font-size: 3.5rem !important;
}

.empty-state-compact .empty-state-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.empty-state-compact .empty-state-description {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  max-width: 400px;
}

.empty-state-compact .empty-state-cta {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* ===============================
   10. Additional Micro-interactions
   =============================== */

/* Tooltip enhancement */
.tooltip-enhanced {
  background: var(--color-dark);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.813rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dropdown menu enhancement */
.dropdown-menu-enhanced {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  animation: dropdown-fade-in 0.2s ease;
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item-enhanced {
  padding: 0.625rem 1rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.dropdown-item-enhanced:hover {
  background: var(--color-light-primary);
  color: var(--color-primary);
  transform: translateX(2px);
}

.dropdown-item-enhanced i {
  width: 20px;
  text-align: center;
}

/* Form input enhancement */
.form-input-enhanced {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 0.625rem 0.875rem;
  transition: all 0.2s ease;
}

.form-input-enhanced:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  outline: none;
}

/* Modal enhancement */
.modal-content-enhanced {
  border-radius: 12px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header-enhanced {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 12px 12px 0 0;
}

.modal-footer-enhanced {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  background: #fafbfc;
  border-radius: 0 0 12px 12px;
}

/* Prevent animations from affecting modals */
.modal,
.modal * {
  animation: none !important;
}

/* Fix Bootstrap modal fade animation (override our animation block above) */
.modal.fade {
  animation: none !important;
  transition: opacity 0.15s linear !important;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out !important;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

/* Prevent dashboard card hover when modal is open */
body.modal-open .dashboard-card:hover {
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ===============================
   11. Responsive Touch Targets
   =============================== */

@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets on touch devices */
  .action-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .collapse-toggle {
    width: 44px;
    height: 44px;
  }
  
  .action-button-group {
    gap: 12px;
  }
}

/* ===============================
   12. Accessibility Improvements
   =============================== */

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  .dashboard-card,
  .nested-card,
  .block-container {
    border-width: 2px;
  }
  
  .action-button:hover {
    border-width: 2px;
  }
}

/* ===============================
   13. Add Block Button Styling
   =============================== */

.add-block-btn {
  font-size: 0.813rem;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  border: 1px dashed #d1d5db;
  background: transparent;
  color: #6b7280;
  transition: all 0.2s ease;
  font-weight: 500;
}

.add-block-btn:hover {
  background: var(--color-light-accent);
  border-color: var(--color-primary);
  border-style: solid;
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(243, 85, 124, 0.1);
}

.add-block-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.add-block-btn i {
  font-size: 0.875rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.add-block-btn:hover i {
  opacity: 1;
}

/* ===============================
   14. Add Topic Form Styling
   =============================== */

.add-topic-form {
  margin: 0;
}

.add-topic-input {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 0.625rem 1rem;
  font-size: 0.938rem;
  line-height: 1.5;
  height: 44px;
  transition: all 0.2s ease;
  background: #fafbfc;
  box-sizing: border-box;
  vertical-align: middle;
}

.add-topic-input:focus {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  outline: none;
}

.add-topic-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.add-topic-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.938rem;
  font-weight: 500;
  line-height: 1.5;
  height: 44px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(243, 85, 124, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  vertical-align: middle;
  border-width: 1px;
  flex-shrink: 0;
}

.add-topic-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(243, 85, 124, 0.25);
}

.add-topic-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(243, 85, 124, 0.15);
}

.add-topic-btn i {
  font-size: 0.875rem;
}

/* ===============================
   15. Chatbot Clearance & Scrolling
   =============================== */

/* Add bottom padding to ensure page content can scroll above the fixed chatbot widget */
/* Only apply this class where chatbot clearance is specifically needed */
.chatbot-clearance {
  padding-bottom: 100px !important;
}

/* Add smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Ensure the last elements in dashboards have extra margin */
.dashboard-card:last-of-type,
.empty-state:last-of-type {
  margin-bottom: 80px;
}

/* ===============================
   16. AI Enhance Button Styling
   =============================== */

.ai-enhance-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.813rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(141, 209, 228, 0.25);
  white-space: nowrap;
  margin-right: 0.5rem;
  height: 32px;
  min-width: fit-content;
}

.ai-enhance-btn:hover {
  background: linear-gradient(135deg, var(--color-success-dark) 0%, var(--color-success) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(141, 209, 228, 0.35);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.ai-enhance-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(141, 209, 228, 0.25);
}

.ai-enhance-btn i {
  font-size: 0.938rem;
  margin-right: 0.375rem;
}

/* ===============================
   14. Compact Table Enhancements (Content)
   =============================== */

.compact-table {
  font-size: 0.875rem;
}

.compact-table tbody tr {
  transition: background-color 0.15s ease;
}

.compact-table tbody tr:hover {
  background-color: var(--color-light-accent);
}

.compact-table .btn-link {
  color: #6b7280;
  text-decoration: none;
  transition: all 0.15s ease;
  font-size: 1rem;
}

.compact-table .btn-link:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

.compact-table .delete-content-btn:hover {
  color: var(--color-primary);
}

.compact-table .text-truncate {
  max-width: 200px;
}

/* Better badge styling in compact tables */
.compact-table .badge-sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  font-weight: 500;
  border-radius: 4px;
}

/* ===============================
   15. Enhanced Filter Bar
   =============================== */

.filter-card {
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background: #fafbfc;
  overflow: visible;
}

.filter-card .dashboard-card-body {
  overflow: visible;
}

/* Ensure dropdowns have proper positioning context */
.filter-card .dropdown {
  position: relative;
}

.filter-search {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  transition: all 0.2s ease;
  background: white;
  font-size: 0.875rem;
  height: 38px;
  line-height: 1.5;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  box-sizing: border-box;
  vertical-align: middle;
}

.filter-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(243, 85, 124, 0.1);
  background: white;
}

.filter-dropdown-btn {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  height: 38px;
  line-height: 1.5;
  box-sizing: border-box;
  vertical-align: middle;
}

.filter-dropdown-btn:hover {
  border-color: var(--color-primary);
  background: #fef2f5;
  color: var(--color-primary);
}

.filter-dropdown-btn:focus,
.filter-dropdown-btn:active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(243, 85, 124, 0.1);
  background: white;
}

.filter-dropdown-menu {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 320px;
  overflow-y: auto;
  min-width: 220px;
  z-index: 1050;
  position: absolute;
}

.filter-dropdown-menu .form-check {
  padding-left: 1.75rem;
}

.filter-dropdown-menu .form-check-input {
  margin-top: 0.2rem;
}

.filter-dropdown-menu .form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.filter-dropdown-menu .form-check-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: color 0.15s ease;
}

.filter-dropdown-menu .form-check-label:hover {
  color: var(--color-primary);
}

/* Filter action buttons */
.filter-action-btn {
  height: 38px !important;
  max-height: 38px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.5rem 0.75rem !important;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Override parent's align-items-stretch specifically for the filter button column */
form[method="GET"] .col-md-2.d-flex.align-items-stretch {
  align-items: flex-start !important;
}

.filter-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-action-btn:active {
  transform: translateY(0);
}

/* ===============================
   16. Load More Button
   =============================== */

.load-more-btn {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  color: #374151;
  background: white;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.load-more-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(243, 85, 124, 0.2);
}

.load-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(243, 85, 124, 0.2);
}

.load-more-btn i {
  transition: transform 0.2s ease;
}

.load-more-btn:hover i {
  transform: translateY(2px);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===============================
   17. Content Gaps Journey Tables (Compact)
   =============================== */

.collapsible-section {
  background: white;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  border: 1px solid #dee2e6;
  transition: box-shadow 0.2s ease;
}

.collapsible-section:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.collapsible-section .section-header {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  background-color: #fafbfc;
  margin-bottom: 0;
}

.collapsible-section .section-header:hover {
  background-color: var(--color-light-accent);
}

.collapsible-section .section-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-dark);
  margin: 0;
}

.collapsible-section .section-chevron {
  color: var(--color-primary);
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.collapsible-section .section-content {
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
}

/* Compact column-based journey table */
.content-journey-table-compact {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.75rem;
}

.content-journey-table-compact thead th {
  background-color: #f8f9fa;
  padding: 0.4rem 0.5rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-dark);
  border: 1px solid #dee2e6;
}

.content-journey-table-compact .stage-column {
  padding: 0.5rem;
  vertical-align: top;
  border: 1px solid #dee2e6;
  min-width: 160px;
}

.content-item-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
  padding: 0.25rem;
  background-color: var(--color-info-light);
  border-radius: 3px;
  border-left: 2px solid var(--color-info);
  transition: background-color 0.2s ease;
}

.content-item-compact:hover {
  background-color: #d1ebf3;
}

.content-item-compact i {
  font-size: 0.7rem;
  flex-shrink: 0;
  color: var(--color-info-dark);
}

.content-item-compact .content-link {
  color: var(--color-dark);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  flex: 1;
}

.content-item-compact .content-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.gap-item-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
  padding: 0.25rem 0.35rem;
  background-color: var(--color-warning-light);
  border-radius: 3px;
  border-left: 2px solid var(--color-warning);
  opacity: 0.85;
  transition: all 0.2s ease;
}

.gap-item-compact:hover {
  opacity: 1;
  background-color: #fef0d6;
}

.gap-item-compact .gap-type {
  font-style: italic;
  color: #6c757d;
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gap-item-compact .gap-btn {
  font-size: 0.65rem;
  padding: 0.2rem 0.35rem;
  line-height: 1;
  border-radius: 3px;
  flex-shrink: 0;
}

.gap-item-compact .gap-btn i {
  font-size: 0.7rem;
}

.gap-item-compact .btn-outline-secondary {
  padding: 0.2rem 0.3rem;
}

/* Old column-based table (for backward compatibility) */
.content-journey-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.75rem;
}

.content-journey-table th {
  background-color: #f8f9fa;
  padding: 0.375rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-dark);
  border: 1px solid #dee2e6;
}

.content-journey-table td {
  padding: 0.5rem;
  vertical-align: top;
  border: 1px solid #dee2e6;
  min-width: 140px;
  font-size: 0.75rem;
}

.content-journey-table td:empty {
  background-color: #fafbfc;
}

.content-item {
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.content-item:last-child {
  margin-bottom: 0;
}

/* Common box styling for both existing and missing content */
.content-item-box {
  padding: 0.375rem;
  background-color: #f8f9fa;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.content-item.existing .content-item-box {
  border-left: 2px solid var(--color-success);
  background-color: #f0fdf4;
}

.content-item.existing .content-item-box:hover {
  background-color: #dcfce7;
}

.content-item.existing {
  color: var(--color-dark);
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.content-item.existing i {
  margin-top: 1px;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.content-item.existing a {
  color: var(--color-dark);
  flex: 1;
  font-size: 0.75rem;
  font-weight: 500;
}

.content-item.existing a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Inline box styling for missing content (one line) */
.content-item-box-inline {
  padding: 0.25rem 0.375rem;
  background-color: #f8f9fa;
  border-radius: 3px;
  border-left: 2px solid var(--color-info);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  justify-content: space-between;
}

.content-item.missing {
  opacity: 0.8;
}

.content-item.missing .content-item-box-inline:hover {
  opacity: 1;
  background-color: #f0f1f3;
}

.content-item-box-inline i.bi-circle {
  font-size: 0.5rem;
  flex-shrink: 0;
}

.content-item-box-inline .gap-name {
  font-style: italic;
  color: #6c757d;
  font-weight: 500;
  font-size: 0.7rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gap-actions-inline {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
  margin-left: auto;
}

.gap-action-btn {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  border-radius: 3px;
  white-space: nowrap;
}

.gap-action-btn i {
  font-size: 0.7rem;
}

.gap-action-btn.btn-primary {
  min-width: auto;
}

.gap-action-btn.btn-outline-secondary {
  padding: 0.2rem 0.35rem;
}

/* Old multi-line styles kept for backward compatibility if needed */
.content-item.missing .gap-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.content-item.missing .gap-info i {
  font-size: 0.6rem;
}

.content-item.missing .gap-actions {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.content-item.missing .btn {
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  line-height: 1.2;
}

.content-item.missing .btn i {
  font-size: 0.65rem;
}

/* Gap completed state */
.gap-completed {
  opacity: 0.6;
  border-left-color: var(--color-success);
  background-color: var(--color-success-light);
}

.gap-completed .gap-actions {
  display: none;
}

/* Compact badge */
.collapsible-section .badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
}

/* Compact dismiss button */
.collapsible-section .section-header .btn-sm {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .content-journey-table {
    font-size: 0.7rem;
  }
  
  .content-journey-table td {
    min-width: 120px;
    padding: 0.375rem;
  }
  
  .content-journey-table-compact .stage-column {
    min-width: 140px;
    padding: 0.4rem;
  }
  
  .content-item-compact,
  .gap-item-compact {
    font-size: 0.7rem;
  }
  
  .content-item.missing .gap-actions {
    flex-direction: column;
  }
  
  .content-item.missing .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .collapsible-section .section-header {
    padding: 0.5rem;
  }
  
  .collapsible-section .section-header h4 {
    font-size: 0.8rem;
  }
  
  .collapsible-section .section-content {
    padding: 0.5rem;
  }
  
  .content-journey-table th,
  .content-journey-table td {
    padding: 0.25rem;
    font-size: 0.7rem;
  }
  
  .content-journey-table td {
    min-width: 100px;
  }
  
  .content-journey-table-compact .stage-column {
    min-width: 120px;
    padding: 0.3rem;
  }
  
  .content-item-compact,
  .gap-item-compact {
    margin-bottom: 0.25rem;
    padding: 0.2rem;
  }
  
  .gap-item-compact .gap-btn {
    padding: 0.15rem 0.25rem;
    font-size: 0.6rem;
  }
}

/* ===============================
   Subscription & Payment UX
   =============================== */

/* Checkout Modal */
.checkout-modal .modal-content {
    border-radius: 12px;
}

.stripe-element-container {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.stripe-element-container:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(243, 85, 124, 0.25);
}

.payment-processing .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Limit Hit Modal */
.limit-hit-hero {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #fff 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.limit-hit-icon {
    font-size: 4rem;
    color: var(--color-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.tier-comparison-table {
    border-collapse: separate;
    border-spacing: 0 1rem;
}

.tier-comparison-table .current-tier-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

.tier-comparison-table .next-tier-card {
    background: linear-gradient(135deg, #fff 0%, var(--color-primary-light) 100%);
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.15);
}

.upgrade-cta-section {
    background: var(--color-light-accent);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.upgrade-cta-section .btn-primary {
    font-size: 1.25rem;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.3);
    transition: all 0.3s ease;
}

.upgrade-cta-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 85, 124, 0.4);
}

/* Subscription Overview Cards (Account Settings) */
.subscription-overview-card {
    transition: all 0.3s ease;
}

.subscription-overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.usage-stat-compact {
    padding: 0.5rem 1rem;
    border-left: 3px solid var(--color-primary);
    background: var(--color-light-accent);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.usage-stat-compact:hover {
    border-left-width: 5px;
    background: #fff;
}

.usage-stat-compact .progress {
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

/* Pricing Page Toggle */
.pricing-toggle {
    background: #fff;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.pricing-toggle .form-switch {
    margin: 0;
}

.pricing-toggle .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.pricing-toggle .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Pricing Cards */
.price-monthly,
.price-annual {
    transition: opacity 0.3s ease;
}

.tier-card-featured {
    border: 2px solid var(--color-primary) !important;
    box-shadow: 0 8px 24px rgba(243, 85, 124, 0.2) !important;
    transform: scale(1.02);
}

.tier-card-featured .card-body {
    background: linear-gradient(135deg, #fff 0%, var(--color-primary-light) 100%);
}

/* Pricing comparison table */
.pricing-comparison-table {
    border-radius: 12px;
    overflow: hidden;
}

.pricing-comparison-table thead {
    background: var(--color-dark);
    color: white;
}

.pricing-comparison-table tbody tr {
    transition: background-color 0.2s ease;
}

.pricing-comparison-table tbody tr:hover {
    background-color: var(--color-primary-light);
}

.pricing-comparison-table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Payment Method Modal */
#paymentMethodModal .card-element {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: 40px;
}

#paymentMethodModal .StripeElement {
    padding: 10px 12px;
}

#paymentMethodModal .StripeElement--focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(243, 85, 124, 0.25);
}

/* Subscription Status Badges */
.subscription-status-active {
    background-color: var(--color-success);
    color: white;
}

.subscription-status-past_due {
    background-color: var(--color-warning);
    color: var(--color-dark);
}

.subscription-status-canceled {
    background-color: #6c757d;
    color: white;
}

.subscription-status-incomplete {
    background-color: var(--color-info);
    color: white;
}

/* Usage Progress Bars with Custom Colors */
.usage-progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.usage-progress-bar {
    height: 100%;
    transition: width 0.6s ease, background-color 0.3s ease;
}

.usage-progress-bar.usage-low {
    background-color: var(--color-success);
}

.usage-progress-bar.usage-medium {
    background-color: var(--color-info);
}

.usage-progress-bar.usage-high {
    background-color: var(--color-warning);
}

.usage-progress-bar.usage-critical {
    background-color: var(--color-primary);
    animation: pulse-bar 2s infinite;
}

@keyframes pulse-bar {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Billing History Table */
.billing-history-table {
    border-radius: 8px;
    overflow: hidden;
}

.billing-history-table thead {
    background-color: var(--color-light-accent);
}

.billing-history-table tbody tr:hover {
    background-color: var(--color-primary-light);
    cursor: pointer;
}

.payment-status-succeeded {
    color: var(--color-success);
}

.payment-status-failed {
    color: var(--color-primary);
}

.payment-status-pending {
    color: var(--color-warning);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .checkout-modal .modal-dialog {
        margin: 0.5rem;
    }

    .limit-hit-modal .modal-dialog {
        margin: 0.5rem;
    }

    .tier-comparison-table {
        border-spacing: 0 0.5rem;
    }

    .upgrade-cta-section {
        padding: 1rem;
    }

    .upgrade-cta-section .btn-primary {
        font-size: 1rem;
        padding: 0.5rem 1.5rem;
    }

    .subscription-overview-card {
        margin-bottom: 1rem;
    }

    .pricing-toggle {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
}

/* Smooth transitions for all interactive elements */
.btn-primary,
.btn-outline-primary,
.card,
.modal-content {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.btn-primary:focus,
.btn-outline-primary:focus,
.form-control:focus,
.StripeElement--focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(243, 85, 124, 0.25);
}

/* Loading states */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* ===============================
   Enhanced Subscription UX
   =============================== */

/* Usage Dashboard Header */
.usage-header-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    box-shadow: 0 4px 20px rgba(243, 85, 124, 0.25);
}

.usage-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.usage-header-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.usage-header-subtitle {
    margin-bottom: 0;
    opacity: 0.95;
}

.usage-tier-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.usage-billing-badge {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 500;
}

.usage-upgrade-btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    color: var(--color-primary);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.usage-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: white;
    color: var(--color-primary-dark);
}

/* Usage Warning Cards */
.usage-warning-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.usage-warning-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.usage-warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.usage-warning-text {
    flex: 1;
}

/* Usage Metric Cards */
.usage-metric-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.usage-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.usage-metric-over-limit {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 16px rgba(243, 85, 124, 0.15);
}

.usage-metric-over-limit:hover {
    border-color: var(--color-primary-dark);
    box-shadow: 0 8px 24px rgba(243, 85, 124, 0.25);
}

.usage-metric-over-limit .usage-metric-title {
    color: var(--color-primary);
}

.usage-metric-over-limit .usage-metric-current {
    color: var(--color-primary);
}

.usage-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.usage-metric-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0;
}

.usage-metric-stats {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.usage-metric-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
}

.usage-metric-limit {
    font-size: 1.25rem;
    color: #9ca3af;
}

.usage-progress-container {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-progress-bar {
    height: 100%;
    transition: width 0.6s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.usage-progress-success {
    background: linear-gradient(90deg, var(--color-success) 0%, var(--color-success-dark) 100%);
}

.usage-progress-warning {
    background: linear-gradient(90deg, var(--color-warning) 0%, #e09f3e 100%);
}

.usage-progress-danger {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.usage-unlimited-badge {
    background: var(--color-info-light);
    color: var(--color-info-dark);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.usage-limit-warning {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.usage-limit-warning a {
    color: #991b1b;
    text-decoration: underline;
}

/* Subscription Detail Card */
.subscription-detail-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
}

.subscription-detail-header {
    background: var(--color-light-accent);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-dark);
}

.subscription-detail-body {
    padding: 1.5rem;
}

.subscription-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.subscription-detail-item:last-child {
    border-bottom: none;
}

.subscription-detail-label {
    font-weight: 500;
    color: #6b7280;
}

.subscription-detail-value {
    font-weight: 600;
    color: var(--color-dark);
}

.subscription-detail-actions {
    padding: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

/* Upgrade Preview Card */
.upgrade-preview-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--color-primary-light) 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(243, 85, 124, 0.15);
    overflow: hidden;
    border: 2px solid var(--color-primary);
    height: 100%;
}

.upgrade-preview-header {
    background: var(--color-primary);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upgrade-preview-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.upgrade-preview-title {
    margin: 0;
    font-weight: 700;
}

.upgrade-preview-body {
    padding: 1.5rem;
}

.upgrade-preview-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.upgrade-preview-features {
    margin-bottom: 1.5rem;
}

.upgrade-preview-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--color-dark);
}

.upgrade-preview-feature i {
    color: var(--color-success);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.upgrade-preview-pricing {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.upgrade-preview-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.upgrade-preview-price-item:first-child {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.75rem;
}

.upgrade-preview-cta {
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.3);
}

.upgrade-preview-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 85, 124, 0.4);
}

/* Pricing Tier Cards (Upgrade Page) */
.pricing-tier-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.pricing-tier-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pricing-tier-current {
    border: 2px solid var(--color-success);
}

.pricing-tier-featured {
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 20px rgba(243, 85, 124, 0.2);
}

.pricing-tier-featured:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(243, 85, 124, 0.3);
}

.pricing-tier-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    border-radius: 0 0 12px 12px;
    font-size: 0.775rem;
    font-weight: 600;
    z-index: 1;
}

.pricing-tier-badge-current {
    background: var(--color-success);
    color: white;
}

.pricing-tier-badge-popular {
    background: var(--color-primary);
    color: white;
}

.pricing-tier-body {
    padding: 2rem 1.5rem 1.5rem;
}

.pricing-tier-card.pricing-tier-current .pricing-tier-body,
.pricing-tier-card.pricing-tier-featured .pricing-tier-body {
    padding-top: 3rem;
}

.pricing-tier-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.pricing-tier-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
}

.pricing-tier-price {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 1.5rem;
}

.pricing-tier-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.pricing-tier-currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

.pricing-tier-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

.pricing-tier-period {
    font-size: 1.125rem;
    color: #9ca3af;
}

.pricing-tier-annual {
    font-size: 0.875rem;
    color: #6b7280;
}

.pricing-tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.pricing-tier-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    color: var(--color-dark);
}

.pricing-tier-features i {
    color: var(--color-success);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.pricing-tier-actions {
    margin-top: auto;
}

/* Enhanced Checkout Modal */
.checkout-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1060;
    padding: 1rem;
}

.checkout-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.checkout-modal-card {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 1;
}

.checkout-modal-close:hover {
    background: #f3f4f6;
    color: var(--color-dark);
}

.checkout-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.3);
}

.checkout-modal-icon i {
    font-size: 2rem;
    color: white;
}

.checkout-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
}

.checkout-order-summary {
    background: var(--color-light-accent);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.checkout-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.checkout-order-tier {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 0.25rem 0;
}

.checkout-order-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.checkout-order-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.checkout-order-period {
    font-size: 0.875rem;
    color: #6b7280;
}

.checkout-form {
    margin-top: 1.5rem;
}

.checkout-form-group {
    margin-bottom: 1.5rem;
}

.checkout-form-label {
    display: block;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.checkout-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.checkout-form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(243, 85, 124, 0.1);
}

.checkout-card-element {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checkout-card-element.StripeElement--focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(243, 85, 124, 0.1);
}

.checkout-card-element.StripeElement--invalid {
    border-color: #dc3545;
}

.checkout-card-errors {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.checkout-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.checkout-alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.checkout-alert-success {
    background: #f0fdf4;
    color: #166534;
    flex-direction: column;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.checkout-success-icon {
    width: 60px;
    height: 60px;
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    animation: successPop 0.5s ease-out;
    animation: successPop 0.5s ease-out;
}

.checkout-success-icon i {
    font-size: 2rem;
    color: white;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.checkout-success-text strong {
    font-size: 1.25rem;
    color: var(--color-success-dark);
}

.checkout-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.3);
}

.checkout-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 85, 124, 0.4);
}

.checkout-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.checkout-trust-badge i {
    color: var(--color-success);
    font-size: 1rem;
}

.checkout-powered-by {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 1rem 0 0 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .usage-header-content {
        flex-direction: column;
        text-align: center;
    }

    .usage-header-title {
        font-size: 1.5rem;
    }

    .usage-metric-current {
        font-size: 1.5rem;
    }

    .pricing-tier-card {
        margin-bottom: 1rem;
    }

    .checkout-modal-card {
        padding: 1.5rem;
        max-height: 95vh;
    }

    .checkout-modal-title {
        font-size: 1.5rem;
    }

    .checkout-order-header {
        flex-direction: column;
        text-align: center;
    }

    .checkout-trust-badges {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .upgrade-preview-header {
        flex-direction: column;
        text-align: center;
    }
    
    .limit-modal-card {
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .limit-modal-title {
        font-size: 1.5rem;
    }
    
    .limit-comparison-box {
        padding: 1rem;
    }
    
    .limit-features-box {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .checkout-modal-wrapper {
        padding: 0.5rem;
    }

    .checkout-modal-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .limit-modal-wrapper {
        padding: 0.5rem;
    }
    
    .limit-modal-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
}

/* ===============================
   Limit Hit Modal (Tutorial Wizard Style)
   =============================== */

.limit-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1070;
    padding: 1rem;
}

.limit-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.limit-modal-card {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem 2.5rem 2.5rem;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.limit-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 1;
}

.limit-modal-close:hover {
    background: #f3f4f6;
    color: var(--color-dark);
    transform: rotate(90deg);
}

.limit-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #FDD283 0%, #f5a623 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(253, 210, 131, 0.4);
    animation: limitIconPulse 2s ease-in-out infinite;
}

.limit-modal-icon i {
    font-size: 2.5rem;
    color: white;
}

@keyframes limitIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(253, 210, 131, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(253, 210, 131, 0.5);
    }
}

.limit-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
    text-align: center;
    margin: 0 0 1rem 0;
}

.limit-modal-description {
    font-size: 1.125rem;
    color: #6b7280;
    text-align: center;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.limit-comparison-box {
    background: linear-gradient(135deg, #fef3f2 0%, #fff5f5 100%);
    border: 2px solid #fecaca;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.limit-comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.limit-comparison-label {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 1rem;
}

.limit-comparison-value .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.limit-comparison-divider {
    text-align: center;
    margin: 1rem 0;
}

.limit-comparison-divider i {
    font-size: 1.5rem;
    color: var(--color-success);
}

.limit-comparison-upgrade {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.limit-features-box {
    background: var(--color-light-accent);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.limit-features-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 1rem 0;
}

.limit-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.limit-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--color-dark);
    font-size: 0.95rem;
}

.limit-features-list i {
    color: var(--color-success);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.limit-pricing-box {
    text-align: center;
    margin-bottom: 2rem;
}

.limit-price-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.limit-price-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.limit-price-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.limit-price-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.limit-price-display {
    margin-bottom: 1.5rem;
}

.limit-price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.limit-price-period {
    font-size: 1.125rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.limit-modal-actions {
    margin-bottom: 1.5rem;
}

.limit-modal-actions .btn {
    font-weight: 600;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    transition: all 0.2s ease;
}

.limit-modal-actions .btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.3);
}

.limit-modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 85, 124, 0.4);
}

.limit-modal-footer {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* ===============================
   Market Intelligence - Competitor Cards
   =============================== */

.competitor-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.competitor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.competitor-card .card-header {
    background-color: var(--color-light-accent);
    border-bottom: 2px solid var(--color-primary);
    padding: 1rem 1.25rem;
}

.competitor-card .card-body {
    padding: 1.25rem;
}

.competitor-card .card-footer {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

.competitor-logo {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.competitor-logo-large {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.competitor-sources {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--color-light-accent);
    border-radius: 6px;
}

.source-item i {
    font-size: 1.125rem;
}

.source-label {
    font-weight: 500;
    color: var(--color-dark);
    flex: 1;
}

.doc-list, .file-list {
    max-height: 300px;
    overflow-y: auto;
}

.doc-item, .file-item {
    padding: 0.75rem;
    border-radius: 6px;
    background-color: var(--color-light-accent);
}

.doc-item:hover, .file-item:hover {
    background-color: var(--color-info-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .competitor-card {
        margin-bottom: 1rem;
    }
    
    .competitor-logo-large {
        max-width: 60px;
        max-height: 60px;
    }
    
    .source-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===============================
   Market Intelligence - Action Buttons
   =============================== */

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-icon {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
}

.action-icon:hover {
    color: var(--color-primary-dark);
}

.action-icon i {
    font-size: 0.875rem;
}

/* Ensure action buttons don't wrap */
.action-buttons {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===============================
   Market Intelligence - Tab Badges
   =============================== */

.nav-tabs .nav-link .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.nav-tabs .nav-link.active .badge {
    background-color: var(--color-primary) !important;
    color: white;
}

/* ===============================
   Form Card UI Components (Reusable)
   =============================== */

/* Form Section Wrapper - Premium gradient background */
.form-section-wrapper {
    background: linear-gradient(135deg, #fef5f8 0%, #fff9fb 100%);
    border: 2px solid #fde8ed;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.form-section-wrapper:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(243, 85, 124, 0.08);
}

/* Icon Badge - Branded gradient */
.icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #d63a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(243, 85, 124, 0.2);
}

.icon-badge-lg {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    border-radius: 12px;
}

/* Option Card Selector - iOS-style segmented control */
.option-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: var(--color-primary);
    background: #fffbfc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.btn-check:checked + .option-card {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #fff 0%, #fffbfc 100%);
    box-shadow: 0 0 0 3px rgba(243, 85, 124, 0.1);
}

/* Grid-based option cards (for side-by-side layouts) */
.option-card-grid {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    height: 100%;
}

.option-card-grid:hover {
    border-color: var(--color-primary);
    background: #fffbfc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn-check:checked + .option-card-grid {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #fff 0%, #fffbfc 100%);
    box-shadow: 0 0 0 4px rgba(243, 85, 124, 0.12);
}

/* Option Card Icons */
.option-icon {
    font-size: 1.75rem;
    color: #6c757d;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.btn-check:checked + .option-card .option-icon,
.btn-check:checked + .option-card-grid .option-icon {
    color: var(--color-primary);
    transform: scale(1.1);
}

.btn-check:checked + .option-card-grid .option-icon {
    transform: scale(1.15);
}

/* Option Card Content */
.option-details {
    flex-grow: 1;
}

.option-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 0.15rem;
}

.option-title-lg {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.option-desc {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.3;
}

.option-desc-lg {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Option Card Check Icon */
.option-check {
    font-size: 1.25rem;
    color: #dee2e6;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.option-check-lg {
    font-size: 1.5rem;
}

.btn-check:checked + .option-card .option-check,
.btn-check:checked + .option-card-grid .option-check {
    color: var(--color-primary);
    animation: checkBounce 0.3s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes checkBounceLg {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.btn-check:checked + .option-card-grid .option-check {
    animation: checkBounceLg 0.3s ease;
}

/* Form Section Headers */
.form-section-header {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-number {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(243, 85, 124, 0.3);
}

.section-title-text h6 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #212529;
}

.section-title-text .text-muted {
    font-size: 0.875rem;
    font-weight: normal;
}

/* Enhanced Form Controls */
.form-control-enhanced,
.form-select-enhanced {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.form-control-enhanced:focus,
.form-select-enhanced:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(243, 85, 124, 0.1);
}

.form-control-lg-enhanced,
.form-select-lg-enhanced {
    height: 50px;
    font-size: 1rem;
}

/* Select with Icon Overlay */
.select-with-icon-wrapper {
    position: relative;
}

.select-with-icon-wrapper select {
    padding-left: 2.5rem;
}

.select-icon-overlay {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 5;
}

/* Fade-in animation for form sections */
.form-section-animated {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

