/*
 * WavePosition Assessment - Styles
 * Optimiertes Design für das Assessment-Tool
 */

:root {
  --primary-color: #0066cc;
  --secondary-color: #17a2b8;
  --text-color: #363f4f;
  --light-bg: #f8f9fa;
  --border-color: #e9ecef;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
}

/* Grundlegendes Layout */
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* Header */
.header {
  background-color: var(--light-bg);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.site-title {
  color: var(--primary-color);
  font-weight: 700;
  margin: 0;
  font-size: 2.2rem;
}

.site-subtitle {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.logo {
  max-height: 50px;
}

/* Intro Section */
.section {
  margin-bottom: 3rem;
}

.section-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.section-subtitle {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.key-question {
  background-color: var(--light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin: 2rem 0;
  font-size: 1.3rem;
  font-weight: 500;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.75rem 2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.75rem 2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Assessment Modal */
.modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
  background-color: var(--primary-color);
  color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 2rem;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Rating Options */
.rating-options {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.rating-option {
  flex: 1;
  text-align: center;
}

.rating-option input[type="radio"] {
  display: none;
}

.rating-option label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: 50%;
  background-color: #f0f0f0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.rating-option label:hover {
  background-color: #e0e0e0;
  transform: scale(1.05);
}

.rating-option input[type="radio"]:checked + label {
  border-color: var(--primary-color);
  color: white;
  background-color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.progress {
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.progress-bar {
  background-color: var(--primary-color);
  font-size: 0.7rem;
  line-height: 10px;
  transition: width 0.5s ease;
}

/* Results Section */
.result-type-card, 
.immediate-action-card {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  /*height: 100%;*/
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-type-card:hover, 
.immediate-action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.result-type-card h3, 
.immediate-action-card h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.type-description, 
.action-description {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

.immediate-action {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

/* Radar Chart */
.radar-chart-container {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.legend-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 0 1rem;
}

.legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  margin-right: 8px;
  border: 1px solid;
}

/* Email Form */
#emailForm {
  background-color: var(--light-bg);
  border-radius: 10px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Footer */
.footer {
  background-color: var(--light-bg);
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: #6c757d;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .site-title {
    font-size: 1.8rem;
  }
  
  .site-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .key-question {
    font-size: 1.1rem;
    padding: 1rem;
  }
  
  .rating-option label {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
  
  .radar-chart-container {
    padding: 1rem;
  }
  
  #emailForm {
    padding: 1.5rem;
  }
}

.radar-chart-container {
  height: 400px; /* Fixhöhe für Chart.js */
}

@media (max-width: 768px) {
  .radar-chart-container {
    height: 300px;
  }
}


@media (max-width: 992px) {
  #result .row > .col-md-5,
  #result .row > .col-md-7 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .result-type-card,
  .immediate-action-card,
  .radar-chart-container {
    margin-bottom: 2rem;
  }
}


/* Animation für Smooth Transitions */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Füge diese Regeln zu deiner styles.css hinzu */

/* Button-Animation Styles */
.btn-processing {
    position: relative;
    cursor: wait !important;
}

.spinner-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Verbesserte Feedback-Elemente */
.processing-message {
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

/* Erweiterte Animation für den Erfolgsbutton */
.btn-success .check-icon {
    display: inline-block;
    animation: checkmark 0.5s ease-in-out forwards;
    font-size: 1.2em;
}

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Verbesserte Progress-Animation */
.progress {
    overflow: hidden;
    height: 10px !important;
    border-radius: 5px;
    background-color: rgba(0,0,0,0.05);
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
    background-size: 1rem 1rem;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
}

/* Verbesserungen am Formular */
.form-focus-feedback .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

/* Statusmeldungen Animation */
.alert {
    animation: alertFadeIn 0.4s ease-out forwards;
}

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



/* -------------- MODAL STYLES (Assessment) - Responsive Anpassungen -------------- */

@media (max-width: 767.98px) { /* Greift für Bildschirme kleiner als Bootstrap 'md'-Breakpoint */

  #questionModal .modal-dialog,
  #qualificationModal .modal-dialog,
  #infoModal .modal-dialog { /* Gilt für alle relevanten Modals */
    /* Wir geben dem Dialog etwas Luft nach oben und unten, anstatt strikter Zentrierung,
       falls der Inhalt die Viewport-Höhe herausfordert.
       Bootstrap's modal-dialog-centered versucht es zu zentrieren.
       Diese Margins helfen, wenn die Höhe des Modals > Viewport-Höhe minus Margins ist. */
    margin-top: 3vh; /* Kleiner Abstand von oben */
    margin-bottom: 3vh;
    align-items: flex-start; /* Modal am oberen Rand des Dialogs ausrichten (wichtig bei max-height) */
  }

  #questionModal .modal-content,
  #qualificationModal .modal-content,
  #infoModal .modal-content {
    /* Maximale Höhe für das Modal-Fenster, um sicherzustellen, dass es in den Viewport passt */
    max-height: 94vh; /* z.B. 94% der Viewport-Höhe, um die 2*3vh Margins zu berücksichtigen */
    display: flex; /* Erforderlich, damit flex-direction: column für den Inhalt funktioniert */
    flex-direction: column;
  }

  #questionModal .modal-body,
  #qualificationModal .modal-body,
  #infoModal .modal-body {
    overflow-y: auto; /* Macht den Modal-Body scrollbar, wenn der Inhalt zu hoch ist */
    /* Padding anpassen, um Platz zu sparen */
    padding: 1rem 1rem 1.5rem 1rem; /* Oben, Seiten, Unten */
  }

  /* Spezifische Anpassungen für das Fragen-Modal, um Inhalt kompakter zu machen */
  #questionModal .question-text {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem); /* Etwas kleinere Schrift für die Frage */
    margin-bottom: 1rem; /* Weniger Abstand unten */
  }

  #questionModal .rating-options-scale-text {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  #questionModal .rating-options {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    gap: 0.3rem; /* Abstand zwischen den Rating-Buttons reduzieren */
  }

  #questionModal .rating-option label {
    width: clamp(34px, 7.5vw, 40px); /* Rating Buttons leicht verkleinern */
    height: clamp(34px, 7.5vw, 40px);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
  }
  
  #questionModal .progress {
    margin-top: 1rem; /* Weniger Abstand oben für Progressbar */
  }

  #questionModal .modal-header,
  #qualificationModal .modal-header,
  #infoModal .modal-header {
    padding: 0.75rem 1rem; /* Kompakterer Header */
  }
  #questionModal .modal-header .modal-title,
  #qualificationModal .modal-header .modal-title,
  #infoModal .modal-header .modal-title {
    font-size: 1.1rem; /* Kleinere Titel */
  }


  #questionModal .modal-footer,
  #qualificationModal .modal-footer,
  #infoModal .modal-footer {
    padding: 0.75rem 1rem; /* Kompakterer Footer */
  }
  #questionModal .modal-footer .btn,
  #qualificationModal .modal-footer .btn,
  #infoModal .modal-footer .btn {
    padding: 0.5rem 1rem; /* Kleinere Buttons im Footer */
    font-size: 0.9rem;
  }
}