/* CoT Settings Styles */

.cot-items-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.cot-item-card {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s ease;
    position: relative;
}

.cot-item-card:last-child {
    border-bottom: none;
}

.cot-item-card:hover {
    background-color: #f9f9f9;
}

/* 锁定条目样式 */
.cot-item-card.locked {
    background: #fcfcfc;
}

.cot-item-card.locked .cot-item-name {
    color: #333;
    font-weight: 600;
}

.cot-item-card.locked::after {
    content: "🔒";
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 10px;
    opacity: 0.3;
    pointer-events: none;
}

/* 拖拽相关样式 */
.cot-item-card.dragging {
    position: fixed;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    opacity: 0.9;
    pointer-events: none; /* 让鼠标事件穿透到下面的元素 */
    transform: scale(1.02);
    transition: none;
}

.cot-item-placeholder {
    background: #f9f9f9;
    border: 2px dashed #ccc;
    border-radius: 10px;
    /* margin-bottom 不用加，因为 flex gap 会处理 */
}

/* 内容区域 */
.cot-item-content {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cot-item-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cot-item-preview {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按钮组 */
.cot-btn-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cot-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #f5f5f5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.cot-icon-btn:hover:not(:disabled) {
    background: #e0e0e0;
    color: #333;
}

.cot-icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cot-icon-btn.danger:hover {
    background: #fee;
    color: #d32f2f;
}

.cot-icon-btn svg {
    width: 16px;
    height: 16px;
}

/* 模态框只读样式 */
.cot-readonly-textarea {
    background-color: #f9f9f9;
    color: #666;
    cursor: default;
}

.cot-lock-notice {
    font-size: 12px;
    color: #d32f2f;
    background: #fff0f0;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* XML 说明按钮样式 */
.cot-help-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    border: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.2s;
}

.cot-help-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* XML 说明内容样式 */
.xml-tag-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.xml-tag-item:last-child {
    border-bottom: none;
}

.xml-tag-item code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #d63384;
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
}

.xml-tag-item p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #555;
}
