/* ========================================
   地图选择弹窗样式 (v4)
   - 使用真实品牌图标
   - 显示起点（from）→ 终点（to）信息
   - 在手机容器 (#app, 375x812) 内显示，不超出手机壳
   - 使用 position:absolute 严格限制在 .app-container 内部
   ======================================== */
.map-selector-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    box-sizing: border-box;
}
.map-selector-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.map-selector-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.map-selector-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 8px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 60vh;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.map-selector-modal.show .map-selector-panel {
    transform: translateY(0);
}
.map-selector-handle {
    width: 36px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 0 auto 8px;
}
.map-selector-header {
    padding: 0 20px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.map-selector-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.map-selector-subtitle {
    font-size: 12px;
    color: #999;
    word-break: break-all;
}
.map-selector-list {
    padding: 8px 0;
    max-height: 50vh;
    overflow-y: auto;
}
.map-selector-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.map-selector-item:active {
    background: #f5f5f5;
}
.map-selector-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.map-selector-icon-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}
.map-selector-info {
    flex: 1;
    min-width: 0;
}
.map-selector-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}
.map-selector-desc {
    font-size: 12px;
    color: #999;
}
.map-selector-arrow {
    font-size: 20px;
    color: #ccc;
    margin-left: 8px;
}
.map-selector-cancel {
    text-align: center;
    padding: 14px;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 15px;
    cursor: pointer;
}
.map-selector-cancel:active {
    background: #f5f5f5;
}

/* ========================================
   打卡拍照相机界面
   - 相机界面显示在手机容器 (#app, 375x812) 内
   - 闪光灯/翻转镜头按钮在底部快门左右两侧
   - 使用 position:absolute 而非 fixed，
     这样 modal 会严格限制在 .app-container (手机壳) 内部
   ======================================== */
.checkin-camera-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    /* 严格限制在 .app-container (375x812) 内部，不会超出手机壳 */
    box-sizing: border-box;
}
.checkin-camera-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.checkin-camera-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}
.checkin-camera-header .nav-back {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
}
.checkin-camera-header .title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}
.checkin-camera-header .spacer {
    width: 34px;
}
.checkin-camera-preview {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #999;
    font-size: 14px;
    overflow: hidden;
}
.checkin-camera-preview video,
.checkin-camera-preview img,
.checkin-camera-preview canvas {
    max-width: 100%;
    max-height: 100%;
}

/* ========================================
   隐藏浏览器原生的视频控制层
   - 防止触摸 video 时显示：全屏/画中画/下载/播放速率 等按钮
   - iOS Safari / Android Chrome 均生效
   ======================================== */
.checkin-camera-preview video::-webkit-media-controls {
    display: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.checkin-camera-preview video::-webkit-media-controls-enclosure {
    display: none !important;
}
.checkin-camera-preview video::-webkit-media-controls-playback-rate-button,
.checkin-camera-preview video::-webkit-media-controls-fullscreen-button,
.checkin-camera-preview video::-webkit-media-controls-toggle-closed-captions-button,
.checkin-camera-preview video::-webkit-media-controls-pip-button,
.checkin-camera-preview video::-webkit-media-controls-picture-in-picture-button,
.checkin-camera-preview video::-webkit-media-controls-download-button,
.checkin-camera-preview video::-webkit-media-controls-mute-button,
.checkin-camera-preview video::-webkit-media-controls-volume-slider,
.checkin-camera-preview video::-webkit-media-controls-timeline,
.checkin-camera-preview video::-webkit-media-controls-current-time-display,
.checkin-camera-preview video::-webkit-media-controls-time-remaining-display {
    display: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
/* 阻止视频元素自身的点击/触摸默认行为 */
.checkin-camera-preview video {
    pointer-events: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}
.checkin-camera-placeholder {
    text-align: center;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
}
.cam-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cam-spin 0.9s linear infinite;
}
@keyframes cam-spin {
    to { transform: rotate(360deg); }
}
.cam-placeholder-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}
.checkin-camera-error {
    text-align: center;
    color: #ff8888;
    padding: 20px;
}
.checkin-camera-error i {
    font-size: 48px;
    margin-bottom: 12px;
}
.checkin-camera-error-tip {
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
}
.checkin-camera-tip {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    text-align: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
}
/* 底部控件：闪光灯(左) + 快门(中) + 翻转(右) */
.checkin-camera-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 32px;
    background: rgba(0, 0, 0, 0.85);
    position: relative;
    z-index: 2;
    gap: 12px;
}
.cam-side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 64px;
    padding: 8px 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.cam-side-btn i {
    font-size: 20px;
    color: #fff;
}
.cam-side-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}
.cam-side-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}
.cam-side-btn.active {
    background: rgba(255, 193, 7, 0.25);
    border-color: #FFC107;
}
.cam-side-btn.active i {
    color: #FFC107;
}
.cam-side-btn.active .cam-side-label {
    color: #FFC107;
}
.cam-shutter-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 120px;
}
.checkin-camera-shutter {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.checkin-camera-shutter .shutter-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid #fff;
    background: transparent;
    transition: transform 0.1s;
}
.checkin-camera-shutter .shutter-dot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.1s;
}
.checkin-camera-shutter:active .shutter-ring {
    transform: scale(0.92);
}
.checkin-camera-shutter:active .shutter-dot {
    transform: scale(0.9);
    background: #f0f0f0;
}
.checkin-camera-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 5;
    animation: cam-flash 0.2s ease-out;
    pointer-events: none;
}
@keyframes cam-flash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* ========================================
   语音播放弹窗
   - 严格限制在 .app-container (手机壳) 内部
   ======================================== */
.voice-play-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    box-sizing: border-box;
}
.voice-play-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.voice-play-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.voice-play-panel {
    position: relative;
    width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s;
}
.voice-play-modal.show .voice-play-panel {
    transform: scale(1);
}
