/* Chronic Illness Show Page Styles */

/* Hero Section Gradient Background */
.chronic-illness-hero {
  background: linear-gradient(135deg, var(--chronic-illness-color, #6366f1) 0%, rgba(99, 102, 241, 0.8) 50%, rgba(99, 102, 241, 0.6) 100%);
  position: relative;
  overflow: hidden;
}

.chronic-illness-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

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

.chronic-illness-content > * {
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
}

.chronic-illness-content > *:nth-child(1) { animation-delay: 0.1s; }
.chronic-illness-content > *:nth-child(2) { animation-delay: 0.2s; }
.chronic-illness-content > *:nth-child(3) { animation-delay: 0.3s; }
.chronic-illness-content > *:nth-child(4) { animation-delay: 0.4s; }
.chronic-illness-content > *:nth-child(5) { animation-delay: 0.5s; }
.chronic-illness-content > *:nth-child(6) { animation-delay: 0.6s; }
.chronic-illness-content > *:nth-child(7) { animation-delay: 0.7s; }
.chronic-illness-content > *:nth-child(8) { animation-delay: 0.8s; }

/* Card Hover Effects */
.chronic-illness-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Food Card Enhancements */
.food-card {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.food-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.food-card:hover::before {
  left: 100%;
}

.food-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Healing Foods Card */
.healing-foods-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
  border: 2px solid #86efac;
  box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.1), 0 2px 4px -1px rgba(34, 197, 94, 0.06);
}

/* Aggravating Foods Card */
.aggravating-foods-card {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
  border: 2px solid #fca5a5;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1), 0 2px 4px -1px rgba(239, 68, 68, 0.06);
}

/* Stat Card Styles */
.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--chronic-illness-color, #6366f1), rgba(99, 102, 241, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Icons */
.section-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
}

/* Healing Plan Template Card */
.healing-plan-template-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
}

.healing-plan-template-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--chronic-illness-color, #6366f1), rgba(99, 102, 241, 0.5));
  border-radius: 0 4px 4px 0;
}

.healing-plan-template-card:hover {
  border-color: var(--chronic-illness-color, #6366f1);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid (no backdrop-filter): a blur on a sticky element forces Chrome onto
     main-thread scrolling, repainting the whole page every scroll frame. */
  background: rgb(252, 250, 245);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Breadcrumb Styles */
.breadcrumb-item {
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: var(--chronic-illness-color, #6366f1);
}

/* Tab Styles - Using DaisyUI tabs-border with radio inputs and labels */
.tabs-border {
  border-bottom: 1px solid hsl(var(--bc) / 0.2);
  display: flex;
  flex-wrap: nowrap;
}

.tabs-border .tab[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.tabs-border .tab-label {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.tabs-border .tab[type="radio"]:checked + .tab-label {
  font-weight: 600;
  border-bottom-color: hsl(var(--p));
  color: hsl(var(--p));
}

.tabs-border .tab-label:hover {
  color: hsl(var(--p) / 0.8);
}

/* Print Styles */
@media print {
  .chronic-illness-hero,
  .sticky-header,
  .no-print {
    display: none;
  }
  
  .chronic-illness-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .stat-number {
    font-size: 2rem;
  }
  
  .chronic-illness-content > * {
    animation-delay: 0s !important;
  }
}

/* Pulse Animation for Badges */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Section Divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  margin: 2rem 0;
}

/* Decorative Corner */
.decorative-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, transparent 50%, rgba(99, 102, 241, 0.05) 50%);
  border-radius: 0 0 0 100%;
}

