/* iOS风格案例详情面板样式 */

.case-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: #ffffff;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e5e5e7;
  
  /* iOS风格滚动 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  &::-webkit-scrollbar {
    display: none;
  }
}

/* 面板头部 */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #f5f5f7;
  border-bottom: 1px solid #e5e5e7;
  position: sticky;
  top: 0;
  z-index: 10;
  
  .panel-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
  }
  
  .close-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: #86868b;
    transition: all 0.2s ease;
    
    &:hover {
      background: rgba(0, 0, 0, 0.1);
      color: #1d1d1f;
    }
    
    &:active {
      transform: scale(0.95);
    }
  }
}

/* 面板内容 */
.panel-content {
  flex: 1;
  padding: 0;
  overflow-y: auto;
}

/* 封面图片 */
.cover-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  
  .cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    
    .case-badges {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      
      .badge {
        padding: 6px 12px;
        border-radius: 16px;
        font-size: 12px;
        font-weight: 500;
        color: white;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
      }
    }
  }
}

/* 基本信息 */
.basic-info {
  padding: 24px;
  border-bottom: 1px solid #f2f2f7;
  
  .case-name {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
    line-height: 1.3;
  }
  
  .meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    
    .meta-item {
      display: flex;
      align-items: center;
      gap: 12px;
      
      svg {
        color: #86868b;
        flex-shrink: 0;
      }
      
      .meta-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        
        .meta-label {
          font-size: 12px;
          color: #86868b;
          font-weight: 400;
        }
        
        .meta-value {
          font-size: 14px;
          color: #1d1d1f;
          font-weight: 500;
        }
        
        .team-badge {
          font-size: 11px;
          color: #007aff;
          background: rgba(0, 122, 255, 0.1);
          padding: 2px 6px;
          border-radius: 4px;
          margin-top: 2px;
        }
      }
    }
  }
}

/* 分区标题 */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  padding: 0 24px;
}

/* 风格标签 */
.style-section {
  padding: 24px 24px 0 24px;
  
  .style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    
    .style-tag {
      padding: 8px 16px;
      background: #f2f2f7;
      border-radius: 20px;
      font-size: 14px;
      color: #1d1d1f;
      font-weight: 500;
      border: 1px solid #e5e5e7;
    }
  }
}

/* 客户评价 */
.review-section {
  padding: 24px;
  border-top: 1px solid #f2f2f7;
  
  .review-content {
    position: relative;
    
    .quote-icon {
      position: absolute;
      top: -8px;
      left: -12px;
      font-size: 48px;
      color: #f2f2f7;
      font-weight: 600;
      line-height: 1;
    }
    
    .review-text {
      font-size: 16px;
      line-height: 1.6;
      color: #1d1d1f;
      margin: 0;
      font-style: italic;
      position: relative;
      z-index: 1;
    }
  }
}

/* 内部信息 */
.internal-section {
  padding: 24px;
  background: #f5f5f7;
  border-radius: 12px;
  margin: 24px;
  
  .internal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    
    .internal-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
      
      .internal-label {
        font-size: 12px;
        color: #86868b;
        font-weight: 400;
      }
      
      .internal-value {
        font-size: 16px;
        color: #1d1d1f;
        font-weight: 600;
      }
      
      .internal-badge {
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 500;
        color: white;
        background: #34c759;
        
        &.excellent {
          background: #ff9500;
        }
      }
    }
  }
}

/* 面板底部 */
.panel-footer {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid #e5e5e7;
  display: flex;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 10;
  
  .btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    
    &:active {
      transform: scale(0.98);
    }
    
    &.btn-secondary {
      background: #f2f2f7;
      color: #1d1d1f;
      
      &:hover {
        background: #e5e5e7;
      }
    }
    
    &.btn-primary {
      background: #007aff;
      color: white;
      
      &:hover {
        background: #0051a8;
      }
      
      &.active {
        background: #34c759;
        
        &:hover {
          background: #248a3d;
        }
      }
    }
  }
}

/* 响应式设计 */
@media (max-width: 480px) {
  .case-detail-panel {
    width: 100%;
    right: 0;
    left: 0;
    border-left: none;
    border-right: none;
  }
  
  .basic-info {
    .meta-grid {
      grid-template-columns: 1fr;
    }
  }
  
  .internal-section {
    .internal-grid {
      grid-template-columns: 1fr;
    }
  }
}

/* iOS风格动画 */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.case-detail-panel {
  animation: slideInRight 0.3s ease-out;
  
  &.closing {
    animation: slideOutRight 0.3s ease-in;
  }
}