/* 多模态界面样式 */

/* AI 模型能力提示 */
.model-capability-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    color: #495057;
    border-radius: 8px 8px 0 0;
}

.capability-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.capability-text {
    font-weight: 500;
    color: #007bff;
}

.capability-limit {
    color: #6c757d;
    font-size: 12px;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.capability-limit::before {
    content: "";
    width: 4px;
    height: 4px;
    background: #ffc107;
    border-radius: 50%;
    margin-right: 6px;
}

/* 响应式：移动端优化 */
@media (max-width: 768px) {
    .model-capability-notice {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 12px;
    }
    
    .capability-limit {
        margin-left: 0;
        font-size: 11px;
    }
}

/* 输入控制区域 */
.input-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(248, 249, 250, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.model-selector {
    flex-shrink: 0;
}

.model-selector select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.model-selector select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.image-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.upload-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.upload-btn:hover {
    background: #0056b3;
}

.upload-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.image-preview {
    display: flex;
    gap: 8px;
    max-width: 400px;
    overflow-x: auto;
    padding: 4px 0;
}

.image-preview::-webkit-scrollbar {
    height: 4px;
}

.image-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.image-preview::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.image-preview::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.image-item {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.image-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

.image-item img:hover {
    transform: scale(1.05);
}

.image-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.image-remove:hover {
    background: #cc0000;
}

/* 多模态消息样式 */
.message.multimodal {
    position: relative;
}

.message.multimodal::before {
    content: "🖼️";
    position: absolute;
    top: 8px;
    left: -25px;
    font-size: 16px;
}

.message-images {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.message-images img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-images img:hover {
    transform: scale(1.02);
}

/* 模型状态指示器 */
.model-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.model-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

.model-status .status-dot.disconnected {
    background: #dc3545;
}

.model-status .status-dot.loading {
    background: #ffc107;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .model-selector select {
        min-width: auto;
        width: 100%;
    }
    
    .image-preview {
        max-width: 100%;
    }
    
    .message-images img {
        max-width: 150px;
        max-height: 150px;
    }
}

/* 图片全屏预览 */
.image-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.image-fullscreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-fullscreen .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
} 
        gap: 8px;
    }
    
    .model-selector select {
        min-width: auto;
        width: 100%;
    }
    
    .image-preview {
        max-width: 100%;
    }
    
    .message-images img {
        max-width: 150px;
        max-height: 150px;
    }
}

/* 图片全屏预览 */
.image-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.image-fullscreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-fullscreen .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
} 