/* 案件详情页面样式 - OPPO-inspired clean & modern design */

body {
  background-color: #f7f9fc;
}

.page-body-wrapper {
  padding-top: 20px;
  min-height: calc(100vh - 300px);
  padding-bottom: 40px;
}

.case-detail-wrapper {
  max-width: 1500px; /* Increased max-width for a grander feel */
  margin: 0 auto;
  padding: 0 20px;
  animation: fadeIn 0.5s ease-out forwards;
  position: relative;
}

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

/* --- Top Combined Card --- */
.top-combined-card {
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

/* --- Header Section --- */
.case-header {
  padding: 30px 40px 20px 40px;
  position: relative;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.case-header .case-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0;
  width: 100%;
  max-width: 760px;
  flex: none;
}

.case-header .case-update-time {
  display: block;
  width: 100%;
  font-size: 12px;
  color: var(--text-color2);
  line-height: 1.6;
  text-align: center;
}

.floating-actions {
  position: absolute;
  top: 30px;
  right: 40px;
}

.floating-actions .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  background-color: #fe9906;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  border: none;
}

.floating-actions .share-btn:hover {
  background-color: #e58a05;
}

/* --- Info Grid Section --- */
.info-grid-container {
  padding: 0 40px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #f0f2f5;
}

.grid-item {
  padding: 24px 20px;
  border-right: 1px solid #f0f2f5;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.grid-item:nth-child(4n) {
  border-right: none;
}

/* Top border for second row */
.grid-item:nth-child(n+5) {
  border-top: 1px solid #f0f2f5;
}

.grid-item .label {
  font-size: 12px;
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  flex-shrink: 0;
}

.grid-item .value {
  font-size: 12px;
  color: var(--text-color2);
  font-weight: 400;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.grid-item .value.brand-color {
  color: #fe9906;
  font-weight: 600;
}

.grid-item .value.complaint-link {
  color: var(--text-color2);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.grid-item .value.complaint-link:hover {
  background-color: transparent;
  color: #fe9906;
}

.law-firm-item {
  position: relative;
}

.law-firm-value {
  cursor: pointer;
  display: inline-block;
  max-width: calc(100% - 80px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.law-tooltip {
  position: absolute;
  top: calc(100% + 5px);
  left: 80px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  font-size: 12px;
  color: var(--text-color);
  max-width: 300px;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.6;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.law-firm-item:hover .law-tooltip {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

/* --- Top Card Footer --- */
.top-card-footer {
  padding: 20px 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: #ffffff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.footer-left {
  font-size: 13px;
  color: #8c92a4;
}

.footer-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.action-btn i {
  font-size: 14px;
}

.update-btn {
  background-color: #fe9906;
  color: #ffffff;
}

.update-btn:hover {
  background-color: #e58a05;
}

.collect-btn, .download-btn {
  background-color: #f5f7fa;
  color: #4a4a4a;
  border: 1px solid #eef0f4;
}

.collect-btn:hover, .download-btn:hover {
  background-color: #eef0f4;
  color: #1a1a1a;
}

/* --- Content Sections (Intro & Process) --- */
.detail-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px 40px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 24px;
  height: 3px;
  background-color: #fe9906;
  border-radius: 2px;
}

/* --- Case Intro --- */
.content-box {
  background-color: #fafbfc;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #f0f2f5;
}

.case-intro {
  font-size: 12px;
  color: var(--text-color2);
  line-height: 1.6;
  margin: 0;
  white-space: pre-line;
  flex: 1;
}

.intro-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* --- Timeline Process --- */
.process-timeline {
  position: relative;
  padding-left: 20px;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 26px;
  width: 2px;
  background-color: #f0f2f5;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-left: 32px;
}

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

.timeline-dot {
  position: absolute;
  left: 3px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #1a3c6d;
  z-index: 2;
  box-shadow: 0 0 0 4px #ffffff;
}

.timeline-date {
  font-size: 12px;
  color: var(--text-color2);
  font-weight: 500;
  margin-bottom: 8px;
}

.timeline-card {
  background-color: #ffffff;
  border: 1px solid #f0f2f5;
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  border-color: #eef0f4;
}

.process-content {
  font-size: 12px;
  color: var(--text-color2);
  line-height: 1.6;
  white-space: pre-line;
  flex: 1;
}

.process-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.action-bar {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #f0f2f5;
  display: flex;
  justify-content: flex-end;
}

.translate-btn {
  font-size: 12px;
  color: #fe9906;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  background-color: rgba(254, 153, 6, 0.05);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.translate-btn:hover {
  background-color: rgba(254, 153, 6, 0.1);
}

.transk {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background-color: #fafbfc;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-color);
  line-height: 1.6;
  border-left: 3px solid #fe9906;
}

.transk.show-trans {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-color2);
  font-size: 12px;
}

/* --- Footer Disclaimer --- */
.page-footer-disclaimer {
  text-align: center;
  padding: 20px 0;
}

.font-bot {
  font-size: 12px;
  color: #a0a5b5;
  line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .case-timeline::before {
    left: 20px;
  }
  .timeline-item {
    padding-left: 50px;
    width: 100%;
    margin-left: 0 !important;
  }
  .timeline-item.right {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .page-body-wrapper {
    padding-top: 10px;
  }
  .page-body-inner {
    width: 95vw;
    padding: 20px;
  }
  .case-header {
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 18px;
  }
  .case-header .case-title {
    font-size: 20px;
    flex: none;
    width: 100%;
  }
  .action-buttons {
    width: 100%;
    margin-top: 15px;
    justify-content: flex-start;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .action-buttons .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  .grid-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .grid-item .label {
    width: auto;
    margin-bottom: 4px;
    margin-right: 0;
  }
  .file-list {
    grid-template-columns: 1fr;
  }
  .grid-item:nth-child(n+2) {
    border-top: none;
  }
  
  .grid-item:last-child {
    border-bottom: none;
  }
  
  .top-card-footer {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .footer-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .action-btn {
    flex: 1;
    justify-content: center;
  }
  
  .detail-section {
    padding: 20px;
  }
  
  .process-timeline::before {
    left: 14px;
  }
  
  .timeline-item {
    padding-left: 20px;
  }
  
  .timeline-dot {
    left: -2px;
  }
  
  .law-tooltip {
    max-width: calc(100vw - 40px);
    left: 0;
  }
}
