/* editor.css - Styles für Editor */

/* Modal */
.editor-modal {
  display: none;
  position: fixed;
  z-index: 9998 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  overflow-y: auto; /* Gesamtes Modal scrollbar */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling iOS */
}

.editor-modal-content {
  background-color: #f5eadc;
  margin: 5% auto;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
	  z-index: 9998 !important;
  /* Keine feste Höhe mehr - wächst mit Inhalt */
}

.editor-close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  color: #333;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
}

.editor-close:hover {
  background-color: #f0f0f0;
}

.editor-title {
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

/* Upload Bereich */
.editor-upload-container {
  margin-bottom: 20px;
}

.editor-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.editor-upload-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #7d4f3d;
  border-radius: 12px;
  font-size: 14px;
}

.editor-remove-btn {
  display: none;
  padding: 10px 15px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.editor-remove-btn:hover {
  background: #cc0000;
}


/* Formular */
.editor-form {
  width: 100%;
}

.editor-form-group {
  margin-bottom: 20px;
}

.editor-success {
  text-align: center;
  padding: 30px;
  background: #f8fff8;
  border: 1px solid #4CAF50;
  border-radius: 8px;
  color: #2E7D32;
}

.editor-success p {
  margin: 10px 0;
}

/* Styles für Mengen-Auswahl - HORIZONTAL */
.quantity-options {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quantity-option {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 15px 10px;
  border: 1px solid #ccc; /* 👈 1px Border wie Input-Felder */
  border-radius: 12px; /* 👈 12px Border Radius */
  transition: all 0.3s ease;
  background: white;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  text-align: center;
  height: 40px; /* 👈 Feste Höhe wie Input-Felder */
  box-sizing: border-box; /* 👈 WICHTIG: Border in Höhe einrechnen */
}

.quantity-option:hover {
  border-color: #7d4f3d;
  background: #fafafa;
}

.quantity-option input[type="radio"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.quantity-option:has(input[type="radio"]:checked) {
  border-color: #7d4f3d;
  background: #f8f4f0;
  font-weight: bold;
}

.editor-canvas-container {
  margin: 20px auto;
  width: 100%;
  max-width: 500px;
  position: relative;
  overflow: hidden;
  border: 1px solid #7d4f3d;
  border-radius: 12px;
  background: #f9f9f9;
  min-height: 350px;
  display: flex; /* Flexbox für bessere Zentrierung */
  align-items: center; /* Vertikal zentrieren */
  justify-content: center; /* Horizontal zentrieren */
}

.editor-canvas {
  display: block;
  margin: 0 auto;
  width: 100% !important;
  height: auto;
  max-width: 100%; /* Verhindert Überlauf */
  max-height: 100%; /* Verhindert Überlauf */
}

.editor-modal .btn-primary {
	padding: 0.75rem 2rem;
  font-size: 1rem; 
}

.editor-form-group button.btn-primary {
  display: block;
  margin: 0 auto;
}


/* Mobile */
@media (max-width: 768px) {
  .quantity-options {
    flex-direction: column;
    gap: 8px;
  }
  
  .quantity-option {
    height: 50px; /* Etwas kleiner auf Mobile */
    padding: 12px 10px;
    font-size: 13px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .editor-modal {
    padding: 0;
  }
  
  .editor-modal-content {
    margin: 0;
    width: 100%;
    min-height: 100vh; /* Volle Höhe auf Mobile */
    border-radius: 0;
    padding: 60px 15px 20px;
    box-sizing: border-box; /* Padding in Höhe einrechnen */
  }
  
  .editor-upload-wrapper {
    flex-direction: column;
  }
  
  .editor-remove-btn {
    width: 100%;
    margin-top: 5px;
  }
  
  .editor-canvas-container {
    max-height: 35vh;
    min-height: 200px;
    margin: 10px auto;
  }
  
  .editor-close {
    right: 15px;
    top: 15px;
    background: rgba(255,255,255,0.9);
  }
}



/* Sehr kleine Displays */
@media (max-width: 480px) {
  .editor-modal-content {
    padding: 50px 10px 15px;
  }
  
  .editor-canvas-container {
    max-height: 30vh;
    min-height: 180px;
  }
  
  .editor-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
	@media (max-width: 768px) {
  .editor-canvas-container {
    max-height: 35vh;
    min-height: 300px;
    margin: 10px auto;
  }
}
	

