// 优化建议详情弹窗样式

// 弹窗遮罩层
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

// 弹窗内容容器
.modal-content {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.suggestion-detail-modal {
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  
  .modal-header {
    padding: 24px 32px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(#007aff, 0.08), rgba(#007aff, 0.03));
    
    h3 {
      margin: 0;
      font-size: 24px;
      font-weight: 700;
      background: linear-gradient(135deg, #007aff, #0051d5);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    
    .close-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      background: rgba(#ff3b30, 0.1);
      color: #ff3b30;
      font-size: 24px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      
      &:hover {
        background: #ff3b30;
        color: white;
        transform: rotate(90deg);
      }
    }
  }
  
  .modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    
    .detail-section {
      margin-bottom: 32px;
      padding: 24px;
      background: linear-gradient(135deg, rgba(#f8f9fa, 0.5), rgba(#ffffff, 0.8));
      border-radius: 16px;
      border: 1px solid #e0e0e0;
      
      &:last-child {
        margin-bottom: 0;
      }
      
      .section-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid rgba(#007aff, 0.2);
        
        h4 {
          margin: 0;
          font-size: 18px;
          font-weight: 700;
          color: #1a1a1a;
        }
      }
    }
    
    // 概览部分
    .overview-section {
      .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        
        .info-item {
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 12px 16px;
          background: white;
          border-radius: 12px;
          border: 1px solid #e0e0e0;
          
          .label {
            font-weight: 600;
            color: #666;
            min-width: 70px;
          }
          
          .value {
            color: #1a1a1a;
            font-weight: 500;
            
            &.priority-badge {
              padding: 4px 12px;
              border-radius: 16px;
              font-size: 13px;
              font-weight: 600;
              
              &.high {
                background: rgba(#ff3b30, 0.15);
                color: #ff3b30;
                border: 1px solid rgba(#ff3b30, 0.3);
              }
              
              &.medium {
                background: rgba(#ff9500, 0.15);
                color: #ff9500;
                border: 1px solid rgba(#ff9500, 0.3);
              }
              
              &.low {
                background: rgba(#34c759, 0.15);
                color: #34c759;
                border: 1px solid rgba(#34c759, 0.3);
              }
            }
            
            &.improvement {
              color: #007aff;
              font-weight: 700;
            }
            
            &.status-badge {
              padding: 4px 12px;
              border-radius: 16px;
              font-size: 13px;
              font-weight: 600;
              background: rgba(#ff9500, 0.15);
              color: #ff9500;
              border: 1px solid rgba(#ff9500, 0.3);
              
              &.accepted {
                background: rgba(#34c759, 0.15);
                color: #34c759;
                border: 1px solid rgba(#34c759, 0.3);
              }
            }
          }
        }
      }
    }
    
    // 问题分析部分
    .problem-section {
      .problem-content {
        .problem-text {
          font-size: 15px;
          line-height: 1.8;
          color: #333;
          margin: 0 0 20px 0;
          padding: 16px;
          background: white;
          border-radius: 12px;
          border-left: 4px solid #ff3b30;
        }
        
        .data-points-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
          gap: 16px;
          
          .data-point-card {
            padding: 16px;
            background: white;
            border-radius: 12px;
            border: 2px solid #e0e0e0;
            text-align: center;
            transition: all 0.3s ease;
            
            &:hover {
              transform: translateY(-2px);
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            }
            
            &.warning {
              border-color: #ff3b30;
              background: rgba(#ff3b30, 0.05);
            }
            
            .data-label {
              font-size: 13px;
              color: #666;
              margin-bottom: 8px;
            }
            
            .data-value {
              font-size: 20px;
              font-weight: 700;
              color: #1a1a1a;
            }
          }
        }
      }
    }
    
    // 优化方案部分
    .solution-section {
      .solution-content {
        .solution-text {
          font-size: 15px;
          line-height: 1.8;
          color: #333;
          margin: 0;
          padding: 16px;
          background: white;
          border-radius: 12px;
          border-left: 4px solid #007aff;
        }
      }
    }
    
    // 行动计划部分
    .action-plan-section {
      .action-plan-content {
        .action-steps {
          list-style: none;
          padding: 0;
          margin: 0;
          
          .action-step-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 16px;
            margin-bottom: 12px;
            background: white;
            border-radius: 12px;
            border: 1px solid #e0e0e0;
            transition: all 0.3s ease;
            
            &:last-child {
              margin-bottom: 0;
            }
            
            &:hover {
              transform: translateX(4px);
              border-color: #007aff;
              box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
            }
            
            .step-number {
              display: flex;
              align-items: center;
              justify-content: center;
              width: 28px;
              height: 28px;
              background: linear-gradient(135deg, #007aff, #0051d5);
              color: white;
              border-radius: 50%;
              font-weight: 700;
              font-size: 14px;
              flex-shrink: 0;
            }
            
            .step-text {
              flex: 1;
              font-size: 15px;
              line-height: 1.6;
              color: #333;
            }
          }
        }
      }
    }
    
    // 参考案例部分
    .references-section {
      .references-content {
        .reference-tags {
          display: flex;
          flex-wrap: wrap;
          gap: 12px;
          
          .reference-tag {
            padding: 8px 16px;
            background: linear-gradient(135deg, rgba(#34c759, 0.15), rgba(#34c759, 0.08));
            color: #34c759;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            border: 1px solid rgba(#34c759, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
            
            &:hover {
              transform: translateY(-2px);
              box-shadow: 0 4px 8px rgba(52, 199, 89, 0.3);
              background: linear-gradient(135deg, rgba(#34c759, 0.25), rgba(#34c759, 0.15));
            }
          }
        }
      }
    }
  }
  
  .modal-footer {
    padding: 20px 32px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    background: linear-gradient(135deg, rgba(#f8f9fa, 0.3), rgba(#ffffff, 0.5));
    
    .btn {
      padding: 12px 32px;
      border: none;
      border-radius: 24px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      
      &:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      }
      
      &.btn-primary {
        background: linear-gradient(135deg, #007aff, #0051d5);
        color: white;
      }
      
      &.btn-secondary {
        background: linear-gradient(135deg, #8e8e93, #636366);
        color: white;
      }
      
      &.btn-success {
        background: linear-gradient(135deg, #34c759, #248a3d);
        color: white;
        opacity: 0.7;
        cursor: not-allowed;
      }
      
      i {
        font-size: 14px;
      }
    }
  }
}

// 动画效果
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

// 响应式
@media (max-width: 768px) {
  .suggestion-detail-modal {
    max-width: 95%;
    max-height: 95vh;
    
    .modal-header {
      padding: 16px 20px;
      
      h3 {
        font-size: 20px;
      }
    }
    
    .modal-body {
      padding: 20px;
      
      .detail-section {
        padding: 16px;
        
        .info-grid {
          grid-template-columns: 1fr;
        }
        
        .data-points-grid {
          grid-template-columns: 1fr;
        }
      }
    }
    
    .modal-footer {
      padding: 16px 20px;
      flex-direction: column;
      
      .btn {
        width: 100%;
        justify-content: center;
      }
    }
  }
}

