/* ============================================
   移动端工作流弹窗专用样式
   版本: 2.0
   描述: 专门为移动端设计的工作流详情弹窗样式
   ============================================ */

/* ============================================
   基础样式和重置
   ============================================ */

/* 基础重置 */
#mobileWorkflowModal {
    margin: 0;
    padding: 0;
}

.mobile-workflow-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-workflow-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-workflow-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 100vw;
    max-height: 98vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 
        0 -10px 25px rgba(0, 0, 0, 0.15),
        0 -4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.mobile-workflow-modal-overlay.active .mobile-workflow-modal-container {
    transform: translateY(0);
}

/* ============================================
   头部区域样式
   ============================================ */

.mobile-workflow-header {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    min-height: 60px;
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mobile-workflow-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-header-indicator {
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.mobile-workflow-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
}

.mobile-workflow-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-workflow-close-btn:hover,
.mobile-workflow-close-btn:active {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
    transform: scale(0.95);
}

/* ============================================
   内容区域样式
   ============================================ */

.mobile-workflow-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: #f8fafc;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ============================================
   图片展示区域
   ============================================ */

.mobile-image-section {
    background: #ffffff;
    margin-bottom: 1px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.mobile-main-image-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 200px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    box-sizing: border-box;
}

.mobile-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.mobile-main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: manipulation;
    will-change: transform;
    background: #000;
}

.mobile-main-video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.8);
}

.mobile-main-video::-webkit-media-controls-play-button,
.mobile-main-video::-webkit-media-controls-timeline,
.mobile-main-video::-webkit-media-controls-current-time-display,
.mobile-main-video::-webkit-media-controls-time-remaining-display,
.mobile-main-video::-webkit-media-controls-mute-button,
.mobile-main-video::-webkit-media-controls-volume-slider,
.mobile-main-video::-webkit-media-controls-fullscreen-button {
    color: white;
}

.mobile-media-item {
    background: transparent;
    border-radius: 0;
}

/* 图片指示器 - 简约风格 */
.mobile-image-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* 滑动提示 */
.mobile-swipe-hint {
    display: none;
}

.mobile-swipe-text {
    display: block;
}

@keyframes pulseHint {
    0%, 50%, 100% { opacity: 0.8; }
    25%, 75% { opacity: 1; }
}

/* 图片导航按钮 */
.mobile-nav-btn {
    display: none;
}

.mobile-prev-btn {
    left: 16px;
}

.mobile-next-btn {
    right: 16px;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:active {
    background: white;
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 缩略图区域 - 简约风格 */
.mobile-thumbnails-section {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.mobile-thumbnails-section .mobile-thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 3px 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mobile-thumbnails-section .mobile-thumbnails-container::-webkit-scrollbar {
    display: none;
}

.mobile-thumbnail-item {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
    position: relative;
    background: white;
}

.mobile-thumbnail-item.active {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #60a5fa, #c084fc) border-box;
    box-shadow: 0 2px 6px rgba(96, 165, 250, 0.3);
}

.mobile-thumbnail-item img,
.mobile-thumbnail-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8fafc;
}

/* 禁用缩略图视频的交互和控制 */
.mobile-thumbnail-item video {
    pointer-events: none;
}

/* 隐藏视频的原生控制按钮 - WebKit浏览器 */
.mobile-thumbnail-item video::-webkit-media-controls {
    display: none !important;
}

.mobile-thumbnail-item video::-webkit-media-controls-enclosure {
    display: none !important;
}

.mobile-thumbnail-item video::-webkit-media-controls-panel {
    display: none !important;
}

/* 隐藏视频的原生控制按钮 - Firefox */
.mobile-thumbnail-item video::-moz-media-controls {
    display: none !important;
}

.mobile-thumbnail-item:active {
    transform: scale(0.96);
    transition-duration: 0.1s;
}

/* 视频缩略图播放图标 - 优化版 */
.mobile-thumbnail-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 10;
    pointer-events: none;
    transition: all 0.2s ease;
}

.mobile-thumbnail-video-icon .material-icons {
    color: white;
    font-size: 16px;
}

/* 移动端：点击时的视觉反馈（替代PC端的hover） */
.mobile-thumbnail-item:active .mobile-thumbnail-video-icon {
    background: rgba(59, 130, 246, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ============================================
   信息卡片区域
   ============================================ */

.mobile-info-section {
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 整体信息容器 */
.mobile-info-container {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.6);
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-info-container:hover {
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.mobile-info-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    overflow: visible;
    transition: none;
}

.mobile-info-card:last-child {
    border-bottom: none;
}

.mobile-info-card:hover {
    box-shadow: none;
    transform: none;
}

.mobile-card-header {
    padding: 18px 24px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(241, 245, 249, 0.6);
}

.mobile-card-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.basic-info-icon {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.description-icon {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.process-icon {
    background: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.mobile-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
}

.mobile-card-content {
    padding: 16px 24px 24px;
}

/* 信息行样式 */
.mobile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    gap: 12px;
}

.mobile-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mobile-info-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 80px;
}

.mobile-info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    line-height: 1.4;
}

/* 描述区域样式 */
.mobile-description-wrapper {
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.3);
}

.mobile-description-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
    word-break: break-word;
}

/* 流程步骤样式 */
.mobile-process-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-process-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mobile-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.mobile-step-content {
    flex: 1;
    padding-top: 2px;
}

.mobile-step-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    font-weight: 500;
}

/* ============================================
   操作按钮区域
   ============================================ */

.mobile-action-section {
    background: white;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    padding: 20px;
    position: sticky;
    bottom: 0;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mobile-consult-btn {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 6px rgba(59, 130, 246, 0.25),
        0 2px 4px rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.mobile-consult-btn:hover,
.mobile-consult-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 8px 12px rgba(59, 130, 246, 0.3),
        0 4px 6px rgba(59, 130, 246, 0.2);
}

.mobile-consult-btn:active {
    transform: translateY(0) scale(0.98);
}

.mobile-btn-icon {
    font-size: 20px;
}

.mobile-btn-text {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* 按钮波纹效果 */
.mobile-consult-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.mobile-consult-btn:active::before {
    width: 300px;
    height: 300px;
}

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

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .mobile-workflow-header {
        padding: 12px 16px;
    }
    
    .mobile-workflow-title {
        font-size: 16px;
    }
    
    .mobile-thumbnails-section {
        padding: 14px 16px;
    }
    
    .mobile-thumbnails-container {
        gap: 8px;
        padding: 3px 0 !important;
    }
    
    .mobile-thumbnail-item {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }
    
    .mobile-info-section {
        padding: 16px;
    }
    
    .mobile-info-container {
        border-radius: 16px;
    }
    
    .mobile-card-header {
        padding: 14px 18px 10px;
    }
    
    .mobile-card-content {
        padding: 12px 18px 20px;
    }
    
    .mobile-action-section {
        padding: 16px;
    }
    
    .mobile-consult-btn {
        height: 50px;
        font-size: 15px;
    }
}

/* 大屏移动设备优化 */
@media (min-width: 430px) {
    .mobile-main-image-wrapper {
        min-height: 242px;
    }
    
    .mobile-thumbnails-section {
        padding: 18px 24px;
    }
    
    .mobile-thumbnails-container {
        gap: 12px;
        padding: 3px 0 !important;
    }
    
    .mobile-thumbnail-item {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }
}

/* ============================================
   动画和过渡效果
   ============================================ */

/* 淡入动画 */
@keyframes mobileModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 滑入动画 */
@keyframes mobileModalSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 卡片悬停动画 */
.mobile-info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   深色模式支持（可选）
   ============================================ */

@media (prefers-color-scheme: dark) {
    .mobile-workflow-modal-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .mobile-workflow-modal-container,
    .mobile-workflow-header,
    .mobile-info-card,
    .mobile-action-section {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .mobile-workflow-title,
    .mobile-card-title,
    .mobile-info-value {
        color: #f9fafb;
    }
    
    .mobile-info-label,
    .mobile-description-text,
    .mobile-step-text {
        color: #d1d5db;
    }
    
    .mobile-description-wrapper {
        background: #374151;
        border-color: #4b5563;
    }
    
    .mobile-workflow-close-btn {
        background: rgba(107, 114, 128, 0.2);
        color: #d1d5db;
    }
}

/* ============================================
   无障碍支持
   ============================================ */

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .mobile-info-card {
        border: 2px solid #000;
    }
    
    .mobile-consult-btn {
        border: 2px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .mobile-swipe-hint {
        animation: none;
    }
}
