/* Case Detail Page - Legora-inspired Design */
/* All styles scoped to .case-detail-page to avoid affecting other pages */

/* =====================================================
   GLOBAL SIDEBAR FIX - Light theme for all case pages
   ===================================================== */

/* Fix the old Bulma menu sidebar to be light */
.column.is-one-quarter {
  background: transparent !important;
}

.column.is-one-quarter .menu {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.column.is-one-quarter .heading {
  color: #6B7280 !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.column.is-one-quarter .title {
  color: #1a1a2e !important;
  font-family: 'Playfair Display', Georgia, serif;
  margin-bottom: 20px;
}

.column.is-one-quarter .menu-label {
  color: #6B7280 !important;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 16px;
}

.column.is-one-quarter .menu-list a {
  color: #374151 !important;
  background: #F8FAFC !important;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.column.is-one-quarter .menu-list a:hover {
  background: #E5E7EB !important;
  color: #1a1a2e !important;
}

.column.is-one-quarter .menu-list .icon {
  color: #6B7280 !important;
}

.column.is-one-quarter .menu-list a:hover .icon {
  color: #1a1a2e !important;
}

.column.is-one-quarter .menu-list .level {
  margin-bottom: 0;
}

.column.is-one-quarter .menu-list .tag {
  background: #EEF2FF !important;
  color: #6366F1 !important;
  border-radius: 20px;
  font-size: 0.7rem;
}

.column.is-one-quarter .input {
  background: #F9FAFB !important;
  border: 2px solid #E5E7EB !important;
  border-radius: 8px !important;
  color: #1a1a2e !important;
}

.column.is-one-quarter .input:focus {
  background: #FFFFFF !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.column.is-one-quarter .button.is-primary {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  border: none !important;
  color: white !important;
  border-radius: 8px !important;
}

.column.is-one-quarter .button.is-primary:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

/* Section background for legal_case layout */
body .section {
  background: #F8FAFC;
}

/* Breadcrumb styling */
.breadcrumb {
  background: transparent !important;
}

.breadcrumb a {
  color: #6366F1 !important;
}

.breadcrumb li + li::before {
  color: #9CA3AF !important;
}

/* =====================================================
   END GLOBAL SIDEBAR FIX
   ===================================================== */

.case-detail-page {
  min-height: 100vh;
  background: #F8FAFC;
  padding: 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Breadcrumb */
.case-detail-page .case-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.875rem;
}

.case-detail-page .case-breadcrumb a {
  color: #6366F1;
  text-decoration: none;
  font-weight: 500;
}

.case-detail-page .case-breadcrumb a:hover {
  text-decoration: underline;
}

.case-detail-page .case-breadcrumb .separator {
  color: #9CA3AF;
}

.case-detail-page .case-breadcrumb .current {
  color: #6B7280;
}

/* Case Layout */
.case-detail-page .case-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */
.case-detail-page .case-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-detail-page .case-header-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 28px;
  color: white;
}

.case-detail-page .case-number {
  display: inline-block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.case-detail-page .case-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.2;
}

.case-detail-page .case-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.case-detail-page .case-status.active {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
}

.case-detail-page .case-status.closed {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.case-detail-page .case-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
}

/* Sidebar Cards */
.case-detail-page .sidebar-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.case-detail-page .sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
}

.case-detail-page .sidebar-description {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0 0 12px;
}

.case-detail-page .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.case-detail-page .card-header .sidebar-title {
  margin: 0;
}

.case-detail-page .btn-small {
  padding: 6px 14px;
  background: #10B981;
  color: white;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.case-detail-page .btn-small:hover {
  background: #059669;
  color: white;
}

.case-detail-page .sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #1a1a2e;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.case-detail-page .sidebar-link:hover {
  background: #F1F5F9;
  color: #1a1a2e;
}

.case-detail-page .link-icon {
  font-size: 1rem;
}

/* SVG Icons in sidebar */
.case-detail-page .sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #6B7280;
}

.case-detail-page .sidebar-link:hover .sidebar-icon {
  color: #1a1a2e;
}

.case-detail-page .sidebar-link-full {
  display: block;
  padding: 12px 16px;
  background: #F1F5F9;
  color: #374151;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  margin-top: 8px;
  transition: all 0.2s ease;
}

.case-detail-page .sidebar-link-full:hover {
  background: #E2E8F0;
  color: #1a1a2e;
}

.case-detail-page .sidebar-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  font-size: 0.875rem;
  background: #F9FAFB;
  transition: all 0.2s ease;
}

.case-detail-page .sidebar-input:focus {
  outline: none;
  border-color: #10B981;
  background: white;
}

.case-detail-page .empty-text {
  color: #9CA3AF;
  font-size: 0.875rem;
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

/* Main Content */
.case-detail-page .case-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-detail-page .content-card {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}

.case-detail-page .card-header-main {
  padding: 24px 28px;
  border-bottom: 1px solid #E5E7EB;
}

.case-detail-page .card-header-main h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.case-detail-page .card-body {
  padding: 32px 28px;
}

.case-detail-page .card-actions {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #E5E7EB;
}

/* Empty State */
.case-detail-page .empty-state {
  text-align: center;
  padding: 48px 24px;
}

.case-detail-page .empty-icon-container {
  width: 80px;
  height: 80px;
  background: #F1F5F9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.case-detail-page .empty-icon-container svg {
  width: 40px;
  height: 40px;
  color: #9CA3AF;
}

.case-detail-page .empty-state p {
  color: #6B7280;
  margin-bottom: 24px;
  font-size: 1rem;
}

/* Parties List */
.case-detail-page .parties-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-detail-page .party-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #F8FAFC;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.case-detail-page .party-item:hover {
  background: #F1F5F9;
}

/* Party Avatar */
.case-detail-page .party-avatar {
  width: 44px;
  height: 44px;
  background: #E5E7EB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.case-detail-page .party-avatar svg {
  width: 24px;
  height: 24px;
  color: #6B7280;
}

.case-detail-page .party-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-detail-page .party-name {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 1rem;
}

.case-detail-page .party-role {
  font-size: 0.875rem;
  color: #6B7280;
}

/* Files List */
.case-detail-page .files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-detail-page .file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #F8FAFC;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.case-detail-page .file-item:hover {
  background: #F1F5F9;
}

/* File Icon Container */
.case-detail-page .file-icon-container {
  width: 44px;
  height: 44px;
  background: #EEF2FF;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.case-detail-page .file-icon-container svg {
  width: 24px;
  height: 24px;
  color: #6366F1;
}

.case-detail-page .file-name {
  font-weight: 500;
  color: #1a1a2e;
  font-size: 1rem;
}

/* Buttons */
.case-detail-page .btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.case-detail-page .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  color: white;
}

.case-detail-page .btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  background: white;
  color: #374151;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.case-detail-page .btn-secondary:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #1a1a2e;
}

/* Header with action */
.case-detail-page .header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.case-detail-page .header-with-action h2 {
  margin: 0;
}

/* Timeline */
.case-detail-page .timeline {
  position: relative;
  padding-left: 24px;
}

.case-detail-page .timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #E5E7EB;
}

.case-detail-page .timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.case-detail-page .timeline-item:last-child {
  padding-bottom: 0;
}

.case-detail-page .timeline-marker {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6366F1;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px #E5E7EB;
}

.case-detail-page .timeline-marker.hearing {
  background: #8B5CF6;
}

.case-detail-page .timeline-marker.filing {
  background: #6366F1;
}

.case-detail-page .timeline-marker.deadline {
  background: #EF4444;
}

.case-detail-page .timeline-marker.meeting {
  background: #10B981;
}

.case-detail-page .timeline-marker.court_date {
  background: #F59E0B;
}

.case-detail-page .timeline-marker.deposition {
  background: #EC4899;
}

.case-detail-page .timeline-marker.other {
  background: #6B7280;
}

.case-detail-page .timeline-content {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 16px 20px;
}

.case-detail-page .timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.case-detail-page .event-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-detail-page .event-type-badge.hearing {
  background: #EDE9FE;
  color: #7C3AED;
}

.case-detail-page .event-type-badge.filing {
  background: #EEF2FF;
  color: #6366F1;
}

.case-detail-page .event-type-badge.deadline {
  background: #FEE2E2;
  color: #DC2626;
}

.case-detail-page .event-type-badge.meeting {
  background: #D1FAE5;
  color: #059669;
}

.case-detail-page .event-type-badge.court_date {
  background: #FEF3C7;
  color: #D97706;
}

.case-detail-page .event-type-badge.deposition {
  background: #FCE7F3;
  color: #DB2777;
}

.case-detail-page .event-type-badge.other {
  background: #F3F4F6;
  color: #4B5563;
}

.case-detail-page .event-date {
  font-size: 0.8125rem;
  color: #6B7280;
}

.case-detail-page .event-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 4px;
}

.case-detail-page .event-title a {
  color: #1a1a2e;
  text-decoration: none;
}

.case-detail-page .event-title a:hover {
  color: #6366F1;
}

.case-detail-page .event-description {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* File Badges */
.case-detail-page .file-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-detail-page .file-badge.evidence {
  background: #EEF2FF;
  color: #6366F1;
}

.case-detail-page .file-badge.legislation {
  background: #EDE9FE;
  color: #7C3AED;
}

.case-detail-page .file-badge.caselaw {
  background: #FEF3C7;
  color: #D97706;
}

.case-detail-page .file-badge.pleading {
  background: #D1FAE5;
  color: #059669;
}

.case-detail-page .file-badge.affidavit {
  background: #FCE7F3;
  color: #DB2777;
}

/* File Party */
.case-detail-page .file-party {
  font-size: 0.8125rem;
  color: #6B7280;
  margin-top: 4px;
  display: block;
}

/* File Actions */
.case-detail-page .file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-detail-page .file-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #F1F5F9;
  border-radius: 8px;
  color: #6B7280;
  transition: all 0.2s ease;
}

.case-detail-page .file-action-btn:hover {
  background: #E5E7EB;
  color: #1a1a2e;
}

/* Small Buttons */
.case-detail-page .btn-sm {
  padding: 10px 16px !important;
  font-size: 0.875rem !important;
}

.case-detail-page .btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: white;
  color: #374151;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.case-detail-page .btn-secondary:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #1a1a2e;
}

/* Header Actions */
.case-detail-page .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Case Info Item */
.case-detail-page .case-info-item {
  margin-bottom: 12px;
}

.case-detail-page .case-info-item:last-child {
  margin-bottom: 0;
}

.case-detail-page .info-label {
  display: block;
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-bottom: 4px;
}

.case-detail-page .info-value {
  display: block;
  font-size: 0.9375rem;
  color: #1a1a2e;
  font-weight: 500;
}

/* Prose Content */
.case-detail-page .prose {
  color: #374151;
  line-height: 1.75;
}

.case-detail-page .prose h1,
.case-detail-page .prose h2,
.case-detail-page .prose h3 {
  color: #1a1a2e;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.case-detail-page .prose p {
  margin-bottom: 1em;
}

.case-detail-page .prose ul,
.case-detail-page .prose ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

/* Responsive */
@media (max-width: 1024px) {
  .case-detail-page .case-layout {
    grid-template-columns: 1fr;
  }

  .case-detail-page .case-sidebar {
    order: -1;
  }
}

@media (max-width: 640px) {
  .case-detail-page {
    padding: 16px;
  }

  .case-detail-page .case-header-card {
    padding: 20px;
  }

  .case-detail-page .case-title {
    font-size: 1.5rem;
  }

  .case-detail-page .card-body {
    padding: 24px 20px;
  }

  .case-detail-page .card-header-main {
    padding: 20px;
  }

  .case-detail-page .empty-state {
    padding: 32px 16px;
  }

  .case-detail-page .btn-primary,
  .case-detail-page .btn-secondary {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}
