/* widgets/elementor/css/elementor-widgets.css */

/* Base widget styles */
.affiliate-elementor-widget {
  width: 100%;
  position: relative;
}

/* Snippet container */
.affiliate-snippet-container {
  width: 100%;
  position: relative;
  overflow: visible;
  background: transparent;
}

.affiliate-snippet-container iframe {
  width: 100%;
  border: none;
  display: block;
  background: transparent;
}

/* Placeholder styles */
.affiliate-placeholder {
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.affiliate-placeholder p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Loading styles */
.affiliate-loading {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
  background: #f9f9f9;
  border-radius: 4px;
}

/* Editor specific styles */
.elementor-editor-active .affiliate-snippet-container {
  border: 1px dashed #ccc;
  background: #f9f9f9;
}

.elementor-editor-active .affiliate-snippet-container::before {
  content: 'Affiliate Snippet (Live preview on frontend)';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 12px;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

/* Responsive styles */
@media (max-width: 768px) {
  .affiliate-snippet-container {
    min-height: 150px;
  }

  .affiliate-placeholder {
    padding: 15px;
    min-height: 80px;
  }
}

/* Preview mode specific */
.elementor-preview-mode .affiliate-snippet-container {
  background: transparent;
  border: none;
}

.elementor-preview-mode .affiliate-snippet-container::before {
  display: none;
}
