.fw-main-search-camera {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.fw-main-search .fw-search-camera {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(29, 78, 216, .18);
    box-shadow: 0 7px 18px rgba(29, 78, 216, .1);
    color: #1d4ed8;
    display: inline-flex;
    justify-content: center;
    min-width: 62px;
    padding: 0;
    width: 62px;
}

.fw-main-search .fw-search-camera:hover,
.fw-main-search .fw-search-camera:focus-visible {
    background: #eaf2ff;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
    color: #123e9c;
    outline: none;
}

.fw-barcode-overlay {
    align-items: center;
    background: rgba(6, 16, 25, .88);
    backdrop-filter: blur(10px);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 10020;
}

.fw-barcode-overlay[hidden] {
    display: none;
}

.fw-barcode-dialog {
    background: #0d1724;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
    color: #fff;
    max-width: 680px;
    overflow: hidden;
    width: 100%;
}

.fw-barcode-dialog header,
.fw-barcode-controls {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 15px 18px;
}

.fw-barcode-dialog header div {
    display: grid;
    gap: 2px;
}

.fw-barcode-dialog header small {
    color: #5ee0ab;
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.fw-barcode-dialog header strong {
    font-size: 1.18rem;
}

.fw-barcode-dialog header button {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.7rem;
    height: 42px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 3px;
    width: 42px;
}

.fw-barcode-video-wrap {
    background: #02070d;
    min-height: 310px;
    overflow: hidden;
    position: relative;
}

.fw-barcode-video-wrap video {
    display: block;
    height: min(62vh, 520px);
    min-height: 310px;
    object-fit: cover;
    width: 100%;
}

.fw-barcode-guide {
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .22);
    height: 150px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(82%, 520px);
}

.fw-barcode-guide::before,
.fw-barcode-guide::after {
    background: #5ee0ab;
    border-radius: 99px;
    content: '';
    height: 5px;
    position: absolute;
    top: -3px;
    width: 52px;
}

.fw-barcode-guide::before { left: 18px; }
.fw-barcode-guide::after { right: 18px; }

.fw-barcode-guide span {
    animation: fw-barcode-scan 1.5s ease-in-out infinite alternate;
    background: #ff4d55;
    box-shadow: 0 0 10px rgba(255, 77, 85, .8);
    height: 2px;
    left: 7%;
    position: absolute;
    right: 7%;
    top: 50%;
}

.fw-barcode-controls p {
    font-size: .9rem;
    font-weight: 750;
    margin: 0;
}

.fw-barcode-controls button {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    padding: 8px 12px;
}

.fw-barcode-controls button.is-active {
    background: #f6c453;
    border-color: #f6c453;
    color: #142033;
}

.fw-barcode-privacy {
    color: #adbacb;
    font-size: .76rem;
    margin: 0;
    padding: 0 18px 16px;
}

@keyframes fw-barcode-scan {
    from { transform: translateY(-45px); }
    to { transform: translateY(45px); }
}

@media (max-width: 760px) {
    .fw-main-search-camera {
        grid-template-areas: "camera input" "submit submit";
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .fw-main-search-camera .fw-search-camera {
        grid-area: camera;
        min-width: 56px;
        width: 56px;
    }

    .fw-main-search-camera input {
        grid-area: input;
        min-width: 0;
    }

    .fw-main-search-camera > button[type="submit"] {
        grid-area: submit;
    }

    .fw-barcode-overlay {
        padding: 0;
    }

    .fw-barcode-dialog {
        border: 0;
        border-radius: 0;
        height: 100%;
        max-width: none;
    }

    .fw-barcode-video-wrap video {
        height: calc(100vh - 184px);
    }
}
