  .tag-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
  }
  .tag-checkbox-group .form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: 200;
    padding-left: 26px;
    padding-right: 8px;
  }
  .tag-checkbox-group .form-check-input {
    margin-right: 4px;
  }
  .modal-sm-custom {
    max-width: 400px;
  }

  .modal-title {
      margin-bottom: 0;
      line-height: 1.3;
      text-transform: uppercase;
  }

.inline-tag-input {
  background: #f1f1f1;
  border-radius: 6px;
  padding: 4px;
  border: 1px solid #ddd;
}
.inline-tag-input input[type=text] {
  font-size: 0.8em;
}

.inline-tag-select {
  position: absolute;
  right: 0;
  z-index: 100;
  background: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  padding: 8px;
  width: max-content;
  min-width: 300px;
  text-align: left;
}


.inline-tag-container {
  background: #f9f9f9;
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  padding: 6px 8px;
  margin-top: 4px;
  border: 1px solid #e0e0e0;
}

.inline-tag-container form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.inline-tag-container label.badge-tag {
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 4px;
  font-size: 0.8em;
}

.inline-tag-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-tag-wrapper label {
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
}

.inline-tag-wrapper label:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.inline-tag-wrapper button.btn {
  margin-top: 4px;
}

#referenz-tags-[id] .badge {
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.8em;
  padding: 3px 6px;
}


.table td {
  position: relative; /* wichtig für absolute Positionierung des Tag-Fensters */
}




.btn-group-sm>.btn, .btn-sm {
    padding: .25rem .25rem;
    font-size: 0.675rem;
    line-height: 1;
    border-radius: .2rem;
    margin-left: 1px;
    margin-right: 1px;
}

.form-group-referenzen {
    padding: 15px;
}


.media-row:hover {
  background: #fafafa;
}

.beschreibung-wrapper textarea {
  transition: max-height 0.3s ease;
}



.thumb-fixed {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 3px;
}

.media-row {
  width: 100%;
  margin-bottom: 4px;
}
.media-row > .d-flex {
  width: 100%;        /* Inhalt auf volle Breite strecken */
}

.media-row textarea {
  font-size: 0.85em;
  padding: 2px 4px;
}

#sortable-referenzfotos,
#sortable-artikelbilder,
#sortable-pdf,
#sortable-videos {
  width: 100%;
}

/* ✨ Hauptzeilenfarben – gesteuert über PHP-Klassen odd/even */
#sortable-pdf tr.odd,
#sortable-videos tr.odd {
  background-color: #ffffff;
}

#sortable-pdf tr.even,
#sortable-videos tr.even {
  background-color: #ececec;
}

/* Hover-Effekt für Hauptzeilen */
#sortable-pdf tr:not(.tag-row):hover,
#sortable-videos tr:not(.tag-row):hover {
  background-color: #f2f8ff;
  transition: background-color 0.2s ease;
}

/* ✨ Tag-Zeilen erben Farbe der Hauptzeile */
#sortable-pdf tr.tag-row,
#sortable-videos tr.tag-row {
  background-color: inherit !important;
}

/* Dünne Linie zwischen Datei- und Tag-Zeile */
#sortable-pdf tr.tag-row td,
#sortable-videos tr.tag-row td {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dünne Linien zwischen Blöcken */
#sortable-pdf tr,
#sortable-videos tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Einheitliches Padding */
#sortable-pdf td,
#sortable-videos td {
  padding: 6px 8px;
  vertical-align: middle;
}



.btn-sm {
  padding: 6px 6px;
  font-size: 0.8em;
}


.btn-xs {
  font-size: 0.8em;
  padding: 1px 6px !important;
}

/* Einheitliches Styling für Tag-Badges */
.badge-tag {
  display: inline-block;
  margin: 2px 2px 2px 0;   /* Abstand zwischen den Badges */
  padding: 2px 4px;        /* etwas mehr Innenabstand */
  font-size: 0.65rem;      /* etwas kleiner als Standardtext */
  border-radius: 5px;     /* runde Ecken */
  font-weight: 400;        /* mittlere Schrift */
  white-space: nowrap;     /* nicht umbrechen */
}

.badge-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Checkbox unsichtbar, aber interaktiv */
.badge-tag input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #a9a9a9;
  border-radius: 3px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle ;
}

.badge-tag input[type="checkbox"]:checked::after {
  content: "✅";
  position: absolute;
  top: -5px;
  left: -4px;
  font-size: 15px;
  font-weight: 400;
  color: inherit; /* übernimmt Kontrastfarbe */
}

/* Wenn Checkbox aktiv → kleine Hervorhebung */
.badge-tag input[type="checkbox"]:checked + span,
.badge-tag.active {
  box-shadow: 0 0 8px rgba(0,0,0,0.2) inset;
}


.table-sm td {
  padding: .05rem;
}


.ui-state-highlight {
  height: 60px;
  background: #f8f9fa;
  border: 1px dashed #aaa;
}


.media-row .img-col {
  flex: 0 0 140px;   /* feste Spalte für Bild */
  max-width: 140px;
}

.media-row .beschreibung-col {
  flex: 1;           /* wächst automatisch */
  min-width: 300px;
}

.media-row .tags-col {
  flex: 0 0 180px;
}

.table-main-data {
  transition: background-color 0.3s ease;
}
.table-main-data td{
    padding-left:2px;
    padding-right:2px;
}

.text-muted{    
    color: #0056b2 !important;
    font-size: 0.7em;
    font-weight: 500;
  }

.text-muted-betrag {
    color: #0056b2 !important;
    font-size: 0.7em;
    font-weight: 500;
}
  
.bg-light {
    background-color: #b2c2d2 !important;
}

/* === Galerie-Kacheln === */


/* Modal */

#editModal .modal-content-custom {
  display: flex;
  background: white;
  width: 80%;
  max-width: 1200px;
  height: 80%;
  margin: auto;
  border-radius: 10px;
  overflow: auto;
}

#editModal .edit-image {
  width: 40%;
  background: #f8f8f8;
  /*display: flex;*/
  justify-content: center;
  align-items: center;
}

#editModal .edit-image img {
  max-width: 100%;
  max-height: 80%;
  object-fit: contain;
}

#editModal .edit-details {
  width: 60%;
  padding: 0px 20px 20px 20px;
  overflow-y: auto;
}

#editModal .close-btn {
  position: relative;
  top: -2%;
  left: 97%;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
}

#editModal .save-status .alert {
  margin: 0 auto 0.5rem;
  max-width: 400px;
  font-size: 0.9em;
}

.edit-image {
  flex: 1 1 40%;
  background: #f8f9fa;
  text-align: center;
}

.edit-image img {
  max-width: 100%;
  max-height: 450px;
  /*border-radius: 4px;*/
  object-fit: cover;
}


.save-status .alert {
  font-size: 0.85em;
  margin-bottom: 0.5rem;
}
.btn-close-modal {
  font-size: 0.8em;
  padding: 2px 8px;
}

#editModal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content-custom {
  display: flex;
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: 90%;
  overflow: hidden;
}

.save-status .alert {
  font-size: 0.85em;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.download-links .btn {
  font-size: 0.8em;
  padding: 3px 8px;
  border-radius: 8px;
}
.download-links .btn-outline-secondary:hover {
  background-color: #276789;
}
.download-links .btn-outline-info:hover {
  background-color: #276789;
}

#editFilename {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 8px;
  word-break: break-all;
  font-size: 0.85em;
}

#uploadProgressContainer .progress {
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

#uploadProgressBar {
  transition: width 0.3s ease;
  font-weight: 600;
}

/* === Bild-Kacheln / Galerie === */
/* 🧩 Sortierbare Galerie */
.bild-grid {
   display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.bild-kachel.dragging {
  opacity: 0.8;
  transform: scale(1.05);
  z-index: 10;
  cursor: grabbing;
}


.bild-kachel img.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}



.ui-state-highlight {
  border: 2px dashed #17a2b8;
  background: rgba(23,162,184,0.1);
  width: 180px;
  height: 180px;
}

/* === Upload-Bereich === */
.upload-dropzone {
  border: 2px dashed #6c757d;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  color: #6c757d;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-dropzone.dragover {
  background: rgba(0,123,255,0.05);
  border-color: #007bff;
  color: #007bff;
}
.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.upload-item {
  width: 120px;
  text-align: center;
  font-size: 0.8em;
}
.upload-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.progress {
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar {
  height: 100%;
  background: #007bff;
  width: 0%;
  transition: width 0.3s ease;
}


/* ==============================
   📁 Dropzone Styling
   ============================== */
#dropzone,
#artikelDropzone {
  background-color: #f8f9fa;
  border: 2px dashed #ced4da;
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
  user-select: none;
}

#dropzone:hover,
#artikelDropzone:hover {
  background-color: #eef5ff;
  border-color: #80bdff;
}

#dropzone.bg-info,
#artikelDropzone.bg-info {
  background-color: #17a2b8 !important;
  color: #fff !important;
  border-color: #138496;
}

/* Text in Dropzone */
#dropzone small,
#artikelDropzone small {
  color: #6c757d;
}

/* ==============================
   🖼️ Vorschau der ausgewählten Dateien
   ============================== */
#preview img,
#artikelPreview img {
  transition: transform 0.2s ease;
}

#preview img:hover,
#artikelPreview img:hover {
  transform: scale(1.05);
}

#preview > div,
#artikelPreview > div {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 4px;
  margin: 4px;
  width: 100px;
  text-align: center;
  font-size: 12px;
  overflow: hidden;
}

/* ==============================
   🔄 Sortable-Elemente in Galerie
   ============================== */
.sortable-placeholder {
border: 3px dashed #0d6efd; /* Hauptfarbe Blau (Bootstrap Primary) */
  background: rgba(13, 110, 253, 0.1);
  border-radius: 8px;
  width: 140px !important;
  height: 140px !important;
  margin: 0 !important;
  box-shadow: inset 0 0 6px rgba(13, 110, 253, 0.25);
  animation: placeholderPulse 1s infinite ease-in-out;
}

.table-row-placeholder {
  display: table-row;
  height: 42px;
  background: rgba(13,110,253,.08);
}

/* ✨ Leichte Pulsanimation für mehr visuelles Feedback */
@keyframes placeholderPulse {
  0%, 100% { background-color: rgba(13, 110, 253, 0.1); }
  50%      { background-color: rgba(13, 110, 253, 0.2); }
}

/* Nur das Handle darf draggen, nicht das ganze Bild */
.bild-kachel {
  position: relative;
  display: inline-block;
  margin: 5px;
  border-radius: 6px;
  overflow: hidden;
  cursor: default;
}

.bild-kachel:hover .drag-handle {
  opacity: 1;
  transform: scale(1.05);
}

/* Nur beim Handle zeigen wir den Grab-Cursor */
.bild-kachel img.thumb {
  cursor: pointer;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.bild-kachel img.thumb:hover {
  transform: scale(1.04);
}

.bild-kachel.dragging {
  opacity: 0.85;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  cursor: grabbing !important;
  z-index: 2000;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Drag-Handle korrekt positionieren */
.drag-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  width: 20px;
  height: 20px;
  line-height: 20px;
  font-size: 16px;
  color: #666;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  cursor: grab;
  text-align: center;
  user-select: none;
  transition: all 0.2s ease;
}

.drag-handle:hover {
  color: #007bff;
  background: rgba(255, 255, 255, 1);
}

.drag-handle::after {
  /*content: "⋮⋮";*/
  display: none;
}

.drag-handle:active {
  cursor: grabbing;
}

/* ==============================
   📊 Fortschrittsbalken
   ============================== */
#uploadProgressContainer {
  margin-top: 1rem;
}

#uploadProgressBar {
  transition: width 0.3s ease-in-out;
  font-weight: 500;
}

/* ==============================
   🧭 Statusmeldungen & Buttons
   ============================== */
#statusmeldung .alert,
#artikel_statusmeldung .alert {
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

button[disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* ==============================
   🧩 Allgemeine Galerie-Optik
   ============================== */
#galerieInUpload,
#artikelGalerie {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
}

#galerieInUpload .bild-kachel,
#artikelGalerie .bild-kachel {
  flex: 0 0 auto;
}


/* Schatten fürs Tag-Modal */
#tagModalWrapper .modal-dialog {
  box-shadow: 0 0 24px rgba(0,0,0,0.35);
  border-radius: 10px;
  overflow: hidden;
}

.card-body{
    flex: 1 1 auto;
    min-height: 1px;
    padding:0px;
}

.card-header {
    padding: .2rem 0.5rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, .03);
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

/* 🎨 Gleiche Breite für Medien- & Artikel-Buttons */
.btn-equal {
  min-width: 160px;
  text-align: center;
  white-space: nowrap;
}

.btn-equal + .btn-equal {
  margin-left: 4px;
}

.dashboard-tile {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 12px;
}

.dashboard-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 15px rgba(0,0,0,0.25);
}

.dashboard-tile i {
  opacity: 0.9;
}

h1.text-secondary {
  color: #444 !important;
}

.mini-map {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  z-index: 5;
  border: 1px solid rgba(0,0,0,0.2);
}

.gps-marker {
  font-size: 20px;
  text-align: center;
  line-height: 20px;
}
