/* Shared Editor Styles */

/* Overlay */
.reply-overlay,
.topic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

/* Editor Container */
#comment-editor,
#new-topic-editor {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    width: calc(75% - 40px);
    max-width: 900px;
}

#comment-editor form,
#new-topic-editor form {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Close Button */
.editor-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    padding: 5px;
    line-height: 1;
}

.editor-close:hover {
    color: var(--text-primary);
}

/* Form Elements */
.new-post-form-title,
.category-select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Toolbar */
.editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.editor-toolbar span {
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.editor-toolbar span:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.editor-toolbar span svg {
    width: 16px;
    height: 16px;
}

/* Content Area */
#comment,
#content {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Submit Buttons */
.form-submit {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.submit,
.publish-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.submit:hover,
.publish-button:hover {
    background-color: var(--accent-hover);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #comment-editor,
    #new-topic-editor {
        width: 100%;
        height: 100vh;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        max-width: none;
        border-radius: 0;
        padding: 20px;
    }

    #comment-editor form,
    #new-topic-editor form {
        height: calc(100vh - 40px);
        display: flex;
        flex-direction: column;
    }

    #comment,
    #content {
        flex: 1;
        resize: none;
    }

    .editor-toolbar {
        flex-wrap: wrap;
    }
}
