/**
 * Product Display Gutenberg Blocks Styles
 */

/* Block Editor Styles */
.proddisp-gutenberg-block .proddisp-placeholder {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  background: #f9f9f9;
}

.proddisp-gutenberg-block .proddisp-placeholder .components-placeholder__label {
  color: #2271b1;
  font-weight: 600;
}

.proddisp-gutenberg-block .proddisp-placeholder .components-placeholder__instructions {
  color: #666;
  margin-bottom: 20px;
}

.proddisp-gutenberg-block .proddisp-block-preview {
  position: relative;
}

.proddisp-gutenberg-block .proddisp-block-preview .proddisp-block-preview-header h3 .dashicons {
  color: #2271b1;
}

.proddisp-gutenberg-block .proddisp-block-preview .proddisp-block-preview-header .showcase-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proddisp-gutenberg-block .proddisp-block-preview .preview-grid .preview-item {
  transition: all 0.2s ease;
}

.proddisp-gutenberg-block .proddisp-block-preview .preview-grid .preview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.proddisp-gutenberg-block .proddisp-block-preview .preview-grid .preview-item .preview-image .dashicons {
  opacity: 0.3;
}

.proddisp-gutenberg-block .proddisp-block-preview .preview-grid .preview-item .preview-actions i {
  transition: all 0.2s ease;
}

.proddisp-gutenberg-block .proddisp-block-preview .preview-grid .preview-item .preview-actions i:hover {
  transform: scale(1.1);
}

/* Inspector Controls Styles */
.components-panel__body .proddisp-icon-selector .components-base-control__label {
  color: #1e1e1e;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.components-panel__body .proddisp-icon-selector .components-select-control__input {
  border-radius: 4px;
  border: 1px solid #ddd;
}

.components-panel__body .proddisp-icon-selector .components-select-control__input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.components-panel__body .showcase-info h4 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.components-panel__body .showcase-info h4:before {
  content: "✓";
  background: #46b450;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.components-panel__body .showcase-info p strong {
  color: #155724;
}

/* Block Alignment Styles */
.alignleft {
  float: left;
  margin-right: 20px;
  margin-bottom: 20px;
}

.alignright {
  float: right;
  margin-left: 20px;
  margin-bottom: 20px;
}

.aligncenter {
  text-align: center;
  margin: 20px auto;
}

.alignwide {
  max-width: 1200px;
  margin: 20px auto;
}

.alignfull {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Frontend Block Styles */
.proddisp-gutenberg-block {
  margin: 20px 0;
}

.proddisp-gutenberg-block.alignleft,
.proddisp-gutenberg-block.alignright {
  max-width: 50%;
}

.proddisp-gutenberg-block.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .proddisp-block-preview .preview-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .proddisp-block-preview .proddisp-block-preview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .proddisp-block-preview .proddisp-block-preview-header .showcase-badge {
    align-self: flex-start;
  }
  
  .proddisp-gutenberg-block.alignleft,
  .proddisp-gutenberg-block.alignright {
    float: none;
    max-width: none;
    margin: 20px 0;
  }
}

@media (max-width: 480px) {
  .proddisp-block-preview {
    padding: 16px;
  }
  
  .proddisp-block-preview .preview-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .proddisp-block-preview .proddisp-block-preview-header h3 {
    font-size: 16px;
  }
}

/* Animation Enhancements */
.proddisp-block-preview {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-item {
  animation: slideInUp 0.3s ease-out;
  animation-fill-mode: both;
}

.preview-item:nth-child(1) { animation-delay: 0.1s; }
.preview-item:nth-child(2) { animation-delay: 0.2s; }
.preview-item:nth-child(3) { animation-delay: 0.3s; }
.preview-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}