/* 付款码摄像头共享预览：按设备实际画面比例约束容器，避免竖屏视频塞进横屏框产生黑边。 */
.mn-camera-scanner {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #f7f3ee;
    border: 1px solid #e5d6c6;
    border-radius: 8px;
}

.mn-camera-scanner-title {
    color: #514337;
    font-size: 14px;
    font-weight: 700;
}

.mn-camera-scanner-preview {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 38vh;
    max-height: min(38dvh, 420px);
    margin-inline: auto;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #171614;
    border-radius: 8px;
}

.mn-camera-scanner-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mn-camera-scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--mn-camera-frame-size, 220px);
    height: var(--mn-camera-frame-size, 220px);
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.mn-camera-scanner-status,
.mn-camera-scanner-note {
    color: var(--mn-text-muted, #70685f);
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.mn-camera-scanner-error {
    color: #a52821;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.mn-camera-scanner-actions {
    display: flex;
    min-height: 44px;
    flex-wrap: wrap;
    gap: 8px;
}

.mn-camera-scanner-actions .el-button {
    min-height: 44px;
    margin: 0;
    touch-action: manipulation;
}

.mn-camera-scanner-launcher {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.mn-camera-scanner-launcher-note {
    color: var(--mn-text-muted, #70685f);
    font-size: 13px;
    line-height: 1.55;
}

.mn-payment-camera-dialog.is-align-center {
    margin: auto !important;
}

.mn-payment-camera-dialog .el-dialog__body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mn-payment-camera-dialog .mn-camera-scanner {
    margin: 0;
}

@media (max-height: 640px) {
    .mn-camera-scanner-preview {
        max-height: 34vh;
        max-height: 34dvh;
    }
}

@media (max-width: 640px) {
    .mn-camera-scanner-actions .el-button {
        width: 100%;
    }
}
