/* Create Post Page Specific Styles */

.create-post-page .page-main-title {
    color: var(--dark-text);
    font-family: var(--font-display);
}

.create-post-form-section .form-wrapper {
    background-color: var(--light-text);
    /* Ensure the form wrapper itself doesn't have an unintended width restriction */
}

.create-post-form-section .form-label {
    color: var(--dark-text);
    margin-bottom: 0.75rem; 
}
.create-post-form-section .form-label .text-danger {
    font-size: 1.2em; 
    vertical-align: super;
}

.create-post-form-section .form-control-lg,
.create-post-form-section .form-select-lg {
    padding: 0.75rem 1.25rem; 
    font-size: 1rem;
    border-color: var(--border-color);
}
.create-post-form-section .form-control-lg:focus,
.create-post-form-section .form-select-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25);
}

/* Styles for Quill Editor Placeholder and Fallback Textarea */
/* This div wraps the Quill editor or the fallback textarea */
.mb-4 > #quillEditorContainer, 
.mb-4 > textarea#postContent { /* Target more specifically if it's a direct child */
    width: 100% !important; /* Add !important as a test to override other styles */
    box-sizing: border-box; /* Ensure padding and border are included in the width */
}

#quillEditorContainer {
    background-color: #fff; 
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: 300px; 
    /* width: 100%; /* Already set above with higher specificity */
}

/* Styles for the fallback textarea if Quill doesn't load */
textarea#postContent { 
    /* width: 100%; /* Already set above with higher specificity */
    min-height: 300px; 
    font-size: 1rem; 
    line-height: 1.5; 
    padding: 0.75rem 1.25rem; 
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    /* Ensure it's displayed as a block to take full width if not already */
    display: block; 
}
textarea#postContent:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25);
}


/* Quill's own toolbar and editor area */
.ql-toolbar.ql-snow {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    border-bottom: 0;
    width: 100%; 
    box-sizing: border-box; 
}
.ql-container.ql-snow {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    border-top: none; /* Ensure top border is only on toolbar */
    border-left: 1px solid var(--border-color); /* Match container border */
    border-right: 1px solid var(--border-color); /* Match container border */
    border-bottom: 1px solid var(--border-color); /* Match container border */
    width: 100%; 
    box-sizing: border-box;
    min-height: calc(300px - 42px); /* Adjust 42px based on your actual toolbar height */
}
.ql-editor {
    min-height: calc(300px - 42px - 2px - 1rem); /* Adjust considering padding (e.g., .ql-container padding) and borders */
    box-sizing: border-box;
    padding: 0.75rem 1.25rem; /* Add some padding inside the editor */
}


.create-post-form-section .publish-btn {
    font-weight: 500;
    padding: 0.75rem 2rem;
}
.create-post-form-section #saveDraftBtn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
}

#coverImagePreviewContainer {
    border: 1px dashed var(--border-color);
    padding: 0.5rem;
    background-color: var(--light-bg);
}
