/**
 * Fundcollector - Block Editor Styles
 *
 * @package   Fundcollector
 * @author    Bruno Alesiani
 * @copyright Copyright (c) 2025, Bruno Alesiani
 */

/* Style for the block icon in the block editor */
.fundcollector-block-icon-svg {
  width: 20px;
  height: 20px;
  display: inline-block;
}

/* Style for the category icon */
.components-panel__body-toggle svg,
.block-editor-block-types-list__item-icon svg,
.editor-block-navigation__container svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
}

/* Color the SVG icon black */
.components-panel__body-toggle svg path,
.block-editor-block-types-list__item-icon svg path,
.editor-block-navigation__container svg path {
  fill: currentColor;
}

/* Style for the block preview in the block editor */
.fundcollector-block-preview {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fundcollector-block-icon {
  margin-bottom: 15px;
}

.fundcollector-block-icon img {
  width: 60px;
  height: 60px;
}

.fundcollector-block-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5em;
}

.fundcollector-block-content p {
  margin-bottom: 20px;
  color: #6c757d;
}

.fundcollector-block-notice {
  background-color: #e9ecef;
  border-left: 4px solid #007bff;
  padding: 10px 15px;
  font-size: 0.9em;
  color: #495057;
  margin-top: 10px;
  width: 100%;
  text-align: left;
}

/* Custom category icon */
.block-editor-block-types-list__item-icon .fundcollector-block-icon-svg {
  width: 24px;
  height: 24px;
}

/* Style for the icon in the block sidebar */
.components-panel__body .editor-block-icon .fundcollector-block-icon-svg {
  width: 24px;
  height: 24px;
}

/* Style for the control panel */
.fundcollector-controls .components-panel__body {
  border-top: 1px solid #e2e4e7;
}

.fundcollector-controls .components-panel__body-title {
  font-weight: 600;
}

.fundcollector-controls .components-base-control {
  margin-bottom: 15px;
}

.fundcollector-controls .components-base-control__help {
  font-style: italic;
  font-size: 0.9em;
  color: #6c757d;
}

/* Style for block warnings */
.fundcollector-no-forms-warning {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px 15px;
  font-size: 0.9em;
  color: #856404;
  margin: 10px 0;
  width: 100%;
  text-align: left;
}

.fundcollector-selected-form {
  background-color: #e9ecef;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 0.9em;
  width: 100%;
  text-align: left;
}

.fundcollector-inactive-warning {
  color: #856404;
  background-color: #fff3cd;
  border-radius: 3px;
  padding: 4px 8px;
  margin-top: 5px;
  font-size: 0.85em;
  display: inline-block;
}

/* Style for warnings in controls */
.components-notice.is-warning {
  margin: 8px 0 16px;
}
