/**
 * QR Scanner Premium Styles
 */

.qr-scanner-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 78, 59, 0.4);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: scannerFadeIn 0.3s ease;
}

@keyframes scannerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scanner-container {
    width: 100%;
    max-width: 400px;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scanner-header {
    padding: 20px;
    background: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.scanner-header h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.scanner-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.scanner-view-shell {
    position: relative;
    aspect-ratio: 1;
    background: #111;
    overflow: hidden;
}

#scanner-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    width: 70%;
    height: 70%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    position: relative;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
}

.scanner-frame::before, .scanner-frame::after,
.scanner-frame > span::before, .scanner-frame > span::after {
    /* Corner indicators */
}

.scanner-line {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    animation: scannerScan 2s infinite ease-in-out;
}

@keyframes scannerScan {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(350%); opacity: 1; } /* Adjusted based on 70% frame */
}

.scanner-status {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.scanner-footer {
    padding: 24px;
    background: #111;
    text-align: center;
    color: #9ca3af;
}

.scanner-footer p {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

/* FAB for scanner */
.scan-fab {
    position: fixed;
    bottom: calc(100px + env(safe-area-inset-bottom));
    right: 20px;
    width: 56px;
    height: 56px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    z-index: 100;
    border: none;
    transition: transform 0.2s;
}

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