/* Zaun Konfigurator Styles */

/* Main container styles */
.zaun-configurator-container {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Options section */
.zaun-configurator-option {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.zaun-configurator-option h3 {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  font-size: 18px;
}

/* Option elements */
.zoption-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.zoption-element {
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f5f5;
  transition: all 0.2s ease;
}

.zoption-element:hover {
  background: #e9e9e9;
}

.zoption-element.selected {
  background: #e7f0fd;
  border-color: #4a90e2;
  color: #2c6cb8;
  font-weight: 500;
}

/* Custom RAL input */
.hidden_input {
  display: none;
  margin-top: 15px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.hidden_input.open {
  display: block;
}

.hidden_input input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  max-width: 200px;
}

/* Quantity controls */
.qty-wrapper {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.qty-crease {
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border: 1px solid #ddd;
  font-size: 18px;
  user-select: none;
}

.qty-crease.in {
  border-radius: 0 4px 4px 0;
}

.qty-crease.de {
  border-radius: 4px 0 0 4px;
}

.qty-wrapper input {
  width: 50px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  border-left: none;
  border-right: none;
}

/* Summary panel */
.zaun-summary-panel {
  position: sticky;
  top: 100px;
  background: #fff;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.zaun-summary-panel h3 {
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.zaun-price-total {
  font-size: 24px;
  font-weight: bold;
  color: #2c6cb8;
  margin: 15px 0;
}

/* Add to cart button */
.add-to-cart-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  margin-top: 15px;
}

.add-to-cart-btn:hover {
  background: #45a049;
}

.add-to-cart-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

/* Loading spinner */
.add-to-cart-btn.loading {
  position: relative;
  color: transparent;
}

.add-to-cart-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Share button */
.share-config-btn {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
}

.share-config-btn:hover {
  background: #3a7bc8;
}

.share-config-btn svg {
  margin-right: 5px;
  width: 16px;
  height: 16px;
}

/* Notification messages */
.woocommerce-message,
.woocommerce-error {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 9999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: opacity 0.5s;
}

.woocommerce-message {
  background: #4CAF50;
  color: white;
}

.woocommerce-error {
  background: #f44336;
  color: white;
}

/* Responsive styles */
@media (max-width: 768px) {
  .zoption-options {
    flex-direction: column;
  }
  
  .zaun-summary-panel {
    position: static;
  }
}

/* Extra spacing helpers */
.mtop35p {
  margin-top: 35px;
}

/* Hidden quantity inputs */
.hidden_qty {
  display: none;
}

.hidden_qty.neg {
  display: block;
}
