/**
 * Styles für die Hinweisarten-Konfiguration
 */

/* Allgemeine Styles */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
}

.page-description {
  margin-bottom: 2rem;
}

/* Hinweisarten-Tabelle */
.hinweis-arten-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.hinweis-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.color-preview {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid #ddd;
}

/* Bearbeitbare Felder */
.editable-field {
  position: relative;
  display: flex;
  align-items: center;
}

.editable-field .edit-btn {
  opacity: 0;
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  transition: opacity 0.2s, color 0.2s;
  padding: 4px;
  border-radius: 4px;
}

.editable-field:hover .edit-btn {
  opacity: 1;
}

.editable-field .edit-btn:hover {
  color: #2c7be5;
  background-color: #f8f9fa;
}

/* Tag-Styles */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  background-color: #e9f2fd;
  color: #2c7be5;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #c9ddf9;
}

.table-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* Hinweisarten-Modal */
#edit-modal.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.5);
}

#edit-modal.hinweis-arten-modal-show {
  display: flex;
  justify-content: center;
  align-items: center;
}

#edit-modal .modal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 600px;
  animation: modalFadeIn 0.3s;
  margin: 0;
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

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

#edit-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

#edit-modal .modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

#edit-modal .close-modal {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.2s;
}

#edit-modal .close-modal:hover {
  color: #343a40;
}

#edit-modal .modal-body {
  padding: 1.5rem;
  max-height: calc(80vh - 130px);
  overflow-y: auto;
  flex: 1;
}

#edit-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e9ecef;
}

body.modal-open {
  overflow: hidden;
}

/* Form-Elemente */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.character-counter {
  text-align: right;
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.character-counter .warning {
  color: #dc3545;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 4px;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: #2c7be5;
  border-color: #2c7be5;
}

.btn-primary:hover {
  color: #fff;
  background-color: #1a68d1;
  border-color: #1862c6;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  color: #fff;
  background-color: #5a6268;
  border-color: #545b62;
}

/* Icon-Picker */
.icon-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  height: 80px;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #ced4da;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.icon-item {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  width: 50px;
  height: 50px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  border: 1px solid transparent;
}

.icon-item:hover {
  background-color: #e9f2fd;
  color: #2c7be5;
}

.icon-item.selected {
  background-color: #e9f2fd;
  color: #2c7be5;
  border-color: #2c7be5;
}

/* Color-Picker */
.color-picker-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.color-picker {
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid #ced4da;
  border-radius: 4px;
  cursor: pointer;
}

.color-preview-large {
  width: 100%;
  height: 80px;
  border-radius: 4px;
  border: 1px solid #ced4da;
  margin-top: 0.5rem;
}

/* Projektarten-Selector */
.projektarten-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.projektart-item {
  padding: 0.25rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-label {
  font-size: 0.875rem;
}

.selected-projektarten {
  margin-top: 1rem;
}

.selected-projektarten label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Hinweisarten-Konfigurator */
.hinweis-arten-konfigurator-container {
  padding: 1rem;
}

.hinweis-arten-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Loading-Indicator */
.loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  font-size: 1.25rem;
  color: #6c757d;
}

/* Error-Message */
.error-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.error-message i {
  font-size: 3rem;
  color: #dc3545;
}

/* Hinweis Arten Dokumentation */
.hinweis-arten-doku-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hinweis-arten-doku-intro {
  margin-bottom: 1rem;
}

.hinweis-arten-doku-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hinweis-art-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.hinweis-art-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.hinweis-art-icon {
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hinweis-art-title h4 {
  margin: 0;
  font-size: 1.1rem;
}

.hinweis-art-card-body {
  padding: 1rem;
}

.hinweis-art-card-body p {
  margin-bottom: 0.75rem;
}

.hinweis-art-card-body .color-sample {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  vertical-align: middle;
  border: 1px solid #ddd;
}

/* Matrix Styles */
.hinweis-arten-doku-matrix {
  margin-top: 2rem;
}

.hinweis-arten-doku-matrix h3 {
  margin-bottom: 1rem;
}

.anwendbarkeits-matrix {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e9ecef;
  margin-bottom: 1rem;
}

.anwendbarkeits-matrix th, 
.anwendbarkeits-matrix td {
  border: 1px solid #e9ecef;
  padding: 0.75rem;
  text-align: center;
}

.anwendbarkeits-matrix th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.anwendbarkeits-matrix tr:nth-child(even) {
  background-color: #f8f9fa;
}

.anwendbarkeits-matrix td.hinweis-art-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  text-align: left;
}

.anwendbarkeits-matrix .hinweis-art-icon {
  font-size: 1.2rem;
  width: 24px;
  height: 24px;
}

/* Status-Ausnahmen Matrix Styles */
.status-ausnahmen-matrix {
  margin-top: 1rem;
}

.matrix-legend {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  #edit-modal .modal-content {
    width: 95%;
    margin: 5% auto;
  }
  
  .icon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
  
  .projektarten-selector {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .hinweis-arten-doku-cards {
    grid-template-columns: 1fr;
  }
  
  .anwendbarkeits-matrix {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .matrix-legend {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Klassifizierungs-UI */
.klassifizierung-selector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.klassifizierung-selector .form-check {
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.klassifizierung-selector .form-check:hover {
  border-color: #dee2e6;
  background-color: #f8f9fa;
}

.klassifizierung-selector .form-check-input:checked + .form-check-label {
  font-weight: 600;
}

.klassifizierung-selector .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.klassifizierung-selector .form-check:has(.form-check-input:checked) {
  border-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.05);
}

.klassifizierung-selector .form-check-label {
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.klassifizierung-selector .form-text {
  color: #6c757d;
  font-size: 0.875rem;
  margin-left: 1.5rem;
}

/* Text-Farben für Klassifizierung */
.text-success {
  color: #198754 !important;
}

.text-info {
  color: #0dcaf0 !important;
} 