/* Custom styles for better mobile experience */
body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Camera preview styling */
#cameraPreview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
}

#cameraContainer {
    position: relative;
    width: 100%;
    height: 80%;
    margin-top: 10%;
}

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

.camera-controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

/* QR scan target */
.scan-target {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 4px solid rgba(74, 222, 128, 0.7);
    border-radius: 8px;
    pointer-events: none;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* Input focus styling */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
}

/* File input styling */
.file-input-label {
    transition: all 0.2s ease;
}

.file-input-label:hover {
    background-color: #f0fdf4;
}

/* Button active state */
button:active {
    transform: scale(0.98);
}
