/* 标签切换视图系统样式 - 清理版 v2.0 */
/* 保留功能性样式，移除与主系统冲突的样式 */

/* 空状态样式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c757d;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
    color: #adb5bd;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}

.empty-state-subtext {
    font-size: 14px;
    color: #adb5bd;
}

/* 错误状态样式 */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #dc3545;
    text-align: center;
}

.error-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-state-text {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}

.error-state-subtext {
    font-size: 14px;
    color: #6c757d;
}

/* 通知样式 */
.tab-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.tab-notification.success {
    background: #28a745;
}

.tab-notification.error {
    background: #dc3545;
}

.tab-notification.info {
    background: #007bff;
}

.tab-notification.warning {
    background: #ffc107;
    color: #212529;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载状态样式 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* 通用工具样式 */
.box-sizing-border {
    box-sizing: border-box;
}

/* 无障碍支持 */
.focus-visible:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 选择样式 */
.user-select-text::selection {
    background: rgba(0, 123, 255, 0.2);
    color: inherit;
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .tab-notification {
        transition: none;
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: transparent;
    }
    
    @keyframes slideInRight {
        from, to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .empty-state,
    .error-state,
    .loading-state {
        border: 1px solid currentColor;
        background: white;
    }
    
    .tab-notification {
        border: 2px solid white;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .empty-state {
        color: #adb5bd;
    }
    
    .empty-state-icon {
        color: #6c757d;
    }
    
    .empty-state-subtext {
        color: #6c757d;
    }
    
    .error-state-subtext {
        color: #adb5bd;
    }
    
    .loading-text {
        color: #adb5bd;
    }
    
    .loading-spinner {
        border-color: #495057;
        border-top-color: #007bff;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .empty-state {
        height: 250px;
        padding: 20px;
    }
    
    .empty-state-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .empty-state-text {
        font-size: 15px;
    }
    
    .error-state {
        height: 180px;
        padding: 20px;
    }
    
    .error-state-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .tab-notification {
        right: 10px;
        left: 10px;
        margin: 0 auto;
        max-width: calc(100vw - 20px);
    }
}

@media (max-width: 480px) {
    .empty-state-text,
    .error-state-text {
        font-size: 14px;
    }
    
    .empty-state-subtext,
    .error-state-subtext {
        font-size: 13px;
    }
    
    .tab-notification {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* 打印样式 */
@media print {
    .tab-notification,
    .loading-state {
        display: none;
    }
    
    .empty-state,
    .error-state {
        color: black;
        border: 1px solid black;
    }
}

/* 清理标记 2025-06-25 */

/* 隐藏"代码"按钮和代码显示区域 2025-12-20 */
.genspark-tab-button[data-tab="code"] {
    display: none !important;
}

.code-area[data-tab-content="code"],
#code-area {
    display: none !important;
}

#code-cards-container {
    display: none !important;
}