/* Case Explorer Styles */

/* Line clamp utility for text truncation */
.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;
}

/* Smooth transitions for interactive elements */
.case-card {
  transition: all 0.3s ease;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Bookmark animation */
.bookmark-btn {
  transition: all 0.2s ease;
}

.bookmark-btn:hover {
  transform: scale(1.1);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Toast notifications */
.toast-enter {
  transform: translateX(100%);
  opacity: 0;
}

.toast-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: all 0.3s ease;
}

.toast-exit {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit-active {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Expandable details */
.expandable-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.expandable-details.expanded {
  max-height: 500px; /* Adjust as needed */
  opacity: 1;
}

/* Search input highlight */
.search-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Filter badge styling */
.filter-badge {
  transition: all 0.2s ease;
}

.filter-badge:hover {
  transform: scale(1.05);
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .case-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .case-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Skeleton loading animation */
.skeleton {
  animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    background-color: hsl(200, 20%, 80%);
  }
  100% {
    background-color: hsl(200, 20%, 95%);
  }
}

/* Focus styles for accessibility */
.focus-outline:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* Custom scrollbar for filter sidebar */
.filter-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .case-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
