.ajout-scan-cart .input-scan {
    height: 50px !important;
}

.ajout-scan-cart .form-scan {
    font-size: 1.34em !important;
    display: block;
    width: 400px !important;
    margin: 50px auto;
    padding: 13px;
    border-radius: 6px;
    -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    position: relative;
    background: white;
}

.ajout-scan-cart .form-scan input,
.ajout-scan-cart .form-scan select,
.ajout-scan-cart .form-scan button.input-scan {
    width: 100%;
    display: block;
    padding: 6px 12px;
    font-size: 18px;
    text-transform: uppercase;
    line-height: 1.42857143;
    color: #fff;
    background-color: #00a38c;
    background-image: none;
    border: 1px solid #E7E7E7;
    border-radius: 6px;
}

.ajout-scan-cart .form-scan input:hover,
.ajout-scan-cart .form-scan button.input-scan:hover {
    background-color: #00a38c;
    cursor: pointer;
}

.ajout-scan-cart .input-scan.annuler {
    background-color: #5f5656;
}

.ajout-scan-cart .scanner-open-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ajout-scan-cart .scanner-open-button-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
}

.ajout-scan-cart .scanner-product-name {
    margin-top: -2px;
    margin-bottom: 10px;
    padding: 9px 12px;
    border-left: 4px solid #00a38c;
    border-radius: 4px;
    color: #166534;
    background: #ecfdf5;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
}

.ajout-scan-cart .scanner-product-name[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .ajout-scan-cart .input-scan {
        display: inline-block !important;
    }
}

.ajout-scan-cart .input-scan {
    width: 100%;
    margin-bottom: 10px;
    margin-top: 15px;
}

.ajout-scan-cart #reference,
.ajout-scan-cart #quantite {
    background-color: #fff;
    color: black;
}

.ajout-scan-cart .text-label {
    font-weight: 600 !important;
    padding-top: 10px;
}

.ajout-scan-cart canvas.drawing,
.ajout-scan-cart canvas.drawingBuffer {
    position: absolute;
    left: 0;
    top: 0;
}

@media (max-width: 576px) {
    .ajout-scan-cart .form-scan {
        width: 100% !important;
        margin: 20px auto;
        -webkit-box-shadow: unset !important;
        box-shadow: unset !important;
    }
}

.ajout-scan-cart video {
    width: 100% !important;
    margin: auto;
}

.ajout-scan-cart #colisage_wording {
    display: block;
    color: green;
    font-weight: bold;
}

.ajout-scan-cart .scanner-message {
    margin: 12px 0 4px;
    padding: 10px;
    border-radius: 6px;
    font-size: 15px;
    color: #166534;
    background: #dcfce7;
}

.ajout-scan-cart .scanner-message--error {
    color: #991b1b;
    background: #fee2e2;
}

.scanner-modal[hidden] {
    display: none !important;
}

.scanner-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 12px;
    overflow-y: auto;
}

.scanner-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.scanner-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    margin: 0 auto;
}

.scanner-modal-content {
    width: 100%;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.scanner-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e7e7e7;
}

.scanner-modal-close {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 0 !important;
    color: #333 !important;
    background: transparent !important;
    font-size: 30px !important;
    line-height: 1 !important;
    cursor: pointer;
}

.scanner-modal-body {
    padding: 18px;
}

.scandiv {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    background: #111;
}

.camera-status {
    margin-top: 12px;
    font-size: 15px;
    text-align: center;
}

.camera-status--error {
    color: #b91c1c;
}

.image-scan-label {
    display: block;
    width: 100%;
    min-height: 50px;
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    color: #fff;
    background: #5f5656;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
}

.image-scan-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important;
}

.scanner-modal-open {
    overflow: hidden;
}

.product-scanner-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.product-scanner-header-icon {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .scanner-modal {
        padding-top: 100px;
    }
}

.ajout-scan-cart .scanner-product-name {
    display: flex;
    align-items: center;
    gap: 9px;
}

.ajout-scan-cart .scanner-product-name--loading {
    border-left-color: #64748b;
    color: #475569;
    background: #f1f5f9;
}

.ajout-scan-cart .scanner-product-name--success {
    border-left-color: #00a38c;
    color: #166534;
    background: #ecfdf5;
}

.ajout-scan-cart .scanner-product-name--error {
    border-left-color: #dc2626;
    color: #991b1b;
    background: #fee2e2;
}

.ajout-scan-cart .scanner-interaction-blocker {
    position: absolute;
    z-index: 1100;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.82);
    cursor: wait;
    outline: none;
}

.ajout-scan-cart .scanner-interaction-blocker[hidden] {
    display: none !important;
}

.ajout-scan-cart .scanner-blocking-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: min(300px, 100%);
    min-height: 145px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-transform: none;
}

.ajout-scan-cart .scanner-blocking-popup .scanner-inline-spinner {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-width: 4px;
}

.ajout-scan-cart .scanner-inline-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid rgba(0, 163, 140, 0.25);
    border-top-color: #00a38c;
    border-radius: 50%;
    animation: product-scanner-spin 0.75s linear infinite;
}

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

.ajout-scan-cart .scanner-queue-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #374151 !important;
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    text-transform: none !important;
}

.ajout-scan-cart .scanner-queue-button:hover {
    background: #f1f5f9 !important;
}

.ajout-scan-cart .scanner-queue-button[hidden] {
    display: none !important;
}

.ajout-scan-cart .scanner-queue-button-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.scanner-queue-modal-dialog {
    width: min(760px, 100%);
}

.scanner-queue-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.scanner-queue-section[hidden] {
    display: none !important;
}

.scanner-queue-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
}

.scanner-queue-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-size: 14px;
}

.scanner-queue-count--error {
    color: #991b1b;
    background: #fee2e2;
}

.scanner-queue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scanner-queue-item {
    padding: 12px;
    border: 1px solid #dbe4e8;
    border-left: 4px solid #00a38c;
    border-radius: 6px;
    background: #f8fafc;
}

.scanner-queue-item--error {
    border-left-color: #dc2626;
    background: #fff7f7;
}

.scanner-queue-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.scanner-queue-item-reference {
    color: #111827;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.scanner-queue-item-status {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-size: 12px;
    font-weight: 700;
}

.scanner-queue-item-status--error {
    color: #991b1b;
    background: #fee2e2;
}

.scanner-queue-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 7px;
    color: #475569;
    font-size: 14px;
}

.scanner-queue-item-name {
    color: #166534;
    font-weight: 600;
}

.scanner-queue-item-error,
.scanner-queue-item-warning {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
}

.scanner-queue-item-error {
    color: #991b1b;
}

.scanner-queue-item-warning {
    color: #92400e;
}

.scanner-queue-clear-button,
.scanner-queue-close-button {
    min-height: 44px;
    padding: 9px 14px;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.scanner-queue-clear-button {
    width: 100%;
    margin-top: 12px;
    color: #991b1b;
    background: #fee2e2;
}

.scanner-queue-clear-button[hidden] {
    display: none !important;
}

.scanner-queue-close-button {
    width: 100%;
    color: #fff;
    background: #5f5656;
}

.ajout-scan-cart.scanner-add-locked .form-scan {
    cursor: wait;
}

@media (max-width: 576px) {
    .scanner-queue-item-header {
        flex-direction: column;
        gap: 7px;
    }
}
