/* Tablet-Kasse Einfach-Modus
   Vollmodus-Markup wird in Einfach-Modus gar nicht erst gerendert
   (Razor-conditional), daher KEINE Hide-Regeln noetig. */

body.kasse-einfach {
    margin: 0;
    padding: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
    max-height: 100vh !important;
}

/* Tablet+Einfach: Layout-Navbar verstecken (Einfach hat eigene Topbar),
   Main-Container flush, kein Scroll */
body.kasse-einfach > nav.navbar,
body.kasse-einfach .navbar {
    display: none !important;
}
body.kasse-einfach main,
body.kasse-einfach main.container-fluid {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}
body.kasse-einfach .bottom-nav {
    display: none !important;
}

/* Status-Overlay (statt Bootstrap-Modal fuer Zahlung/Park-Status) */
.einfach-status-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}
.einfach-status-box {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    text-align: center;
    min-width: 280px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.einfach-status-icon i { font-size: 3rem; }
.einfach-status-text {
    font-size: 1.25rem;
    margin: 1rem 0;
    color: #212529;
}
.einfach-status-close {
    background: #0d6efd;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
}
.einfach-status-close.d-none { display: none; }

/* OnlineBeleg QR-Vollbild-Overlay */
.einfach-qr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10080;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}
.einfach-qr-inner {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem 3rem;
    text-align: center;
    max-width: 90vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.einfach-qr-title {
    font-size: 2rem;
    font-weight: 800;
    color: #212529;
}
.einfach-qr-img {
    width: min(60vh, 500px);
    height: min(60vh, 500px);
    object-fit: contain;
    image-rendering: pixelated;
}
.einfach-qr-link {
    font-size: 0.95rem;
    color: #6c757d;
    font-family: monospace;
    word-break: break-all;
    max-width: 500px;
}
.einfach-qr-countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: #198754;
}
.einfach-qr-countdown span {
    font-size: 2.2rem;
    color: #198754;
}
.einfach-qr-close {
    margin-top: 0.5rem;
    background: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 0.6rem;
    padding: 0.7rem 2rem;
    font-size: 1.15rem;
    cursor: pointer;
}

/* Retourgeld-Modal Querformat */
.rg-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5rem;
    align-items: stretch;
}
.rg-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
}
.rg-info .rg-label {
    font-size: 0.95rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rg-info .rg-value {
    font-size: 2rem;
    font-weight: 800;
    color: #212529;
    margin-top: 0.2rem;
}
.rg-info .rg-value.rg-retour {
    font-size: 2.4rem;
    color: #198754;
}
.rg-pad {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.rg-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    flex: 1;
}
.rg-numpad button {
    background: #ffffff;
    border: 1.5px solid #ced4da;
    border-radius: 0.6rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #212529;
    padding: 0.9rem 0;
    cursor: pointer;
    user-select: none;
}
.rg-numpad button:active {
    background: #e9ecef;
}
.rg-numpad button.rg-back {
    background: #fff3cd;
    color: #664d03;
    font-size: 1.4rem;
}
.rg-scheine {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}
.rg-scheine button {
    background: #cfe2ff;
    border: 1.5px solid #9ec5fe;
    border-radius: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #084298;
    padding: 0.85rem 0;
    cursor: pointer;
    user-select: none;
}
.rg-scheine button:active {
    background: #9ec5fe;
}

/* Einfach-Modus Container */
.einfach-wrap {
    display: grid;
    grid-template-rows: 50px 1fr;
    height: 100vh;
    width: 100vw;
}

/* Einfach-Topbar */
.einfach-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.einfach-topbar .einfach-modus-toggle {
    background: none;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.einfach-topbar .einfach-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
}

/* Hauptbereich: Grid + Bon */
.einfach-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: 100%;
    overflow: hidden;
}

.einfach-favoriten-area {
    display: grid;
    grid-template-rows: 1fr 80px;
    overflow: hidden;
    border-right: 1px solid #dee2e6;
}

.einfach-favoriten-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    grid-auto-rows: minmax(110px, max-content);
    gap: 0.5rem;
    padding: 0.75rem;
    overflow-y: auto;
    align-content: start;
}

.einfach-favoriten-grid .einfach-tile {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1.1 / 1;
    font-weight: 500;
    overflow: hidden;
    container-type: inline-size;
    position: relative;
}

.einfach-favoriten-grid .einfach-tile:active {
    filter: brightness(0.92);
}

.einfach-favoriten-grid .einfach-tile .einfach-tile-name {
    font-size: clamp(0.85rem, 13cqi, 1.6rem);
    line-height: 1.15;
    word-break: break-word;
}

.einfach-favoriten-grid .einfach-tile .einfach-tile-preis {
    font-size: clamp(0.75rem, 11cqi, 1.3rem);
    opacity: 0.85;
    margin-top: 0.3rem;
}

.einfach-favoriten-grid .einfach-tile-foto {
    justify-content: flex-start;
    padding-top: 0.4rem;
}

.einfach-favoriten-grid .einfach-tile-foto img {
    max-width: 100%;
    max-height: 55%;
    object-fit: contain;
    margin-bottom: 0.3rem;
}

.einfach-favoriten-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-size: 1.1rem;
}

/* Aktionsleiste unter Favoriten-Grid */
.einfach-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.einfach-actions button {
    font-size: 1.05rem;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    background: #ffffff;
    cursor: pointer;
}

.einfach-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bon-Bereich */
.einfach-bon {
    display: grid;
    grid-template-rows: 1fr auto auto;
    overflow: hidden;
    background: #ffffff;
}

.einfach-bon-list {
    overflow-y: auto;
    padding: 0.5rem;
    list-style: none;
    margin: 0;
}

.einfach-bon-list li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #f1f3f5;
    font-size: 1.05rem;
}

.einfach-bon-list .einfach-bon-menge {
    font-weight: 700;
    color: #495057;
    min-width: 2rem;
}

.einfach-bon-list .einfach-bon-name {
    font-weight: 500;
    word-break: break-word;
}

.einfach-bon-list .einfach-bon-preis {
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.einfach-bon-list .einfach-bon-remove,
.einfach-bon-list .einfach-bon-loeschen {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 2rem;
    line-height: 1;
    padding: 0 0.6rem;
    cursor: pointer;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.einfach-bon-list .einfach-bon-remove:active,
.einfach-bon-list .einfach-bon-loeschen:active {
    color: #a71d2a;
}

.einfach-bon-summe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 2px solid #dee2e6;
    font-size: 1.3rem;
    font-weight: 700;
    background: #f8f9fa;
}

.einfach-bon-pay {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
}

.einfach-bon-pay button {
    height: 80px;
    font-size: 1.4rem;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    color: #ffffff;
}

.einfach-bon-pay .einfach-pay-bar {
    background: #198754;
}

.einfach-bon-pay .einfach-pay-karte {
    background: #0d6efd;
}

/* Kachelgroesse aus CSS-Variablen (gesetzt via Razor --einfach-tile-min etc.) */
.einfach-favoriten-grid {
    grid-template-columns: repeat(auto-fit, minmax(var(--einfach-tile-min, 140px), 1fr));
}
.einfach-favoriten-grid .einfach-tile .einfach-tile-name {
    font-size: var(--einfach-font-name, clamp(0.85rem, 13cqi, 1.6rem));
}
.einfach-favoriten-grid .einfach-tile .einfach-tile-preis {
    font-size: var(--einfach-font-price, clamp(0.75rem, 11cqi, 1.3rem));
}

/* Topbar-Button (Nullbeleg) */
.einfach-topbar-btn {
    background: none; border: 1px solid #ced4da; border-radius: 0.5rem;
    padding: 0.4rem 0.7rem; font-size: 0.95rem; cursor: pointer; color: #495057;
}

/* Beleghistorie-Sheet */
.einfach-belege-overlay {
    display: none; position: fixed; inset: 0; z-index: 10065;
    background: rgba(0,0,0,0.5); align-items: flex-start; justify-content: center; padding: 12px;
}
.einfach-belege-overlay.show { display: flex; }
.einfach-belege-sheet {
    background: #fff; border-radius: 14px; max-width: 700px; width: 100%;
    max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.einfach-belege-head {
    padding: 14px 18px; border-bottom: 1px solid #e5e5ea;
    display: flex; align-items: center; justify-content: space-between;
}
.einfach-belege-head h4 { margin: 0; font-size: 18px; font-weight: 800; }
.einfach-belege-close {
    width: 44px; height: 44px; background: #f0f2f6; border: none;
    border-radius: 8px; font-size: 22px; cursor: pointer;
}
.einfach-belege-body { overflow-y: auto; padding: 8px; flex: 1; }
.einfach-beleg-row {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    background: #fff; border: 1px solid #e5e5ea; border-radius: 10px;
    margin-bottom: 6px; min-height: 72px; flex-wrap: wrap;
}
.einfach-beleg-row .einfach-beleg-detail { flex-basis: 100%; }
.einfach-beleg-row.storno { opacity: 0.5; }
.einfach-beleg-row.storniert { background: #fff5f5; border-color: #fecaca; }
.einfach-beleg-info { flex: 1; min-width: 0; }
.einfach-beleg-info .renr { font-weight: 700; font-size: 15px; }
.einfach-beleg-info .datum { font-size: 12px; color: #718096; }
.einfach-beleg-betrag { font-weight: 800; font-size: 16px; min-width: 80px; text-align: right; }
.einfach-beleg-zahlart { font-size: 11px; color: #718096; text-align: right; min-width: 50px; }
/* Beleg-Detail (Expand/Collapse Positionen) */
.einfach-beleg-detail {
    display: none; padding: 10px 12px 14px; border-top: 1px dashed #e5e5ea;
    margin-top: 8px;
}
.einfach-beleg-detail.show { display: block; }
.einfach-beleg-detail table { width: 100%; border-collapse: collapse; font-size: 13px; }
.einfach-beleg-detail th {
    font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase;
    letter-spacing: 0.04em; padding: 4px 6px; border-bottom: 1px solid #e5e5ea;
}
.einfach-beleg-detail td { padding: 6px; border-bottom: 1px solid #f0f0f0; }
.einfach-beleg-detail .text-end { text-align: right; }
.einfach-beleg-detail .text-muted { color: #888; }
.einfach-beleg-row .einfach-beleg-info { cursor: pointer; }
.einfach-beleg-row .einfach-beleg-info .renr .expand-icon {
    display: inline-block; transition: transform 0.2s; font-size: 12px; margin-right: 4px; color: #888;
}
.einfach-beleg-row .einfach-beleg-info .renr .expand-icon.open { transform: rotate(90deg); }

.einfach-beleg-actions { display: flex; gap: 12px; }
.einfach-beleg-actions button {
    min-height: 56px; min-width: 56px; border: none; border-radius: 10px;
    font-size: 18px; font-weight: 700; cursor: pointer; padding: 10px 18px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.einfach-beleg-actions .kopie { background: #eef2f7; color: #333; }
.einfach-beleg-actions .storno-btn { background: #fff5f5; color: #dc3545; border: 2px solid #fecaca; }
.einfach-beleg-actions .storno-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Storno-Sheet (Touch-optimiert) */
.einfach-storno-overlay {
    display: none; position: fixed; inset: 0; z-index: 10065;
    background: rgba(0,0,0,0.5); align-items: center; justify-content: center; padding: 20px;
}
.einfach-storno-overlay.show { display: flex; }
.einfach-storno-sheet {
    background: #fff; border-radius: 14px; max-width: 520px; width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); display: flex; flex-direction: column;
    overflow: hidden;
}
.einfach-storno-head {
    padding: 18px 20px; border-bottom: 1px solid #e5e5ea;
    display: flex; align-items: center; justify-content: space-between;
}
.einfach-storno-head h4 {
    margin: 0; font-size: 20px; font-weight: 800;
    display: flex; align-items: center; gap: 10px;
}
.einfach-storno-close {
    width: 48px; height: 48px; background: #f0f2f6; border: none;
    border-radius: 10px; font-size: 24px; cursor: pointer;
}
.einfach-storno-body { padding: 20px; }
.einfach-storno-info {
    background: #fff5f5; border: 2px solid #fecaca; border-radius: 12px;
    padding: 18px 20px; margin-bottom: 16px;
}
.einfach-storno-info .label {
    font-size: 11px; text-transform: uppercase; font-weight: 700;
    color: #888; margin-bottom: 6px; letter-spacing: 0.06em;
}
.einfach-storno-info .val {
    font-size: 22px; font-weight: 800; color: #212529;
}
.einfach-storno-info .detail {
    font-size: 14px; color: #555; margin-top: 6px;
}
.einfach-storno-status {
    text-align: center; min-height: 32px; font-size: 15px;
    margin-bottom: 10px;
}
.einfach-storno-status.error { color: #dc3545; }
.einfach-storno-status.success { color: #198754; }
.einfach-storno-footer {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    padding: 16px 20px; border-top: 1px solid #e5e5ea;
}
.einfach-storno-cancel {
    min-height: 60px; background: #f0f2f6; color: #333; border: none;
    border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.einfach-storno-confirm {
    min-height: 60px; background: #dc3545; color: #fff; border: none;
    border-radius: 10px; font-size: 16px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.einfach-storno-confirm:disabled { opacity: 0.5; cursor: not-allowed; }

.einfach-bon-pay button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
