/* 回复编辑样式 */

/* 编辑状态样式 */
.reply-item.editing {
    border: 2px solid #007bff;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    transition: all 0.3s ease;
}

/* 编辑表单容器 */
.edit-reply-form {
    width: 100%;
}

.edit-form-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.edit-reply-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.edit-reply-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.edit-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 权限提示信息 */
.permission-info {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* 编辑状态提示动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.edit-status-alert {
    animation: slideInRight 0.3s ease-out;
}

/* 内联编辑样式 */
.inline-edit-form {
    position: relative;
}

.inline-edit-form .form-control {
    border: 2px solid #007bff;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.inline-edit-form .form-control:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 内联编辑器样式 */
.inline-editor {
    min-height: 150px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    background-color: white;
    font-family: inherit;
    line-height: 1.5;
    transition: all 0.3s ease;
    outline: none;
}

.inline-editor:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* CKEditor内联编辑器工具栏样式 */
.cke_inline {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.cke_inline .cke_toolbar {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}

.cke_inline .cke_button {
    border-radius: 3px !important;
}

.cke_inline .cke_button:hover {
    background-color: #e9ecef !important;
}

/* 编辑表单中的内联编辑器容器 */
.editor-container {
    margin-bottom: 16px;
}

.editor-container .inline-editor {
    width: 100%;
    box-sizing: border-box;
}

/* 编辑按钮样式 */
.edit-reply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-reply-btn:active {
    transform: translateY(0);
}

/* 加载状态 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .edit-form-container {
        padding: 12px;
    }
    
    .edit-form-actions {
        flex-direction: column;
    }
    
    .edit-form-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .edit-status-alert {
        max-width: 90%;
        right: 5%;
        left: 5%;
    }
}

/* 时间限制警告 */
.time-limit-warning {
    color: #dc3545;
    font-weight: 600;
}

.time-limit-info {
    color: #17a2b8;
    font-weight: 500;
}

/* 管理员编辑标识 */
.admin-edit-badge {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
}