/**
 * Configurator Embed Styles - Frontend
 */

.configurator-main-wrapper {
  width: 100%;
  margin-bottom: 30px;
}

.configurator-wrapper {
  margin: 30px 0;
}

.configurator-wrapper h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.configurator-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 90vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.configurator-iframe {
  border: none;
  display: block;
}

/* Loading state */
.configurator-iframe-wrapper.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification styles */
.configurator-notification {
  margin: 15px 0;
  padding: 15px 20px;
  border-radius: 4px;
  display: none;
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.configurator-notification.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.configurator-notification.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.configurator-notification.info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* Cart item badge */
.configurator-badge {
  display: inline-block;
  background: #0073aa;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-left: 5px;
  font-weight: bold;
}

/* Cart item details */
.configurator-details {
  margin-top: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-left: 3px solid #0073aa;
  border-radius: 3px;
}

.configurator-summary {
  cursor: pointer;
  color: #0073aa;
  font-weight: 500;
  user-select: none;
}

.configurator-summary:hover {
  text-decoration: underline;
}

.configurator-config {
  background: white;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 10px;
  margin-top: 8px;
  overflow-x: auto;
  max-height: 250px;
  overflow-y: auto;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {  
  .configurator-wrapper h2 {
    font-size: 1.25rem;
  }
}