/*
 * Basic styling for the Quagga2file interface.  Gemini created this inline
 * in the secondary (enqueued) scanner-page.php but I like this better.
*/

    .quagga-scanner-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background-color: #f0f0f0;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        font-family: 'Inter', sans-serif;
        max-width: 600px;
        margin: 20px auto;
        gap: 15px;
    }

    #interactive.viewport {
        width: 100%;
        max-width: 100%;
        min-height: 250px; /* Minimum height for visibility */
        height: auto; /* Maintain aspect ratio */
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        background-color: #333;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #interactive.viewport canvas,
    #interactive.viewport video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain; /* Ensure video fits within the container */
        border-radius: 8px;
    }

    .drawingBuffer {
        position: absolute;
        top: 0;
        left: 0;
    }

    #result-message {
        margin-top: 10px;
        padding: 5px;
        background-color: #e9e9e9;
        border-radius: 8px;
        width: 100%;
        text-align: center;
        font-size: 1.2em;
        font-weight: bold;
        color: #333;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        word-break: break-all;
    }

    .scanner-buttons {
        display: flex;
        gap: 10px;
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }

    .scanner-buttons button {
        padding: 12px 25px;
        font-size: 1em;
        font-weight: bold;
        border: none;
        border-radius: 25px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
        color: white;
        // text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .scanner-buttons button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
        background-image: linear-gradient(to right, #2575fc 0%, #6a11cb 100%);
    }

    .scanner-buttons button:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .scanner-buttons button:disabled {
        background-image: none;
        background-color: #cccccc;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .quagga-scanner-container {
            padding: 15px;
            margin: 15px;
        }

        .scanner-buttons {
            flex-direction: column;
            align-items: center;
        }

        .scanner-buttons button {
            width: 80%;
            max-width: 250px;
        }
    }
</style>

