/**
 * CTA Transform Block Editor Styles
 * Save as: /assets/cta-transform-editor.css
 */

/* Block Editor Wrapper */
.cta-transform-block-editor {
  /* background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  position: relative; */
}

/* CTA Content in Editor */
.cta-content-editor {
  text-align: center;
  padding: 20px;
}

/* removed unused: .cta-headline-editor */

/* removed unused: .cta-subheadline-editor */

/* removed unused: .cta-copy-editor */

.cta-button-preview {
  display: inline-block;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: var(--wp--preset--font-size--base);
  font-weight: 600;
  cursor: default;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Features in Editor */
/* removed unused: .cta-features-editor */

/* removed unused: .cta-feature-editor */

/* removed unused: .cta-feature-check */

/* Form Section in Editor */
.form-section-editor {
  /* background: #f7fafc;
  border: 2px dashed #cbd5e0;
  border-radius: 15px; */
  position: relative;
}

.form-header-editor {
  text-align: center;
  margin-bottom: 20px;
}

/*.form-header-editor h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 8px 0;
}

.form-header-editor p {
  color: #718096;
  margin: 0 0 8px 0;
  font-size: 14px;
} */

.form-note {
  display: inline-block;
  background: #fef5e7;
  color: #f39c12;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

/* Inspector Controls Styling */
.components-panel__body .components-base-control {
  margin-bottom: 20px;
}

.components-panel__body .components-color-palette {
  margin-top: 10px;
}

/* Media Upload Button */
.components-panel__body .image-button {
  width: 100%;
  height: auto;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.components-panel__body .image-button img {
  width: 100%;
  height: auto;
  display: block;
}

/* Feature controls in sidebar */
.components-panel__body .components-button.is-destructive.is-small {
  margin-left: 8px;
}

/* Color picker labels */
.components-base-control__label {
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

/* Responsive adjustments for editor */
@media (max-width: 768px) {
  .cta-transform-block-editor {
    padding: 20px;
  }

  .cta-headline-editor {
    font-size: 24px;
  }

  .cta-subheadline-editor {
    font-size: 16px;
  }

  .cta-features-editor {
    gap: 16px;
  }

  .form-section-editor {
    padding: 20px;
  }
}

/* Block selected state */
.wp-block-cta-transform-cta-block.is-selected .cta-transform-block-editor {
  box-shadow: 0 0 0 2px #667eea;
}

/* Placeholder states */
/* removed unused: placeholder states */

/* Animation preview indicator */
/* .cta-transform-block-editor::after {
  content: "⚡ Animation triggers on frontend";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
} */

/* Block toolbar adjustments */
.wp-block-cta-transform-cta-block .block-editor-block-toolbar {
  margin-bottom: 10px;
}

/* Hover states in editor */
.cta-button-preview:hover {
  opacity: 0.9;
  cursor: pointer;
}

/* Sidebar panel styles */
.components-panel__body.is-opened .components-panel__body-title {
  font-weight: 600;
}

/* Feature list item styles in sidebar */
.components-panel__body input[type="text"] {
  width: 100%;
}

/* Add feature button */
.components-panel__body .components-button.is-primary {
  width: 100%;
  justify-content: center;
}

/* Background image preview in sidebar */
.components-panel__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 10px;
}

/* Remove background button */
.components-panel__body .components-button.is-destructive:not(.is-small) {
  width: 100%;
  margin-top: 10px;
  justify-content: center;
}

/* Toggle control spacing */
.components-toggle-control {
  margin-bottom: 16px;
}

/* Text control spacing */
.components-text-control__input,
.components-textarea-control__input {
  font-size: 14px;
}

/* Panel body padding adjustments */
.components-panel__body.is-opened {
  padding: 16px;
}

/* Color palette wrapper */
.components-color-palette__custom-color {
  margin-top: 10px;
}

/* Make sure the block takes full width in editor */
.wp-block-cta-transform-cta-block {
  max-width: none;
}

/* Ensure proper spacing between elements */
.cta-transform-block-editor > * + * {
  margin-top: 20px;
}

/* Fix for nested blocks alignment */
/* removed unused: .form-innerblocks-wrapper .wp-block */

/* Accessibility improvements */
.cta-transform-block-editor:focus-within {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .cta-transform-block-editor::after {
    display: none;
  }

  .form-note {
    display: none;
  }
}

/* ===== Frontend: Standalone CTA button + inline form ===== */
.cta-transform-button {
  display: inline-block;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: var(--wp--preset--font-size--base);
  font-family: var(--wp--preset--font-family--harmonia);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: auto;
}

.form-container.inline {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transition: max-height 300ms ease, opacity 200ms ease, transform 200ms ease;
  will-change: max-height, opacity, transform;
  margin-top: 14px;
  overflow: hidden;
  text-align: left;
}

.form-container.inline.active {
  max-height: 2000px; /* sufficiently large to accommodate form */
  max-width: 60rem;
  padding: 1rem;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.form-container.inline .form-header {
  display: flex;
  justify-content: flex-end;
}

.form-container.inline .close-btn {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.form-content {
  width: 54rem;
  max-width: 90%;
}
.cta-inline-wrapper {
  text-align: center;
}
