body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 15px;
    background-color: #f5f5f5;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-logo {
    display: block;
    max-width: none;
    width: 100%;
    height: auto;
    margin: 0 auto 16px;
}

.title-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    width: 100%;
}

.help-button {
    position: absolute;
    right: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #007bff;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.help-overlay[hidden] {
    display: none !important;
}

.help-bubble {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 40px 16px 16px;
    background: #eef5ff;
    border: 1px solid #bcd4ff;
    border-radius: 8px;
    color: #333;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    text-align: left;
}

.help-bubble[hidden] {
    display: none !important;
}

.help-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

h1, h2 {
    text-align: center;
    color: #333;
}

#reader {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

#reader video,
#reader canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-name {
    flex-grow: 1;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-qty {
    width: 30px;
    height: 30px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.btn-qty:disabled,
.btn-qty[disabled] {
    background-color: #b8b8b8 !important;
    background-image: none !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    border: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.btn-qty[disabled] {
    pointer-events: none !important;
}

.total-price {
    font-size: 1.2em;
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px solid #333;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: block;
}

.btn-checkout.btn-return-cart {
    background: #007bff;
    margin-top: 12px;
}

button.btn-checkout.btn-return-cart {
    background: #007bff !important;
    background-color: #007bff !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    margin-top: 12px;
}
.btn-checkout.btn-new-cart {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    margin-top: 12px;
    min-height: 54px;
    display: block;
    width: 100%;
}

.btn-checkout.btn-new-cart:hover,
.btn-checkout.btn-new-cart:active,
.btn-checkout.btn-new-cart:focus,
.btn-checkout.btn-new-cart:disabled {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

#scan-feedback {
    text-align: center;
    color: #28a745;
    font-weight: bold;
    min-height: 24px;
    margin-bottom: 10px;
}

.checkout-qr-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    text-align: center;
}

.checkout-qr-section[hidden] {
    display: none !important;
}

#checkout-qr-code {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

#checkout-qr-code img,
#checkout-qr-code canvas {
    max-width: 100%;
    height: auto;
}

.checkout-qr-label {
    color: #555;
    word-break: break-word;
}
