/* Hide Trix caption field for RichEditor when hideCaptions is enabled */

/* Target the specific figcaption with attachment__caption class */
[data-hide-captions="true"] figcaption.attachment__caption {
    display: none !important;
}

/* Target figcaption with data-trix-placeholder attribute */
[data-hide-captions="true"] figcaption[data-trix-placeholder] {
    display: none !important;
}

/* Target any figcaption within the editor area */
[data-hide-captions="true"] .trix-content figcaption,
[data-hide-captions="true"] .trix-editor figcaption,
[data-hide-captions="true"] .fi-fo-rich-editor figcaption {
    display: none !important;
}

/* Target Filament's rich editor container */
[data-hide-captions="true"] .fi-fo-rich-editor .trix-content figcaption,
[data-hide-captions="true"] .fi-fo-rich-editor .trix-editor figcaption {
    display: none !important;
}

/* More specific targeting for the attachment caption */
[data-hide-captions="true"] .trix-content figure figcaption.attachment__caption,
[data-hide-captions="true"] .trix-editor figure figcaption.attachment__caption {
    display: none !important;
}

/* Hide the caption input field that appears when uploading images */
[data-hide-captions="true"] .trix-content figcaption input,
[data-hide-captions="true"] .trix-content figcaption textarea {
    display: none !important;
}

/* Alternative selectors for different Trix versions */
[data-hide-captions="true"] .trix-content .attachment__caption,
[data-hide-captions="true"] .trix-content .attachment__name,
[data-hide-captions="true"] .trix-content .attachment__size {
    display: none !important;
}

/* Hide caption fields in the editor */
[data-hide-captions="true"] .trix-content [data-trix-content-type] figcaption {
    display: none !important;
}

/* Hide any caption-related elements */
[data-hide-captions="true"] .trix-content .caption,
[data-hide-captions="true"] .trix-content .image-caption {
    display: none !important;
}

/* Global targeting for any figcaption when hideCaptions is enabled */
[data-hide-captions="true"] figcaption {
    display: none !important;
} 