/**
 * ============================================================================
 * vmsSwitchBtn.css - 视频模式切换按钮样式 v5.0
 * 现代化设计 | 模块化架构 | 完整主题适配
 * ============================================================================
 */

/* ============================================
   CSS变量 - 主题色彩系统
   ============================================ */
:root {
    /* 气泡卡片 - 明亮主题 */
    --vms-card-bg-light: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --vms-card-text-light: #ffffff;
    --vms-card-shadow-light: 0 10px 40px rgba(102, 126, 234, 0.4);
    
    /* 气泡卡片 - 暗黑主题 */
    --vms-card-bg-dark: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --vms-card-text-dark: #ffffff;
    --vms-card-shadow-dark: 0 10px 40px rgba(79, 70, 229, 0.5);
}

/* ============================================
   按钮容器
   ============================================ */
.vms-fab {
    position: fixed;
    bottom: 100px;
    right: 8px;
    z-index: 502;
    isolation: isolate;
}

/* ============================================
   主按钮样式
   ============================================ */
.vms-fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 48px;
    padding: 0 14px;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    background-color: var(--color-bg-1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 
                0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    overflow: hidden;
    position: relative;
}

.vms-fab-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 
                0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    gap: 10px;
}

.vms-fab-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 图标样式 */
.vms-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.vms-fab-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--color-text-3);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.vms-fab-btn:hover .vms-fab-icon svg {
    transform: scale(1.1);
}

/* 文字样式 - PC端悬停展开 */
.vms-fab-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vms-fab-btn:hover .vms-fab-text {
    max-width: 120px;
    opacity: 1;
}

/* 激活状态指示器 */
.vms-fab-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #34d399);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 0 0 2px var(--color-bg-1);
}

.vms-fab-btn.active .vms-fab-indicator {
    opacity: 1;
    transform: scale(1);
    animation: vms-indicator-pulse 2s ease-in-out infinite;
}

@keyframes vms-indicator-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px var(--color-bg-1), 0 0 4px rgba(16, 185, 129, 0.5);
    }
    50% {
        box-shadow: 0 0 0 2px var(--color-bg-1), 0 0 10px rgba(16, 185, 129, 0.8);
    }
}

/* ============================================
   气泡卡片样式 - 现代化设计
   ============================================ */
.vms-bubble-card {
    position: fixed;
    z-index: 503;
    max-width: 280px;
    padding: 16px 20px;
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    
    /* PC端位置：按钮左侧 */
    bottom: 100px;
    right: 70px;
}

.vms-bubble-card.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

/* 卡片内容布局 */
.vms-bubble-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* 卡片图标 */
.vms-bubble-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.vms-bubble-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 卡片文字区域 */
.vms-bubble-text {
    flex: 1;
}

.vms-bubble-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.vms-bubble-desc {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* 关闭按钮 */
.vms-bubble-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.vms-bubble-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.vms-bubble-close svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
}

/* 箭头 - 指向右边按钮 */
.vms-bubble-card::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 10px solid transparent;
    border-right: none;
}

/* 进度条动画 */
.vms-bubble-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 16px 16px;
    animation: vms-progress 5s linear forwards;
}

@keyframes vms-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================
   暗黑主题
   ============================================ */
html[dark="true"] .vms-bubble-card {
    background: var(--vms-card-bg-dark);
    color: var(--vms-card-text-dark);
    box-shadow: var(--vms-card-shadow-dark);
}

html[dark="true"] .vms-bubble-card::after {
    border-left-color: #4f46e5;
}

/* ============================================
   明亮主题
   ============================================ */
html[dark="false"] .vms-bubble-card,
html:not([dark]) .vms-bubble-card {
    background: var(--vms-card-bg-light);
    color: var(--vms-card-text-light);
    box-shadow: var(--vms-card-shadow-light);
}

html[dark="false"] .vms-bubble-card::after,
html:not([dark]) .vms-bubble-card::after {
    border-left-color: #667eea;
}

/* ============================================
   响应式 - 移动端
   ============================================ */
@media (max-width: 768px) {
    .vms-fab {
        bottom: 155px;
        right: 8px;
    }
    
    /* 移动端按钮：圆形，无文字 */
    .vms-fab-btn {
        height: 40px;
        width: 40px;
        padding: 0;
        border-radius: 50%;
    }
    
    .vms-fab-icon {
        width: 20px;
        height: 20px;
    }
    
    .vms-fab-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .vms-fab-text {
        display: none !important;
    }
    
    .vms-fab-btn:hover {
        gap: 0;
    }
    
    .vms-fab-indicator {
        top: 2px;
        right: 2px;
        width: 8px;
        height: 8px;
    }
    
    /* 移动端气泡卡片：按钮上方 */
    .vms-bubble-card {
        bottom: auto;
        right: 8px;
        top: auto;
        bottom: 205px;
        max-width: calc(100vw - 24px);
        transform: translateY(20px) scale(0.9);
    }
    
    .vms-bubble-card.show {
        transform: translateY(0) scale(1);
    }
    
    /* 箭头改为向下指 */
    .vms-bubble-card::after {
        right: 12px;
        top: auto;
        bottom: -10px;
        transform: none;
        border: 10px solid transparent;
        border-bottom: none;
    }
    
    html[dark="true"] .vms-bubble-card::after {
        border-left-color: transparent;
        border-top-color: #4f46e5;
    }
    
    html[dark="false"] .vms-bubble-card::after,
    html:not([dark]) .vms-bubble-card::after {
        border-left-color: transparent;
        border-top-color: #667eea;
    }
}

/* 超小屏幕 */
@media (max-width: 380px) {
    .vms-bubble-card {
        padding: 14px 16px;
    }
    
    .vms-bubble-icon {
        width: 32px;
        height: 32px;
    }
    
    .vms-bubble-title {
        font-size: 13px;
    }
    
    .vms-bubble-desc {
        font-size: 11px;
    }
}