/**
 * Styles für das Hinweis-Modal
 * Diese Datei enthält alle Stile für das Hinweis-Modal und seine Komponenten
 */

/* Grundlegende Modal-Anpassungen */
#hinweis-modal,
#hinweis-status-modal {
  max-width: 700px;
  background-color: #f8f9fa;
}

#hinweis-modal .modal-body,
#hinweis-status-modal .modal-body {
  max-height: calc(90vh - 150px);
  overflow-y: auto;
  padding: 20px;
}

#hinweis-modal .modal-header,
#hinweis-status-modal .modal-header {
  background-color: #0079C7;
  color: white;
  border-bottom: none;
  padding: 15px 20px;
  border-radius: 5px 5px 0 0;
}

#hinweis-modal .modal-title,
#hinweis-status-modal .modal-title {
  font-weight: 600;
  font-size: 1.2rem;
}

#hinweis-modal .modal-close,
#hinweis-status-modal .modal-close {
  color: white;
  opacity: 0.8;
}

#hinweis-modal .modal-close:hover,
#hinweis-status-modal .modal-close:hover {
  opacity: 1;
}

#hinweis-modal .modal-footer,
#hinweis-status-modal .modal-footer {
  border-top: none;
  background-color: #f8f9fa;
  padding: 15px 20px;
  border-radius: 0 0 5px 5px;
}

/* Segmente im Hinweis-Modal */
.hinweis-info,
.hinweis-details,
.hinweis-assignment {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  /* margin-bottom wird über JavaScript gesetzt */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.hinweis-info:hover,
.hinweis-details:hover,
.hinweis-assignment:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Überschriften in den Segmenten */
.hinweis-info h4,
.hinweis-details h4,
.hinweis-assignment h4 {
  margin-bottom: 15px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 2px solid #0079C7;
  padding-bottom: 8px;
  display: inline-block;
}

/* Beschreibungstext */
#hinweis-beschreibung {
  line-height: 1.6;
  color: #333;
  font-size: 0.95rem;
}

/* Details-Inhalt */
#hinweis-details-content {
  line-height: 1.5;
}

#hinweis-details-content p {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
}

#hinweis-details-content strong {
  color: #2c3e50;
  margin-left: 5px;
}

/* Farbige Statusanzeigen */
.text-danger {
  color: #e74c3c !important;
}

.text-warning {
  color: #f39c12 !important;
}

.text-success {
  color: #2ecc71 !important;
}

.text-muted {
  color: #7f8c8d !important;
  font-style: italic;
}

/* Formularelemente im Hinweis-Modal */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #34495e;
}

select,
textarea,
input[type="date"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus,
textarea:focus,
input[type="date"]:focus {
  border-color: #0079C7;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Aktuelle Zuweisung */
#hinweis-current-assignment,
.current-assignment {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #7f8c8d;
  background-color: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  border-left: 3px solid #0079C7;
}

.current-assignment p {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.current-assignment p:last-child {
  margin-bottom: 0;
}

.current-assignment i {
  margin-right: 8px;
  color: #2c3e50;
}

.current-assignment strong {
  color: #2c3e50;
  margin-left: 5px;
}

.current-assignment .text-muted i {
  color: #95a5a6;
}

/* Buttons im Modal */
#hinweis-modal .btn,
#hinweis-status-modal .btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

#hinweis-modal .btn-primary,
#hinweis-status-modal .btn-primary {
  background-color: #0079C7;
  border-color: #0079C7;
}

#hinweis-modal .btn-primary:hover,
#hinweis-status-modal .btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
}

#hinweis-modal .btn-warning,
#hinweis-status-modal .btn-warning {
  background-color: #f39c12;
  border-color: #f39c12;
  color: white;
}

#hinweis-modal .btn-warning:hover,
#hinweis-status-modal .btn-warning:hover {
  background-color: #e67e22;
  border-color: #e67e22;
}

#hinweis-modal .btn-success,
#hinweis-status-modal .btn-success {
  background-color: #2ecc71;
  border-color: #2ecc71;
}

#hinweis-modal .btn-success:hover,
#hinweis-status-modal .btn-success:hover {
  background-color: #27ae60;
  border-color: #27ae60;
}

/* Hinweis-Status-Modal spezifische Stile */
#hinweis-status-begruendung {
  margin-bottom: 15px;
}

#hinweis-wiedervorlage-container {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #e9ecef;
}

#hinweis-wiedervorlage-container label {
  margin-bottom: 10px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  #hinweis-modal,
  #hinweis-status-modal {
    width: 95%;
  }
  
  .hinweis-info,
  .hinweis-details,
  .hinweis-assignment {
    padding: 15px;
  }
}

/* Visuelle Unterscheidung zwischen Hinweisen und Aufgaben im Modal */
.hinweis-assignment h4 i.text-success {
  color: #28a745 !important;
  margin-right: 0.5rem;
}

.hinweis-assignment h4 i.text-info {
  color: #17a2b8 !important;
  margin-right: 0.5rem;
}

/* Stil für Hinweis-Info-Meldung */
.hinweis-assignment p i.fas.fa-info-circle {
  margin-right: 0.5rem;
  color: #17a2b8;
}

/* Subtile Unterscheidung durch Hintergrundfarben */
.hinweis-assignment:has(h4 i.text-info) {
  background: linear-gradient(to right, #e8f4fd 0%, #f8f9fa 20%);
}

.hinweis-assignment:has(h4 i.text-success) {
  background: linear-gradient(to right, #e8f5e8 0%, #f8f9fa 20%);
}

/* Styling für die separaten Bereiche */
.assignment-section {
  border-left: 4px solid #0079C7 !important;
}

.comment-section {
  border-left: 4px solid #0079C7 !important;
}

/* Lokale Button-Styles */
.assignment-section .btn,
.comment-section .btn {
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
}

.assignment-section .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.comment-section .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Icon-Abstände in Buttons */
.assignment-section .btn i,
.comment-section .btn i {
  margin-right: 0.5rem;
}

/* Spezielle Styles für Zuweisungsbereich in der rechten Spalte */
.hinweis-modal-right .assignment-section {
  border-left: 4px solid #0079C7 !important;
}

/* Bessere Abstände für rechte Spalte */
.hinweis-modal-right {
  /* gap entfernt - Abstände werden über JavaScript marginBottom gesteuert */
}

/* Modal-Content mit optimaler Höhe */
.hinweis-modal-content {
  max-height: 80vh;
  overflow: hidden;
}

/* Modal selbst soll nicht scrollbar sein */
.modal-content {
  overflow: hidden !important;
}

.modal-body {
  overflow: hidden !important;
  padding: 20px;
}

/* Historie-Bereich soll sich an Inhalt anpassen */
#hinweis-historie-content {
  flex: 0 1 auto !important;
  max-height: inherit;
}

/* Entferne überflüssigen Platz in Historie-Tabellen */
.historie-table-container {
  height: fit-content !important;
}

.historie-table tbody tr:last-child td {
  padding-bottom: 8px;
}

/* Linke und rechte Spalten */
.hinweis-modal-left,
.hinweis-modal-right {
  min-height: 0; /* Wichtig für Flexbox-Scrolling */
}

/* Einheitliche Sektion-Styles */
.hinweis-details,
.hinweis-assignment,
.assignment-section,
.hinweis-historie {
  border: 1px solid #e9ecef;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Scrollbare Bereiche */
#hinweis-details-content,
#hinweis-historie-content,
.current-comment {
  scrollbar-width: thin;
  scrollbar-color: #6c757d #f8f9fa;
}

#hinweis-details-content::-webkit-scrollbar,
#hinweis-historie-content::-webkit-scrollbar,
.current-comment::-webkit-scrollbar {
  width: 6px;
}

#hinweis-details-content::-webkit-scrollbar-track,
#hinweis-historie-content::-webkit-scrollbar-track,
.current-comment::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

#hinweis-details-content::-webkit-scrollbar-thumb,
#hinweis-historie-content::-webkit-scrollbar-thumb,
.current-comment::-webkit-scrollbar-thumb {
  background: #6c757d;
  border-radius: 3px;
}

#hinweis-details-content::-webkit-scrollbar-thumb:hover,
#hinweis-historie-content::-webkit-scrollbar-thumb:hover,
.current-comment::-webkit-scrollbar-thumb:hover {
  background: #495057;
} 