/* 历史案例对话框样式 */

/* 对话框容器 */
.history-dialog {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* 对话框头部 */
.history-dialog-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.history-close-btn:hover {
    color: #333 !important;
    background: #f0f0f0 !important;
    border-radius: 50%;
}

/* 案例列表项 */
.history-case-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.history-case-item:active {
    background: #e9ecef !important;
}

.case-question {
    word-break: break-word;
    line-height: 1.4;
}

.case-info {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 平板设备 (768px 以下) */
@media (max-width: 768px) {
    .history-dialog {
        width: 95% !important;
        max-width: 500px !important;
        border-radius: 12px !important;
    }
    
    .history-dialog-content {
        min-height: 300px !important;
    }
    
    .history-dialog-header {
        padding: 15px !important;
    }
    
    .history-pagination {
        font-size: 12px !important;
    }
    
    .history-pagination button {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    
    .history-dialog-header h3 {
        font-size: 16px !important;
    }
    
    .history-close-btn {
        font-size: 26px !important;
        width: 30px !important;
        height: 30px !important;
    }
    
    .history-case-item {
        padding: 12px 15px !important;
    }
    
    .case-question {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .case-info {
        font-size: 12px !important;
    }
}

/* 手机设备 (480px 以下) */
@media (max-width: 480px) {
    .history-dialog {
        width: 95% !important;
        max-width: none !important;
        border-radius: 10px !important;
    }
    
    .history-dialog-content {
        min-height: 280px !important;
    }
    
    .history-dialog-header {
        padding: 12px 15px !important;
    }
    
    .history-pagination span {
        font-size: 11px !important;
    }
    
    .history-pagination button {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    
    .history-dialog-header h3 {
        font-size: 15px !important;
    }
    
    .history-close-btn {
        font-size: 24px !important;
        width: 28px !important;
        height: 28px !important;
    }
    
    .history-case-item {
        padding: 10px 12px !important;
    }
    
    .case-question {
        font-size: 13px !important;
        margin-bottom: 3px !important;
    }
    
    .case-info {
        font-size: 11px !important;
    }
}

/* 小屏手机 (360px 以下) */
@media (max-width: 360px) {
    .history-dialog {
        width: 98% !important;
        border-radius: 8px !important;
    }
    
    .history-dialog-content {
        min-height: 250px !important;
    }
    
    .history-dialog-header {
        padding: 10px 12px !important;
    }
    
    .history-pagination {
        padding: 10px 12px !important;
    }
    
    .history-pagination span {
        font-size: 10px !important;
    }
    
    .history-pagination button {
        padding: 4px 8px !important;
        font-size: 10px !important;
    }
    
    .history-dialog-header h3 {
        font-size: 14px !important;
    }
    
    .history-close-btn {
        font-size: 22px !important;
        width: 26px !important;
        height: 26px !important;
    }
    
    .history-case-item {
        padding: 8px 10px !important;
    }
    
    .case-question {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }
    
    .case-info {
        font-size: 10px !important;
    }
}

/* 内容区域样式 */
.history-dialog-content {
    overflow: hidden;
    min-height: 360px; /* 6个案例的最小高度 */
}

/* 分页按钮样式 */
.history-pagination button:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.history-pagination button:not(:disabled):hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: all 0.2s;
}

.history-pagination button:not(:disabled):active {
    transform: translateY(0);
}

/* 空状态 */
.history-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.history-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.history-empty-text {
    font-size: 14px;
}

/* 加载状态 */
.history-loading {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.history-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 主题适配 */

/* 古典风格 */
body[data-theme="classic"] .history-dialog {
    background: rgba(255, 253, 245, 0.98) !important;
    border: 2px solid #d4af37;
}

body[data-theme="classic"] .history-dialog-header {
    border-bottom-color: #d4af37 !important;
}

body[data-theme="classic"] .history-dialog-header h3 {
    color: #8b4513;
    font-family: "KaiTi", "楷体", "STKaiti", serif;
}

body[data-theme="classic"] .history-close-btn {
    color: #8b4513 !important;
}

body[data-theme="classic"] .history-close-btn:hover {
    background: rgba(244, 235, 220, 0.8) !important;
}

body[data-theme="classic"] .history-case-item {
    font-family: "KaiTi", "楷体", "STKaiti", serif;
}

body[data-theme="classic"] .case-question {
    color: #654321 !important;
}

body[data-theme="classic"] .case-info {
    color: #8b7355 !important;
}

/* 简约风格 */
body[data-theme="modern"] .history-dialog {
    border-radius: 0 !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

body[data-theme="modern"] .history-dialog-header {
    border-bottom-color: #e0e0e0 !important;
}

body[data-theme="modern"] .history-dialog-header h3 {
    font-weight: 300;
    letter-spacing: 2px;
}

body[data-theme="modern"] .history-close-btn {
    color: #666 !important;
}

body[data-theme="modern"] .history-close-btn:hover {
    background: #f5f5f5 !important;
    border-radius: 0 !important;
}

body[data-theme="modern"] .case-question {
    font-weight: 400;
}
