/* ============================================================================
 * ST Gallery CSS – optimierte Version (Dubletten entfernt, strukturierte Blöcke)
 * ============================================================================
 */

/* Basis Styles für Galerie-Container und Bilder */
.st-gallery-image-container,
.st-galerie-item-img {
  position: relative;
  display: inline-block;
  margin: 2px 5px;
  background-image: linear-gradient(#bbb, #ddd);
}

.st-gallery-image-container img,
.st-galerie-item-img img {
  display: block;
  max-width: 100%;
  height: auto;
}

.st-gallery-image-container img:hover,
.st-galerie-item-img img:hover {
  mix-blend-mode: luminosity;
}

/* ============================================================================
 * Bildauswahl (Nummern-Label als Button)
 * ============================================================================ */
.st-galerie-item-no:hover {
  background-color: rgba(255, 157, 0, 0.9);
  opacity: 0.8;
}

.st-galerie-item-no.selected {
  background-color: #68B42D;
  color: white;
  border: 2px solid #fff;
}

/* Ausgewähltes Bild optisch hervorheben */
.st-gallery-image-container.selected {
  border: 5px solid #68B42D;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.st-galerie-item.selected {
  transform: scale(0.95);
  opacity: 0.9;
}

/* ============================================================================
 * Action-Buttons (Proceed, Clear, Select-All)
 * ============================================================================ */

/* Grundlayout für Action-Buttons */
.st-gallery-proceed-button,
.st-gallery-clear-button,
.st-gallery-select-all-button {
  position: fixed;
  right: 20px;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.st-gallery-proceed-button.visible,
.st-gallery-clear-button.visible,
.st-gallery-select-all-button.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Proceed Button */
.st-gallery-proceed-button {
  bottom: 80px;
  background-color: #007cba;
  color: white;
}

.st-gallery-proceed-button:hover {
  background-color: #005a87;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

/* Clear Button */
.st-gallery-clear-button {
  bottom: 20px;
  background-color: #dc3545;
  color: white;
}

.st-gallery-clear-button:hover {
  background-color: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Select All Button */
.st-gallery-select-all-button {
  background-color: #3b82f6;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateX(100px);
}

/* Position abhängig von anderen Buttons */
.st-gallery-select-all-button.st-gallery-select-all-button-high {
  bottom: 140px;
}
.st-gallery-select-all-button.st-gallery-select-all-button-low {
  bottom: 20px;
}

.st-gallery-select-all-button:hover {
  background-color: #2563eb;
  transform: translateX(0) translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================================================
 * Auswahlzähler (oben rechts)
 * ============================================================================ */
.st-gallery-selection-counter {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #007cba;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: bold;
  z-index: 1001;
}

/* ============================================================================
 * Modal Styles
 * ============================================================================ */
.st-gallery-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.st-gallery-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.st-gallery-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  transform: scale(0.7) translateY(-30px);
  transition: all 0.3s ease;
}

.st-gallery-modal-overlay.visible .st-gallery-modal {
  transform: scale(1) translateY(0);
}

.st-gallery-modal-message {
  padding: 30px 30px 20px;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  text-align: center;
}

.st-gallery-modal-buttons {
  display: flex;
  gap: 10px;
  padding: 0 30px 30px;
  justify-content: flex-end;
}

.st-gallery-modal-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.st-gallery-modal-cancel {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}
.st-gallery-modal-cancel:hover {
  background-color: #e9ecef;
  color: #495057;
}

.st-gallery-modal-confirm {
  background-color: #007cba;
  color: white;
}
.st-gallery-modal-confirm:hover {
  background-color: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

/* ============================================================================
 * Responsive Anpassungen
 * ============================================================================ */
@media (max-width: 768px) {
  .st-gallery-proceed-button,
  .st-gallery-clear-button,
  .st-gallery-select-all-button {
    bottom: 15px;
    padding: 10px 15px;
    font-size: 14px;
  }

  .st-gallery-proceed-button {
    bottom: 75px;
    right: 15px;
  }

  .st-gallery-clear-button {
    bottom: 15px;
    right: 15px;
  }

  .st-gallery-select-all-button {
    bottom: 135px;
    right: 15px;
  }

  .st-gallery-modal {
    margin: 20px;
    width: calc(100% - 40px);
  }

  .st-gallery-modal-message {
    padding: 25px 25px 15px;
    font-size: 15px;
  }

  .st-gallery-modal-buttons {
    flex-direction: column;
    padding: 0 25px 25px;
  }

  .st-gallery-modal-button {
    width: 100%;
  }
}
.st-gallery-floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.st-gallery-floating-buttons button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #444;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.st-gallery-floating-buttons button:hover {
  background: #666;
}

.st-gallery-floating-buttons button.selected {
  background: #28a745; /* grün bei Auswahl */
}
