/* Ensure Trix toolbar buttons display properly with default styling */

/* Reset any potential interference with Trix button styling */
trix-toolbar button {
    /* Ensure default Trix styling is preserved */
    text-indent: 0 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    padding: 0.25rem 0.5rem !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    border-radius: 3px !important;
    margin: 0 1px !important;
    color: rgba(0, 0, 0, 0.6) !important;
    cursor: pointer !important;
    /* Ensure text content is visible */
    min-height: auto !important;
    height: auto !important;
    width: auto !important;
}

trix-toolbar button:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

trix-toolbar button.trix-active {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Prevent any custom icon interference */
trix-toolbar button svg {
    display: none !important;
}

/* Hide any potential spans or other elements that might have been added by custom code */
trix-toolbar button span {
    display: none !important;
}

/* Ensure Trix default button styling works */
trix-toolbar button[data-trix-attribute],
trix-toolbar button[data-trix-action] {
    display: inline-block !important;
    position: relative !important;
    vertical-align: middle !important;
}

/* Ensure the toolbar itself has proper spacing */
trix-toolbar {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem;
    background: #f9fafb;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

/* Ensure proper button group styling */
trix-toolbar .trix-button-group {
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: top;
}

trix-toolbar .trix-button-group:not(:last-child) {
    border-right: 1px solid #e5e7eb;
    padding-right: 0.5rem;
    margin-right: 1rem;
}

/* Ensure dialog styling doesn't interfere */
trix-toolbar .trix-dialog {
    position: absolute;
    z-index: 1000;
}