:root {
    --color-primary: #1F4E78;
    --color-primary-light: #2E6DA4;
    --color-success: #2E7D32;
    --color-danger: #C62828;
    --color-bg: #F5F7FA;
    --color-text: #1A1A1A;
    font-size: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 1.25rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
}

.app-content {
    flex: 1;
    padding: 1rem;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

.app-loading {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Grosse, gut treffbare Buttons fuer Einhandbedienung im Laden */
button {
    font-size: 1.1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    width: 100%;
}

    .btn-primary:active {
        background: var(--color-primary-light);
    }

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

#blazor-error-ui {
    display: none;
    background: #C62828;
    color: #fff;
    padding: 0.9rem 1.2rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

    #blazor-error-ui .reload {
        color: #fff;
        text-decoration: underline;
    }

/* Scanner-Komponente */
/* Scanner-Komponente: kompakter Streifen statt Vollbild, wie bei uebliche Scan-Apps */
.scanner {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #000;
    margin-bottom: 1rem;
}

.scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Rahmen, der anzeigt, wo der Barcode hingehalten werden soll */
.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 78%;
    height: 55%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.scanner-error {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(198, 40, 40, 0.92);
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    text-align: center;
}

.scanner-feedback {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 125, 50, 0.92);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
}

/* Warenkorb */
.cart {
    background: #fff;
    border-radius: 0.8rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cart-heading {
    margin: 0 0 0.75rem 0;
    font-size: 1.15rem;
}

.cart-empty {
    color: #777;
    margin: 0;
}

.cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

.cart-row-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cart-row-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-row-price {
    font-size: 0.85rem;
    color: #777;
}

.cart-row-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    padding: 0.3rem 0.7rem;
    font-size: 1.1rem;
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid #ddd;
}

.qty-value {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.cart-row-total {
    min-width: 4.5rem;
    text-align: right;
    font-weight: 600;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.9rem;
    margin-top: 0.4rem;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Hinweis-Boxen */
.notice {
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.notice-warning {
    background: #FFF3CD;
    color: #7A5B00;
    border: 1px solid #FFE69C;
}

.btn-checkout {
    margin-top: 1rem;
}

.checkout-heading {
    margin-top: 0;
}

.qr-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 0.8rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qr-hint {
    margin: 0 0 1rem 0;
    color: #555;
}

.qr-container {
    display: flex;
    justify-content: center;
}

.qr-session-id {
    margin-top: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
}
