// Editor-specific styles for the accordion container block

.wp-block-vitalisite-fse-accordion {
  max-width: 100% !important;

  > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;

    > .wp-block {
      max-width: none;
      margin-left: 0;
      margin-right: 0;
    }

    > .block-list-appender {
      margin-top: 1rem;
    }
  }
}

/* Variant: Legacy (Boxed) */
.vitalisite-accordion-variant-legacy {
  .vitalisite-accordion-item {
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--image-radius);
    margin-bottom: var(--wp--preset--spacing--30);
    padding: 0;
    background-color: var(--wp--preset--color--base);
    overflow: hidden;

    summary {
      background-color: var(--wp--preset--color--base-soft);
      padding: var(--wp--preset--spacing--40);
      transition: background-color 0.3s ease;
    }

    &[open] summary {
      background-color: var(--wp--preset--color--primary);
      color: var(--wp--preset--color--base);
      margin-bottom: 0;

      &::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      }
    }
  }
}

/* Variant: Simple (Soft background on open) */
.vitalisite-accordion-variant-simple {
  .vitalisite-accordion-item[open] .wp-block-group {
    background-color: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--secondary-foreground);
    border-radius: var(--wp--custom--image-radius);
    margin-bottom: 0;
  }
}
