/* Tool Box Container */
.tool-box {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    background: #fff;
}

/* File Input Styles */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 10px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.file-label {
    display: block;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f8f8f8;
    text-align: center;
    color: #555;
    cursor: pointer;
}

/* Buttons (uncomment if needed) */
/*
.btn-submit, .btn-copy {
    background-color: #007bff;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-submit:hover, .btn-copy:hover {
    background-color: #0056b3;
}
*/

/* Output Card */
.output-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
    background-color: #f9f9f9;
    max-width: 100%;
    box-sizing: border-box;
}

.output-card img.qr-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.small-text {
    font-size: 12px;
    color: #555;
}

/* Margin Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }

/* Mobile Scan Section - hidden by default */
.mobile-scan-section {
    text-align: center;
    padding: 15px;
    display: none; /* hidden on desktop */
}

/* QR Reader Box */
#reader {
    width: 100%;
    max-width: 400px;
    margin: 15px auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: none; /* hidden on desktop */
}

/* Camera Result Textarea */
#cameraResult {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: monospace;
}

/* Responsive Adjustments for Mobile */
@media (max-width: 768px) {
    .tool-box {
        padding: 15px;
    }

    .mobile-scan-section {
        display: block; /* visible only on mobile */
    }

    #reader {
        display: block; /* visible only on mobile */
        max-width: 100%;
    }

    .output-card img.qr-image {
        max-width: 100%;
    }
}

/* Professional Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 10000;
    transition: opacity 0.3s ease;
}
.toast-error { background: #dc3545 !important; }
.toast-success { background: #28a745 !important; }

/* Utility to hide elements professionally */
.hidden {
    display: none !important;
}

/* Centering for QR output */
.text-center {
    text-align: center;
}

.qr-canvas-wrapper {
    display: inline-block;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-top: 10px;
}

.scanner-container {
    width: 100%;
    max-width: 400px;
    margin: auto;
    border-radius: 8px;
    overflow: hidden;
}

/* Toast Notification Styles */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.toast-error { background: #dc3545 !important; }
.toast-success { background: #28a745 !important; }