/**
 * 提示词配置面板组件样式（独立弹窗）
 */

/* ===== 弹窗遮罩 ===== */
.prompt-config-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(4px);
}

.prompt-config-overlay.show {
    display: block;
}

/* ===== 弹窗主体 ===== */
.prompt-config-modal {
    position: fixed;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%);
    width: 1100px;
    max-width: 98vw;
    max-height: 92vh;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 5px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    backdrop-filter: blur(20px);
    padding: 10px 0 5px;
}

.prompt-config-modal.hidden {
    display: none;
}

/* ===== 弹窗头部 ===== */
.prompt-config-header {
    padding: 3px 15px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.prompt-config-title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.prompt-config-tags-hint {
    font-size: 12px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    flex: 1;
    text-align: right;
}

.prompt-config-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.prompt-config-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== 主内容区：左右分栏 ===== */
.prompt-config-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* 左侧：配置区域 */
.prompt-config-left {
    width: 45%;
    border-right: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    flex-direction: column;
}

/* 右侧：预览区域 */
.prompt-config-right {
    width: 55%;
    display: flex;
    flex-direction: column;
}

/* ===== 弹窗主体内容 ===== */
.prompt-config-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== 配置行 ===== */
.prompt-config-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prompt-config-label {
    font-size: 13px;
    font-weight: 800;
    color: #00cc99;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt-config-tip {
    font-size: 11px;
    color: #64748b;
    font-weight: 400;
    background: rgba(100, 116, 139, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===== 输入框样式 ===== */
.prompt-config-input {
    background: #f2f2f2;
    border: 0px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: #000;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}

.prompt-config-input:focus {
    /* border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.1); */
}

.prompt-config-input::placeholder {
    color: #64748b;
}

/* ===== 文本域样式 ===== */
.prompt-config-textarea {
    background: #f2f2f2;
    border: 0px solid rgba(148, 163, 184, 0.2);
    border-radius: 3px;
    color: #000;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    min-height: 50px;
    overflow: hidden;
}

.prompt-config-textarea:focus {
    height: 400px;
}

.prompt-config-textarea::placeholder {
    color: #64748b;
}

/* ===== 预览区域样式 ===== */
.prompt-preview-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.prompt-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.prompt-preview-stats {
    font-size: 12px;
    background: #00cc99;
    padding: 2px 10px;
    border-radius: 4px;
}

/* 预览内容区域 */
.prompt-preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: #94a3b8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 预览模块样式 */
.preview-module {
    margin-bottom: 16px;
}

.preview-module:last-child {
    margin-bottom: 0;
}

.preview-module-title {
    font-size: 13px;
    font-weight: 600;
    color: #00cc99;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(56, 189, 248, 0.3);
}

.preview-module-content {
    color: #000;
    padding-left: 8px;
}

/* 预览模块为空时的样式 */
.preview-module-empty {
    color: #000;
    font-style: italic;
    font-size: 12px;
}

/* ===== 弹窗底部 ===== */
.prompt-config-footer {
    padding: 5px 24px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.prompt-config-actions {
    display: flex;
    gap: 10px;
}

/* ===== 按钮样式 ===== */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-save {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-save:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-cancel {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-cancel:hover {
    background: rgba(100, 116, 139, 0.3);
}

.btn-restore {
    background: #ddd;
    color: #00cc99;
    border: 1px solid #f5f5f5;
}

.btn-restore:hover {
    background: #ddd;
}

/* ===== 提示信息 ===== */
.prompt-config-hint {
    padding: 6px 24px 0px;
    font-size: 12px;
    color: #38bdf8;
    text-align: center;
}

/* ===== 响应式适配 ===== */
@media (max-width: 1024px) {
    .prompt-config-modal {
        width: 98vw;
    }
    
    .prompt-config-main {
        flex-direction: column;
    }
    
    .prompt-config-left,
    .prompt-config-right {
        width: 100%;
    }
    
    .prompt-config-left {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.15);
        max-height: 50vh;
    }
    
    .prompt-config-right {
        max-height: 35vh;
    }
}

@media (max-width: 768px) {
    .prompt-config-modal {
        max-height: 95vh;
    }
    
    .prompt-config-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
    }
    
    .prompt-config-tags-hint {
        text-align: left;
    }
    
    .prompt-config-footer {
        flex-direction: column;
        padding: 12px 16px;
    }
    
    .prompt-config-actions {
        width: 100%;
    }
    
    .btn-cancel, .btn-save {
        flex: 1;
    }
}

/* ===== 滚动条样式 ===== */
.prompt-config-body::-webkit-scrollbar,
.prompt-preview-content::-webkit-scrollbar {
    width: 5px;
}

.prompt-config-body::-webkit-scrollbar-track,
.prompt-preview-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.prompt-config-body::-webkit-scrollbar-thumb,
.prompt-preview-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.prompt-config-body::-webkit-scrollbar-thumb:hover,
.prompt-preview-content::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
