/* Fix CKEditor styles being overridden by Tailwind */
.ck-content > blockquote,
.ck-content > dl,
.ck-content > dd,
.ck-content > h1,
.ck-content > h2,
.ck-content > h3,
.ck-content > h4,
.ck-content > h5,
.ck-content > h6,
.ck-content > hr,
.ck-content > figure,
.ck-content > p,
.ck-content > pre {
    margin: revert;
}

.ck-content > ol,
.ck-content > ul {
    list-style: revert;
    margin: revert;
    padding: revert;
}

.ck-content > table {
    border-collapse: revert;
}

.ck-content > h1,
.ck-content > h2,
.ck-content > h3,
.ck-content > h4,
.ck-content > h5,
.ck-content > h6 {
    font-size: revert;
    font-weight: revert;
} 

/* Fix for oversized toolbar icons */
.ck.ck-toolbar {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem !important;
    background: #f8fafc;
}

.ck.ck-toolbar .ck-toolbar__items {
    display: flex;
    flex-wrap: wrap;
}

.ck.ck-toolbar .ck-button {
    padding: 0.25rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
    font-size: 0.875rem !important;
}

.ck.ck-toolbar .ck-button .ck-button__label {
    font-size: 0.875rem !important;
    line-height: 1 !important;
}

.ck.ck-toolbar .ck-icon {
    width: 1rem !important;
    height: 1rem !important;
}

.ck-editor__editable {
    min-height: 200px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.25rem !important;
    padding: 1rem !important;
    background: white !important;
}

/* Ensure the toolbar dropdown indicators aren't oversized */
.ck.ck-dropdown .ck-dropdown__arrow {
    width: 0.75rem !important;
    height: 0.75rem !important;
}

/* Reduce panel/dropdown size */
.ck.ck-panel {
    max-width: 15rem !important;
}

/* Ensure the editor has some spacing from other elements */
.ck-editor-container {
    margin-bottom: 1rem !important;
}

/* Reduce button hover/focus states */
.ck.ck-button:hover,
.ck.ck-button:focus {
    background: #e2e8f0 !important;
}

/* Fix word count position */
.word-count {
    display: block;
    text-align: right;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
} 