/* B8 — Mobile camera scanner overlay & floating trigger */

.mobile-scan-fab {
    position: fixed;
    right: 18px;
    /* Stack NAD zunifikowanym pływającym ołówkiem (.pz-floating-actions: bottom=80px, height≈48px →
       zajmuje 80–128px). Kamera startuje od 144px, by się nie nakładać. Na stronach bez ołówka
       kamera jest po prostu nieco wyżej — wciąż w prawym dolnym rogu, wizualnie poprawnie. */
    bottom: 144px;
    z-index: 1041;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-scan-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mobile-scan-fab:active {
    transform: scale(0.95);
}

#mobile-scanner-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}

#mobile-scanner-modal .ms-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

#mobile-scanner-modal .ms-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(96vw, 480px);
    max-height: 92vh;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

#mobile-scanner-modal .ms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #0d6efd;
    color: #fff;
}

#mobile-scanner-modal .ms-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.5rem;
}

#mobile-scanner-modal .ms-reader {
    background: #000;
    min-height: 320px;
}

#mobile-scanner-modal .ms-reader video {
    width: 100% !important;
    height: auto !important;
}

#mobile-scanner-modal .ms-status {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #333;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

#mobile-scanner-modal .ms-footer {
    padding: 0.5rem 1rem;
    text-align: right;
    background: #f8f9fa;
}

#mobile-scanner-modal .ms-btn {
    padding: 0.4rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

#mobile-scanner-modal .ms-btn-cancel {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
