/* CompoundLab Custom Styles */

/* Smooth transitions for all elements */
* {
    transition: all 0.2s ease;
}

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

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

/* Compound card hover effects */
.compound-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.compound-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Tag styling */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Warning styles */
.warning-high {
    border-left: 4px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.warning-medium {
    border-left: 4px solid #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.warning-low {
    border-left: 4px solid #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark mode scrollbar */
.dark .custom-scrollbar::-webkit-scrollbar-track {
    background: #374151;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #6b7280;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Progress bar animations */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Focus states */
.focus-ring:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .mobile-stack {
        display: block !important;
    }

    .mobile-stack > * {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
}

/* Text truncation utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Weeks text styling to prevent overflow */
.weeks-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Duration widget styling */
.duration-widget {
    overflow: hidden;
}

.duration-widget .weeks-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.875rem;
}

/* Compound link styles */
.compound-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.compound-link:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
    background-color: rgba(59, 130, 246, 0.1);
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
}

.dark .compound-link {
    color: #60a5fa;
    border-bottom-color: rgba(96, 165, 250, 0.3);
}

.dark .compound-link:hover {
    color: #93c5fd;
    border-bottom-color: #93c5fd;
    background-color: rgba(96, 165, 250, 0.1);
}

/* Term definition styles */
.term-definition {
    position: relative;
    cursor: help;
    color: #059669;
    font-weight: 500;
    border-bottom: 1px dotted currentColor;
    transition: all 0.2s ease;
}

.dark .term-definition {
    color: #34d399;
}

/* Active state for tooltip elements */
.term-definition.tooltip-active,
.tag-tooltip.tooltip-active,
.health-marker-tooltip.tooltip-active {
    background-color: rgba(5, 150, 105, 0.1);
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
}

.dark .term-definition.tooltip-active,
.dark .tag-tooltip.tooltip-active,
.dark .health-marker-tooltip.tooltip-active {
    background-color: rgba(52, 211, 153, 0.1);
}

/* Mobile-friendly tooltip styles */
.mobile-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    max-width: 320px;
    min-width: 200px;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s ease-out;
    pointer-events: auto;
}

.mobile-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode tooltip */
.mobile-tooltip.dark {
    background: #f9fafb;
    color: #1f2937;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Tooltip arrow */
.mobile-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 1001;
}

.mobile-tooltip.dark::before {
    border-top-color: #f9fafb;
}

/* Tooltip positioned below */
.mobile-tooltip.below::before {
    top: -12px;
    border-top: none;
    border-bottom: 6px solid #1f2937;
}

.mobile-tooltip.dark.below::before {
    border-bottom-color: #f9fafb;
}

/* Arrow positioning adjustments */
.mobile-tooltip.arrow-left::before {
    left: 20px;
}

.mobile-tooltip.arrow-right::before {
    left: calc(100% - 20px);
}

/* Tooltip animation - removed as no longer needed */

/* Tag tooltip styles */
.tag-tooltip {
    position: relative;
    cursor: help;
}

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

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .print-break {
        page-break-before: always;
    }
}

.goal-analysis-container {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.goal-analysis-card {
  background: linear-gradient(90deg, #f3e8ff 0%, #dbeafe 100%);
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px rgba(80, 0, 120, 0.08);
  padding: 1.5rem 2rem;
  border: 1.5px solid #a78bfa;
}
.goal-analysis-card.dark {
  background: linear-gradient(90deg, #6d28d9 0%, #1e293b 100%);
  border-color: #7c3aed;
}
.goal-toggle-btn {
  background: #ede9fe;
  color: #6d28d9;
  border: none;
  border-radius: 9999px;
  padding: 0.25rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.goal-toggle-btn:hover {
  background: #c4b5fd;
}
.goal-analysis-details {
  color: #4b5563;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  border-top: 1px solid #ddd6fe;
  padding-top: 0.75rem;
}
@media (max-width: 700px) {
  .goal-analysis-card {
    padding: 1rem 0.5rem;
  }
}

/* Home Page Animations and Enhancements */

/* Blob Animation */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Fade In Animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out;
}

/* Slide Up Animation */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.8s ease-out;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

/* Feature Tab Styles */
.feature-tab {
    position: relative;
    transition: all 0.3s ease;
}

.feature-tab:hover {
    background-color: rgba(147, 51, 234, 0.05);
}

.feature-tab.active {
    background-color: rgba(147, 51, 234, 0.05);
}

/* Enhanced Button Styles */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Counter Styles */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Enhanced Card Hover Effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Search Dropdown */
#searchDropdown {
    max-height: 400px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#searchResults {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f3f4f6;
}

#searchResults::-webkit-scrollbar {
    width: 6px;
}

#searchResults::-webkit-scrollbar-track {
    background: #f3f4f6;
}

#searchResults::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dark #searchResults::-webkit-scrollbar-track {
    background: #374151;
}

.dark #searchResults::-webkit-scrollbar-thumb {
    background: #6b7280;
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Feature Content Animation */
.feature-content {
    animation: fade-in 0.4s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .animate-blob {
        animation: blob 10s infinite;
    }

    .text-7xl {
        font-size: 3rem;
    }

    .text-5xl {
        font-size: 2.5rem;
    }
}

/* Compound Filter Buttons */
.compound-filter {
    background-color: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    z-index: 20;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.dark .compound-filter {
    background-color: rgba(55, 65, 81, 0.8);
    color: var(--gray-300);
    border-color: var(--gray-600);
}

.compound-filter:hover {
    background-color: var(--gray-200);
    border-color: var(--gray-400);
}

.dark .compound-filter:hover {
    background-color: rgba(75, 85, 99, 0.8);
    border-color: var(--gray-500);
}

.compound-filter.active {
    background-color: var(--purple-600);
    color: white;
    border-color: var(--purple-700);
}

.dark .compound-filter.active {
    background-color: var(--purple-500);
    color: white;
    border-color: var(--purple-600);
}

.compound-filter.active:hover {
    background-color: var(--purple-700);
    border-color: var(--purple-800);
}

.dark .compound-filter.active:hover {
    background-color: var(--purple-600);
    border-color: var(--purple-700);
}

/* Compound Card Styling */
.compound-card {
    position: relative;
}

.compound-card.recommended {
    border-color: #10b981;
    background: linear-gradient(to bottom right, #f0fdf4, #dcfce7);
}

.dark .compound-card.recommended {
    border-color: #059669;
    background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}

/* Compound Type Sections */
.compound-section-header {
    background: linear-gradient(to right, #f3f4f6, #e5e7eb);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.dark .compound-section-header {
    background: linear-gradient(to right, #374151, #4b5563);
    color: #e5e7eb;
}

.compound-section-header.anabolic {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    color: #991b1b;
}

.dark .compound-section-header.anabolic {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    color: #fca5a5;
}

.compound-section-header.ancillary {
    background: linear-gradient(to right, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.dark .compound-section-header.ancillary {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    color: #93bbfc;
}

.compound-section-header.peptide {
    background: linear-gradient(to right, #f3e8ff, #e9d5ff);
    color: #6b21a8;
}

.dark .compound-section-header.peptide {
    background: linear-gradient(to right, rgba(147, 51, 234, 0.2), rgba(124, 58, 237, 0.2));
    color: #c4b5fd;
}

/* Compound Type Tabs */
.compound-type-tab {
  border-color: transparent;
  color: var(--gray-500);
}

.dark .compound-type-tab {
  color: var(--gray-400);
}

.compound-type-tab:hover {
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.dark .compound-type-tab:hover {
  color: var(--gray-300);
  border-color: var(--gray-600);
}

.compound-type-tab.active {
  color: var(--purple-600);
  border-color: var(--purple-600);
}

.dark .compound-type-tab.active {
  color: var(--purple-400);
  border-color: var(--purple-400);
}

/* Compounds Container */
.compounds-container {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) var(--gray-100);
}

.dark .compounds-container {
  scrollbar-color: var(--gray-600) var(--gray-800);
}

.compounds-container::-webkit-scrollbar {
  width: 8px;
}

.compounds-container::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

.dark .compounds-container::-webkit-scrollbar-track {
  background: var(--gray-800);
}

.compounds-container::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.dark .compounds-container::-webkit-scrollbar-thumb {
  background: var(--gray-600);
}

.compounds-container::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

.dark .compounds-container::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

  .tutorial-tooltip {
    position: absolute;
    z-index: 10001;
    background: #1e40af;
    color: white;
    padding: 16px;
    border-radius: 8px;
    max-width: 280px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
    opacity: 1;
    transition: all 0.3s ease;
  }

  .tutorial-tooltip:before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1e40af;
  }

  .tutorial-tooltip.top {
    transform: translateY(-8px);
  }

  .tutorial-tooltip.top:before {
    top: 100%;
    border-top-color: #1e40af;
    border-bottom: none;
  }

  .tutorial-tooltip.bottom {
    transform: translateY(8px);
  }

  .tutorial-tooltip.bottom:before {
    top: -16px;
    border-top: none;
    border-bottom-color: #1e40af;
  }

  .tutorial-tooltip.left {
    transform: translateX(-8px);
  }

  .tutorial-tooltip.left:before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #1e40af;
    border-right: none;
  }

  .tutorial-tooltip.right {
    transform: translateX(8px);
  }

  .tutorial-tooltip.right:before {
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #1e40af;
    border-left: none;
  }

  .modal-content {
    max-width: 500px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  }

  .dark .modal-content {
    background: #1f2937;
  }

  @media (max-width: 640px) {
    .modal-content {
      max-width: 90%;
      padding: 1.5rem;
    }
  }
