/* Create post page styles */

.create-post-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.create-post-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.create-post-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #181C1F;
    margin: 0;
}

.create-post-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #181C1F;
    margin-bottom: 8px;
}

.form-group .required {
    color: #ff4444;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    color: #181C1F;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #FF7A1A;
    box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* Editor toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #f6f7f8;
    border: 1px solid #d0d0d0;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #181C1F;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.toolbar-btn:hover {
    background: #e0e0e0;
    border-color: #d0d0d0;
}

.toolbar-btn:active {
    background: #d0d0d0;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #d0d0d0;
    margin: 0 4px;
}

.toolbar-select {
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    color: #181C1F;
    cursor: pointer;
    min-width: 80px;
}

.toolbar-select:focus {
    outline: none;
    border-color: #FF7A1A;
}

/* Editor content area */
.editor-content {
    min-height: 300px;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 0 0 4px 4px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.6;
    color: #181C1F;
    overflow-y: auto;
    outline: none;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.editor-content:focus {
    border-color: #FF7A1A;
    box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.1);
}

.editor-content[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: #999;
    pointer-events: none;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border-radius: 4px;
}

.editor-content p {
    margin: 8px 0;
}

.editor-content a {
    color: #FF7A1A;
    text-decoration: none;
}

.editor-content a:hover {
    text-decoration: underline;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.btn-submit,
.btn-cancel {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-submit {
    background: #FF7A1A;
    color: #FFFFFF;
}

.btn-submit:hover {
    background: #FF8A00;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-cancel {
    background: #f6f7f8;
    color: #181C1F;
    border: 1px solid #d0d0d0;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* Error message */
.form-error {
    color: #ff4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-error.show {
    display: block;
}

/* Image input dialog */
.image-input-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.image-input-dialog.show {
    display: flex;
}

.image-input-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.image-input-content h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.image-input-content input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    margin-bottom: 16px;
}

.image-input-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.image-input-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.image-input-actions .btn-confirm {
    background: #FF7A1A;
    color: #FFFFFF;
}

.image-input-actions .btn-cancel {
    background: #f6f7f8;
    color: #181C1F;
    border: 1px solid #d0d0d0;
}
