/**
 * Document Templates CSS
 * Modernes Styling für Dokumentvorlagen-Komponente
 * Entspricht dem Design der anderen Module (Berichte, etc.)
 */

/* Markdown-Editor - Modernisiert */
#markdown-editor {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
  resize: vertical;
  min-height: 300px;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px;
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#markdown-editor:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Vorlagen-Liste - Modernisiert */
#templates-list {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 transparent;
}

#templates-list::-webkit-scrollbar {
  width: 8px;
}

#templates-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

#templates-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#templates-list::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* Template-Item - Modernisiert mit besserem Hover */
#templates-list > div {
  transition: all 0.2s ease;
  border-radius: 8px;
}

#templates-list > div:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Layout-Optionen - Modernisiert */
#layout-header-enabled,
#layout-footer-enabled,
#layout-signature-block-enabled {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

/* Layout-Sektion - Modernisiert */
.mb-4.p-4.bg-gray-50 {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: border-color 0.2s ease;
}

.dark .mb-4.p-4.bg-gray-50 {
  border-color: #374151;
}

/* Input-Felder - Modernisiert */
.input {
  transition: all 0.2s ease;
  border-radius: 6px;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

/* Buttons - Modernisiert */
.btn {
  transition: all 0.2s ease;
  border-radius: 6px;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.btn-danger {
  background-color: #ef4444;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Unterschriften-Dropdown - Modernisiert */
#signature-select {
  cursor: pointer;
  transition: all 0.2s ease;
}

#signature-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

/* Filter-Sektion - Modernisiert */
.mb-4 {
  border-radius: 8px;
}

/* Responsive Design - Verbessert */
@media (max-width: 768px) {
  .flex.gap-6 {
    flex-direction: column;
    gap: 1rem;
  }
  
  .w-1\/3 {
    width: 100%;
  }
  
  .flex-1 {
    width: 100%;
  }
  
  #markdown-editor {
    min-height: 200px;
    font-size: 12px;
  }
  
  .btn {
    font-size: 14px;
    padding: 8px 16px;
  }
}

/* Dark Mode Anpassungen - Modernisiert */
.dark #markdown-editor {
  background-color: #1f2937;
  color: #f9fafb;
  border-color: #374151;
}

.dark #markdown-editor:focus {
  border-color: #4b5563;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dark .input {
  background-color: #1f2937;
  color: #f9fafb;
  border-color: #374151;
}

.dark .input:focus {
  border-color: #4b5563;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dark .btn-secondary {
  background-color: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

.dark .btn-secondary:hover {
  background-color: #4b5563;
  border-color: #6b7280;
}

/* Button-Gruppen - Modernisiert */
.flex.gap-2 button {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Platzhalter-Hinweis - Modernisiert */
.text-xs.text-gray-500 {
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Icon-Styling */
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Verbesserte Typografie */
h3.text-sm.font-medium {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Smooth Transitions */
* {
  transition-property: color, background-color, border-color, transform, box-shadow;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}




