/* Allgemeines Layout */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

h1 {
  padding: 1rem;
  font-size: 1.5rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-1 {
  gap: 0.25rem;
}

.items-center {
  align-items: center;
}

.p-2 {
  padding: 0.5rem;
}

.rounded {
  border-radius: 0.375rem;
}

.shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cursor-move {
  cursor: move;
}

.text-sm {
  font-size: 0.875rem;
}

.text-gray-600 {
  color: #4b5563;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-green-600 {
  background-color: #16a34a;
}

.text-white {
  color: #ffffff;
}

/* Einheitliche Container-Breiten (nur Struktur) */
.content-container {
  width: 100%;
  max-width: 1200px; /* Einheitliche maximale Breite */
  margin: 2rem auto; /* Zentriert mit Abstand oben/unten */
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1280px) {
  .content-container {
    max-width: 1000px;
    margin: 2rem 1rem;
  }
}

@media (max-width: 1024px) {
  .content-container {
    max-width: 900px;
    margin: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  .content-container {
    max-width: 100%;
    margin: 1rem 0.5rem;
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .content-container {
    margin: 0.5rem 0.25rem;
    padding: 0.75rem;
  }
}

/* Admin-spezifische Container für kleinere Inhalte */
.admin-container {
  width: 100%;
  max-width: 800px; /* Etwas schmaler für Admin-Seiten */
  margin: 2rem auto; /* Zentriert mit Abstand oben/unten */
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
  .admin-container {
    max-width: 700px;
    margin: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  .admin-container {
    max-width: 100%;
    margin: 1rem 0.5rem;
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .admin-container {
    margin: 0.5rem 0.25rem;
    padding: 0.75rem;
  }
}

/* Dragula Mirror Style Fix */
.gu-mirror {
  position: fixed !important;
  opacity: 0.8;
  z-index: 9999 !important;
  pointer-events: none;
  margin: 0 !important;
}

/* Dragula Source Style */
.gu-hide {
  display: none !important;
}

.gu-unselectable {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.gu-transit {
  opacity: 0.3;
}

/* Aktive Tags */
.tag {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* Farbvarianten aktiv */
.tag-s {
  background-color: #ef4444; /* rot */
}
.tag-r {
  background-color: #10b981; /* grün */
}
.tag-fix {
  background-color: #facc15; /* gelb */
  color: black;
}

/* Inaktive Tags */
.tag.inactive {
  background-color: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.3);
  font-weight: normal;
}

.btn {
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #6b7280;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn:hover {
  background-color: #f3f4f6;
}

/* Fixierter Header */
.header-spacer {
  height: 90px; /* gleiche Höhe wie der Header */
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  padding: 1rem;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Verbesserte Schatten und Übergänge */
.content-container,
.admin-container {
  transition: all 0.3s ease;
  position: relative;
}

.content-container:hover,
.admin-container:hover {
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Zusätzliche Sichtbarkeit für Container */
.content-container::before,
.admin-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-radius: 1rem;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-container:hover::before,
.admin-container:hover::before {
  opacity: 1;
}

/* Einheitliche Button-Styles */
.btn-primary {
  background-color: var(--link-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
}

/* Verbesserte Tabellen */
table {
  border-collapse: collapse;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
}

td {
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

tr:hover {
  opacity: 0.8;
}

/* Verbesserte Formulare */
input, select, textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  transition: border-color 0.2s ease;
  font-size: 0.875rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--link-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Verbesserte Sektionen */
section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

section h3 {
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Verbesserte Erfolgs- und Fehlermeldungen */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid;
}

.alert-success {
  background-color: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.alert-error {
  background-color: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.alert-info {
  background-color: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

/* Verbesserte Links */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Verbesserte Farben-Picker */
input[type="color"] {
  width: 100%;
  height: 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

input[type="color"]:hover {
  border-color: var(--link-color);
}

/* Responsive Grid für Farben */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .color-grid {
    grid-template-columns: 1fr;
  }
}


/* Fixierter Footer */
.footer-spacer {
  height: 40px; /* entspricht der tatsächlichen Höhe des Footers */
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
}

hr {
  border: none;
  border-top: 2px solid #9ca3af; /* Tailwind border-gray-400 */
  margin-top: 0.5rem; /* entspricht my-2 */
  margin-bottom: 0.5rem;
}

/* Modal Fix */
#batchMoveModal.hidden {
  display: none !important;
}

#batchMoveModal:not(.hidden) {
  display: flex !important;
}

/* Modal Animation */
#batchMoveModal {
  transition: opacity 0.3s ease;
}

#batchMoveDialog {
  transition: transform 0.3s ease;
}

/* Responsive Modal */
@media (max-width: 768px) {
  #batchMoveDialog {
    max-width: 95vw;
    margin: 1rem;
  }
}