/* ========================================= */
/* 🤖 KI-READINESS CHECK - STYLES */
/* Passt perfekt zum Performance Check Design */
/* ========================================= */

/* KI-Readiness Container - Gleiche Struktur wie Performance Check */
#aiReadinessVisuals {
  display: none;
  margin-top: 30px;
}

/* Overall Score Circle - Identisch zum Performance Circle */
#aiOverallScore {
  text-align: center;
  margin-bottom: 40px;
}

.ai-score-circle {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  position: relative;
}

/* Category Score Cards - Grid Layout */
#aiCategoryScores {
  display: grid !important;
  /* Erzwingt 4 Spalten am Desktop, sofern Platz da ist */
  grid-template-columns: repeat(4, 1fr) !important; 
  gap: 20px !important;
  margin-bottom: 40px !important;
  width: 100%;
}

.ai-category-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid;
  transition: all 0.3s ease;
  /* Flexbox hier hilft, den Inhalt der Karte sauber zu stapeln */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0; /* Verhindert das Ausbrechen bei langem Text */
}

.ai-category-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.ai-category-title {
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 10px;
  font-weight: 500;
}

.ai-category-score {
  font-size: 2.5em;
  font-weight: bold;
  margin: 10px 0;
}

.ai-category-max {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 15px;
}

/* Progress Bar - Wie beim Performance Check */
.ai-progress-bar {
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.ai-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Summary Box - Grüne Stärken Box */
#aiSummary {
  margin-bottom: 30px;
}

.ai-strengths-box {
  background: rgba(76, 175, 80, 0.1);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #4caf50;
}

.ai-strengths-box strong {
  color: #4caf50;
  font-size: 1.1em;
  display: block;
  margin-bottom: 15px;
}

.ai-strengths-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-strengths-box li {
  color: #4caf50;
  padding: 8px 0;
  font-size: 0.95em;
}

/* Recommendations Section */
#aiRecommendations {
  margin-bottom: 40px;
}

#aiRecommendations h3 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.3em;
  font-weight: 600;
}

#aiRecommendations h4 {
  margin-bottom: 15px;
  font-size: 1.1em;
  font-weight: 600;
}

.ai-recommendation-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  border-radius: 10px;
  border-left: 4px solid;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.ai-recommendation-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.ai-rec-category {
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1em;
}

.ai-rec-issue {
  color: #ccc;
  font-size: 0.9em;
  margin-bottom: 10px;
  line-height: 1.5;
}

.ai-rec-suggestion {
  color: #4caf50;
  font-size: 0.9em;
  line-height: 1.5;
}

/* Details Section - Collapsible */
#aiDetails {
  margin-top: 30px;
}

#aiDetails h3 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.2em;
}

.ai-detail-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.ai-detail-section h4 {
  color: #fff;
  margin: 0 0 15px 0;
  font-size: 1.05em;
  font-weight: 600;
}

.ai-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-detail-row:last-child {
  border-bottom: none;
}

.ai-detail-label {
  color: #ccc;
  font-size: 0.9em;
}

.ai-detail-value {
  color: #fff;
  font-weight: 600;
  font-size: 0.9em;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* Details Toggle (HTML <details>) */
details {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

details summary {
  cursor: pointer;
  color: #4caf50;
  font-weight: 600;
  padding: 10px 0;
  font-size: 1.05em;
  user-select: none;
  transition: color 0.3s ease;
}

details summary:hover {
  color: #66bb6a;
}

details[open] summary {
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

/* Export Button - Gleicher Stil wie Performance Export */
#exportAiTxtBtn {
  padding: 14px 28px;
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
  display: inline-block;
  margin-top: 20px;
}

#exportAiTxtBtn:hover {
  background: linear-gradient(135deg, #1976d2, #1565c0);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

#exportAiTxtBtn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
}

/* No Recommendations Message */
.ai-no-recommendations {
  background: rgba(76, 175, 80, 0.1);
  padding: 25px;
  border-radius: 10px;
  border-left: 4px solid #4caf50;
  text-align: center;
}

.ai-no-recommendations strong {
  color: #4caf50;
  font-size: 1.2em;
  display: block;
  margin-bottom: 10px;
}

.ai-no-recommendations p {
  color: #ccc;
  margin: 10px 0 0 0;
}

/* Priority Color Coding */
.priority-hoch {
  border-color: #f44336;
}

.priority-mittel {
  border-color: #ff9800;
}

.priority-niedrig {
  border-color: #2196f3;
}

/* Score Colors */
.score-excellent {
  color: #4caf50;
}

.score-good {
  color: #ff9800;
}

.score-poor {
  color: #f44336;
}

/* Loading State */
#aiReadinessResult {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  color: #fff;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.6;
}

/* Form Input - Konsistent mit anderem Design */
#aiReadinessUrl {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  background: white;  /* WEIß wie deine anderen Inputs */
  color: #111;  /* DUNKEL für Lesbarkeit */
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: "Open Sans", sans-serif;
  transition: all 0.3s ease;
}

#aiReadinessUrl:focus {
  outline: none;
  border-color: #6a11cb;  /* Lila wie dein Gradient */
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

#aiReadinessUrl::placeholder {
  color: #999;  /* Grau für Placeholder */
}

/* Analyze Button - DEIN Standard Gradient! */
#aiReadinessBtn {
  padding: 10px;
  font-family: "Michroma", sans-serif;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);  /* DEIN Gradient */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

#aiReadinessBtn:hover {
  background: linear-gradient(135deg, #2575fc, #6a11cb);  /* Umgekehrt beim Hover */
  transform: translateY(-2px);
}

#aiReadinessBtn:active {
  transform: translateY(0);
}

/* Input Container */
.ai-input-container {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  align-items: stretch;
}

/* ========================================= */
/* 📱 RESPONSIVE - KI-READINESS */
/* ========================================= */

/* Tablet */
@media screen and (max-width: 768px) {
  #aiCategoryScores {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .ai-category-card {
    padding: 15px;
  }
  
  .ai-category-score {
    font-size: 2em;
  }
  
  .ai-detail-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .ai-detail-value {
    max-width: 100%;
    text-align: left;
  }
  
  #exportAiTxtBtn {
    width: 100%;
  }
}

/* Mobile */
@media screen and (max-width: 480px) {
  .ai-input-container {
    flex-direction: column;
  }
  
  #aiReadinessUrl,
  #aiReadinessBtn {
    width: 100%;
  }
  
  #aiCategoryScores {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .ai-score-circle {
    width: 180px;
    height: 180px;
  }
  
  #aiOverallScore {
    font-size: 3em;
  }
  
  .ai-recommendation-card {
    padding: 15px;
  }
  
  .ai-detail-section {
    padding: 15px;
  }
  
  details {
    padding: 12px;
  }
}

/* iPhone SE */
@media screen and (max-width: 400px) {
  .ai-score-circle {
    width: 160px;
    height: 160px;
  }
  
  .ai-category-score {
    font-size: 1.8em;
  }
  
  #aiRecommendations h3 {
    font-size: 1.1em;
  }
  
  #aiRecommendations h4 {
    font-size: 1em;
  }
  
  .ai-recommendation-card {
    padding: 12px;
  }
  
  .ai-rec-category,
  .ai-rec-issue,
  .ai-rec-suggestion {
    font-size: 0.85em;
  }
}

/* Desktop Large */
@media (min-width: 1024px) {
  #aiCategoryScores {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  
  .ai-input-container {
    max-width: 800px;
  }
}

@media screen and (max-width: 1024px) {
  #aiCategoryScores {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 600px) {
  #aiCategoryScores {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================= */
/* ANIMATIONS */
/* ========================================= */

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

#aiReadinessVisuals {
  animation: fadeInUp 0.6s ease-out;
}

.ai-category-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.ai-category-card:nth-child(1) {
  animation-delay: 0.1s;
}

.ai-category-card:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-category-card:nth-child(3) {
  animation-delay: 0.3s;
}

.ai-category-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* ========================================= */
/* PRINT STYLES */
/* ========================================= */

@media print {
  #aiReadinessBtn,
  #exportAiTxtBtn,
  details summary {
    display: none;
  }
  
  details {
    border: none;
  }
  
  details[open] {
    display: block;
  }
  
  .ai-category-card,
  .ai-recommendation-card,
  .ai-detail-section {
    break-inside: avoid;
  }
}