/* 编辑器基础样式 */
.ai-html-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
}

.ai-html-editor-modal.show {
    display: block;
}

.ai-html-editor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.ai-html-editor-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-html-editor-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #343a40;
    margin: 0;
}

.ai-html-editor-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
}

.ai-html-editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.ai-html-editor-sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-html-editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-html-editor-toolbar {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.ai-html-editor-preview {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.ai-html-editor-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 按钮样式 */
.ai-html-editor-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ai-html-editor-btn-primary {
    background: #007bff;
    color: #fff;
}

.ai-html-editor-btn-primary:hover {
    background: #0056b3;
}

.ai-html-editor-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.ai-html-editor-btn-secondary:hover {
    background: #545b62;
}

.ai-html-editor-btn-danger {
    background: #dc3545;
    color: #fff;
}

.ai-html-editor-btn-danger:hover {
    background: #c82333;
}

/* 板块列表样式 */
.ai-html-editor-sections {
    flex: 1;
    overflow: auto;
    padding: 15px;
}

.ai-html-editor-section-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
}

.ai-html-editor-section-item h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #343a40;
}

.ai-html-editor-section-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* 元素编辑器样式 */
.ai-html-editor-element-editor {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e9ecef;
}

.ai-html-editor-element-property {
    margin-bottom: 15px;
}

.ai-html-editor-element-property label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #343a40;
}

.ai-html-editor-element-property input,
.ai-html-editor-element-property textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

/* 颜色选择器样式 */
.ai-html-editor-color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-html-editor-color-input-group input[type="color"] {
    width: 40px;
    padding: 0;
    height: 34px;
}

.ai-html-editor-color-input-group input[type="text"] {
    flex: 1;
}

.ai-html-editor-clear-color-btn {
    padding: 8px 12px;
    background: #e9ecef;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 消息提示样式 */
.ai-html-editor-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-html-editor-message-success {
    background: #d4edda;
    color: #155724;
}

.ai-html-editor-message-error {
    background: #f8d7da;
    color: #721c24;
}

.ai-html-editor-message-info {
    background: #cce5ff;
    color: #004085;
}

/* 预览区域选中样式 */
.ai-html-editor-selected {
    outline: 2px solid #007bff !important;
}

.selected-section {
    outline: 2px solid #28a745 !important;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .ai-html-editor-main {
        flex-direction: column;
    }
    
    .ai-html-editor-sidebar {
        width: 100%;
        height: 300px;
    }
}

/* 工具提示样式 */
.ai-html-editor-tooltip {
    position: relative;
}

.ai-html-editor-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
} 