/**
 * Mode Switch Styles
 * 
 * 第二阶段模式切换按钮的样式定义
 * 集成到processor.html的结果操作区域
 * 
 * @version 2.0.0
 * @author Phase Two Implementation
 */

/* ==========================================================================
   模式切换容器
   ========================================================================== */

.mode-switch-container {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    padding: 4px;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   模式切换按钮
   ========================================================================== */

.mode-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.mode-switch-btn:hover {
    background: var(--bg-hover, #f1f5f9);
    color: var(--text-primary, #334155);
}

.mode-switch-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.mode-switch-btn:active {
    transform: scale(0.98);
}

/* 激活状态 */
.mode-switch-btn.active {
    background: var(--primary-color, #3b82f6);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.mode-switch-btn.active:hover {
    background: var(--primary-hover, #2563eb);
    color: white;
}

/* ==========================================================================
   模式图标和文本
   ========================================================================== */

.mode-icon {
    font-size: 16px;
    line-height: 1;
}

.mode-text {
    font-weight: 500;
    font-size: 12px;
}

/* ==========================================================================
   特定模式样式
   ========================================================================== */

/* 流式模式 */
.stream-mode-btn.active {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stream-mode-btn.active:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
}

/* 追加模式 */
.append-mode-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.append-mode-btn.active:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 768px) {
    .mode-switch-container {
        margin-right: 8px;
        padding: 2px;
    }
    
    .mode-switch-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .mode-text {
        display: none;
    }
    
    .mode-icon {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .mode-switch-container {
        flex-direction: column;
        gap: 2px;
        margin-right: 6px;
    }
    
    .mode-switch-btn {
        padding: 3px 6px;
        min-width: 32px;
        justify-content: center;
    }
    
    .mode-icon {
        font-size: 12px;
    }
}

/* ==========================================================================
   深色模式支持
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .mode-switch-container {
        --bg-secondary: #1e293b;
        --bg-hover: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --border-color: #334155;
        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
    }
}

/* ==========================================================================
   高对比度模式支持
   ========================================================================== */

@media (prefers-contrast: high) {
    .mode-switch-container {
        border-width: 2px;
    }
    
    .mode-switch-btn {
        border: 1px solid transparent;
    }
    
    .mode-switch-btn.active {
        border-color: currentColor;
    }
}

/* ==========================================================================
   减少动画模式支持
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .mode-switch-btn {
        transition: none;
    }
}

/* ==========================================================================
   打印样式
   ========================================================================== */

@media print {
    .mode-switch-container {
        display: none;
    }
}
