/* 镜像/真实号码切换开关组件样式 */

.mirror-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* 移除自动外边距，由父容器控制 */
    padding: 4px 8px; /* 减少内边距 */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px; /* 稍微减小圆角 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: auto; /* 自适应宽度 */
    transition: all 0.3s ease;
    position: relative;
    z-index: 100; /* 确保在翻牌器上方显示 */
}

.mirror-switch-container:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* 移除标签样式，因为不再显示"数据源："文字 */

/* 主要的切换开关 */
.mirror-toggle-switch {
    position: relative;
    display: inline-block;
    width: 100px; /* 稍微减小宽度 */
    height: 24px; /* 修改：稍微减小高度，确保滑块更好居中 */
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 12px; /* 修改：调整圆角匹配新高度 */
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.mirror-toggle-switch:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 切换开关的滑块 */
.mirror-toggle-slider {
    position: absolute;
    top: 3px; /* 修改：精确计算垂直居中 (24px-2px border-16px)/2 + 2px = 4px */
    left: 2px;
    width: 46px; /* 调整滑块宽度 */
    height: 16px; /* 修改：调整滑块高度，确保在24px开关内居中 */
    background: linear-gradient(135deg, #3498db, #2980b9); /* 修改：使用蓝色背景，经典大方 */
    border-radius: 8px; /* 修改：调整圆角匹配新高度 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3); /* 减少内部高光，适应蓝色背景 */
}

/* 激活状态（镜像模式） */
.mirror-toggle-switch.active {
    background: linear-gradient(135deg, #5d6d7e, #85929e);
    border-color: rgba(255, 255, 255, 0.4);
}

.mirror-toggle-switch.active .mirror-toggle-slider {
    transform: translateX(48px); /* 调整滑动距离匹配新尺寸 */
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* 修改：镜像模式使用绿色，与走马灯一致 */
    box-shadow: 
        0 2px 6px rgba(46, 204, 113, 0.4), /* 修改：绿色阴影 */
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 文字标签 */
.mirror-toggle-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px; /* 修改：进一步减小文字，适应更小的滑块 */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95); /* 增加不透明度，提高可读性 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); /* 增强文字阴影，确保在红色背景上可见 */
    pointer-events: none;
    transition: opacity 0.2s ease;
    line-height: 1; /* 确保文字垂直居中 */
}

.mirror-toggle-text.left {
    left: 8px; /* 修改：调整左侧文字位置，在46px滑块内居中 */
}

.mirror-toggle-text.right {
    right: 8px; /* 修改：调整右侧文字位置，在剩余空间内居中 */
}

/* 根据状态显示/隐藏文字 */
.mirror-toggle-switch:not(.active) .mirror-toggle-text.right {
    opacity: 0.6;
}

.mirror-toggle-switch.active .mirror-toggle-text.left {
    opacity: 0.6;
}

.mirror-toggle-switch:not(.active) .mirror-toggle-text.left {
    opacity: 1;
}

.mirror-toggle-switch.active .mirror-toggle-text.right {
    opacity: 1;
}

/* 移除状态指示器样式，因为不再显示状态文字 */

/* 加载状态 */
.mirror-switch-container.loading {
    pointer-events: none;
    opacity: 0.6;
}

.mirror-switch-container.loading .mirror-toggle-switch {
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mirror-switch-container {
        padding: 3px 6px; /* 进一步减少移动端内边距 */
    }
    
    .mirror-toggle-switch {
        width: 90px; /* 移动端更小的开关 */
        height: 26px;
    }
    
    .mirror-toggle-slider {
        width: 42px;
        height: 18px;
    }
    
    .mirror-toggle-switch.active .mirror-toggle-slider {
        transform: translateX(42px); /* 调整移动端滑动距离 */
    }
    
    .mirror-toggle-text {
        font-size: 9px; /* 移动端更小的文字 */
    }
}

/* 禁用状态（在非镜像页面） */
.mirror-switch-container.disabled {
    display: none;
}

