/* Live-Demo für Kasse und PDA (/pos-pda/ und /ar/pos-pda/).
   Verwendet die Theme-Variablen der Seite (--s-*) und logische Eigenschaften, damit die
   arabische Seite (dir="rtl") ohne eigene Regeln gespiegelt wird. */

.dm-num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.dm-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dm-note { margin: 24px 0 0; text-align: center; color: var(--s-ink-muted); font-size: 13px; }
.dm-section.s-wrap { padding-top: 0; }
.dm-section .section-heading { margin-bottom: 36px; }

/* ---------- Kasse ---------- */
.dm-pos { background: #0c0d0f; border: 1px solid var(--s-line); border-radius: var(--s-radius); padding: 14px; box-shadow: 0 25px 60px #0006; }
.dm-top { display: flex; align-items: center; gap: 16px; padding: 6px 8px 14px; }
.dm-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dm-title strong { font-size: 19px; font-weight: 600; }
.dm-title span { font-size: 13px; color: var(--s-ink-soft); }
.dm-search { position: relative; display: block; flex: 1; max-width: 420px; margin-inline-start: auto; }
.dm-search .uicon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--s-ink-muted); pointer-events: none; }
.dm-search input { width: 100%; height: 46px; padding: 0 14px; padding-inline-start: 42px; background: var(--s-surface2); border: 1px solid var(--s-line); border-radius: 12px; color: var(--s-ink); font: inherit; font-size: 15px; }
.dm-search input::placeholder { color: var(--s-ink-muted); }
.dm-search input:focus { outline: none; border-color: var(--s-accent); box-shadow: 0 0 0 3px rgba(255, 74, 67, .22); }
.dm-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--s-surface2); border: 1px solid var(--s-line); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--s-ink-soft); }
.dm-badge .status-dot { background: #3ddc84; box-shadow: none; }

.dm-body { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 12px; min-height: 580px; }
.dm-cart { order: -1; display: flex; flex-direction: column; min-width: 0; max-height: 720px; padding: 18px; background: var(--s-surface); border-radius: 12px; }
.dm-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 16px; background: var(--s-surface); border-radius: 12px; }
.dm-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-cat { min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--s-surface2); border: 1px solid var(--s-line); color: var(--s-ink-soft); font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.dm-cat:hover { color: var(--s-ink); border-color: #4a4d52; }
.dm-cat[aria-pressed="true"] { background: #d81f2a; border-color: #d81f2a; color: #fff; }
.dm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; flex: 1; }
.dm-status { grid-column: 1 / -1; margin: 0; padding: 24px 4px; color: var(--s-ink-soft); font-size: 15px; }
.dm-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 112px; padding: 14px; text-align: start; background: var(--s-surface2); border: 1px solid var(--s-line); border-radius: 14px; color: var(--s-ink); font: inherit; cursor: pointer; transition: transform .12s, border-color .2s, background-color .2s; }
.dm-tile:hover { border-color: var(--s-accent); background: #26272a; }
.dm-tile:active { transform: scale(.97); }
.dm-tile-icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.dm-tile-name { font-size: 15px; font-weight: 500; line-height: 1.3; hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.dm-tile-price { margin-top: auto; font-size: 17px; font-weight: 600; color: var(--s-accent-dark); }
.dm-tile-qty { position: absolute; top: 10px; inset-inline-end: 10px; min-width: 26px; height: 26px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: #d81f2a; color: #fff; font-size: 13px; font-weight: 700; animation: dm-pop .25s ease-out; }

.dm-cart-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.dm-cart-head h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0; color: var(--s-ink); }
.dm-count { margin-inline-end: auto; font-size: 13px; color: var(--s-ink-soft); }
.dm-link { padding: 4px 0; background: none; border: 0; color: var(--s-accent); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dm-lines { flex: 1 1 auto; min-height: 120px; margin: 0; padding: 0; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.dm-lines:empty { display: none; }
.dm-empty { flex: 1 1 auto; min-height: 160px; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--s-ink-soft); border: 1px dashed var(--s-line); border-radius: 14px; }
.dm-empty .uicon { width: 34px; height: 34px; opacity: .6; }
.dm-empty p { margin: 0; }
.dm-empty small { font-size: 13px; opacity: .85; }
.dm-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px; background: var(--s-surface2); border: 1px solid var(--s-line); border-radius: 12px; animation: dm-pop .2s ease-out; }
.dm-line-name { font-size: 15px; font-weight: 500; line-height: 1.3; }
.dm-line-sum { justify-self: end; font-size: 16px; font-weight: 600; }
.dm-line-meta { grid-column: 1; align-self: center; font-size: 13px; color: var(--s-ink-soft); }
.dm-stepper { grid-column: 2; grid-row: 2; justify-self: end; display: inline-flex; align-items: center; gap: 2px; }
.dm-stepper button { width: 38px; height: 38px; display: grid; place-items: center; background: var(--s-surface); border: 1px solid var(--s-line); border-radius: 10px; color: var(--s-ink); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; transition: background-color .15s, border-color .15s; }
.dm-stepper button:hover { border-color: var(--s-accent); background: #26272a; }
.dm-stepper output { min-width: 30px; text-align: center; font-weight: 600; font-size: 15px; }
.dm-sums { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--s-line); display: grid; gap: 4px; font-size: 13px; color: var(--s-ink-soft); }
.dm-sums > div { display: flex; justify-content: space-between; gap: 12px; }
.dm-sums dd { margin: 0; }
.dm-total { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 14px; background: linear-gradient(135deg, #d81f2a, #b80f20); color: #fff; box-shadow: 0 14px 28px -14px rgba(255, 74, 67, .7); }
.dm-total > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.dm-total-value { font-size: 36px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.dm-payrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.dm-pay { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; background: var(--s-surface2); border: 1px solid var(--s-line); border-radius: 14px; color: var(--s-ink); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; transition: border-color .2s, transform .12s; }
.dm-pay .uicon { width: 20px; height: 20px; }
.dm-pay:hover:not(:disabled) { border-color: var(--s-accent); }
.dm-pay:active:not(:disabled) { transform: scale(.98); }
.dm-pay:disabled { opacity: .45; cursor: not-allowed; }
.dm-pay-primary { background: #f4f2ed; border-color: #f4f2ed; color: #141414; }
.dm-pay-primary:hover:not(:disabled) { background: #fff; }
.dm-pay-primary:disabled { background: #3a3c40; border-color: #3a3c40; color: #a9abb0; opacity: 1; }

/* ---------- Bon ---------- */
.dm-dialog { width: calc(100% - 32px); max-width: 420px; max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; overflow: visible; color: #15171c; }
.dm-dialog::backdrop { background: rgba(8, 9, 11, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dm-dialog[open] { animation: dm-rise .3s cubic-bezier(.2, .8, .2, 1); }
.dm-paper { max-height: calc(100dvh - 190px); overflow-y: auto; padding: 28px 26px 38px; background: #fffefb; border-radius: 6px 6px 0 0; box-shadow: 0 30px 80px -20px #000; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55;
  -webkit-mask: conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) 50% / 18px 100%; mask: conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) 50% / 18px 100%; }
.site[dir="rtl"] .dm-paper { font-family: inherit; }
.dm-paper hr { border: 0; border-top: 1px dashed #b9b2a6; margin: 12px 0; }
.dm-rc-head { text-align: center; }
.dm-rc-head strong { display: block; font-size: 17px; letter-spacing: .04em; }
.dm-rc-head small { color: #5d6169; }
.dm-rc-row { display: flex; justify-content: space-between; gap: 12px; }
.dm-rc-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.dm-rc-row > .dm-num { white-space: nowrap; }
.dm-rc-sub { padding-inline-start: 14px; color: #5d6169; font-size: 13px; }
.dm-rc-total { font-size: 18px; font-weight: 700; }
.dm-rc-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: #5d6169; }
.dm-rc-foot { margin: 14px 0 0; text-align: center; }
.dm-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dm-dialog-actions .btn { flex: 1 1 170px; justify-content: center; background-color: #101112; }
.dm-dialog-actions .btn-primary { background-color: var(--s-accent); }

/* ---------- PDA ---------- */
.dm-pda-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 64px; margin-top: 72px; padding: 44px; background: var(--s-surface); border: 1px solid var(--s-line); border-radius: 14px; }
.dm-pda-copy h3 { margin: 16px 0; font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.dm-pda-copy > p { max-width: 46ch; color: var(--s-ink-soft); font-size: 15px; line-height: 1.8; }
.dm-steps { counter-reset: dm-step; display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.dm-steps li { counter-increment: dm-step; display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--s-ink); }
.dm-steps li::before { content: counter(dm-step); display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--s-accent-soft); border: 1px solid rgba(255, 74, 67, .35); color: var(--s-accent); font-weight: 600; font-size: 14px; }
.dm-pda-stage { display: grid; justify-items: center; gap: 14px; }
.dm-pda { position: relative; width: 300px; aspect-ratio: 9 / 17.6; padding: 11px; background: linear-gradient(160deg, #34383f, #0b0d11); border-radius: 44px; box-shadow: 0 30px 70px -20px #000, inset 0 0 0 2px #454a54; }
.dm-key { position: absolute; inset-inline-end: -4px; width: 5px; height: 52px; border-radius: 3px; background: #d81f2a; }
.dm-key-1 { top: 22%; }
.dm-key-2 { top: 34%; }
.dm-phone-screen { display: flex; flex-direction: column; height: 100%; padding: 16px 16px 18px; background: #0c0d0f; border-radius: 34px; overflow: hidden; }
.dm-phone-status { display: flex; justify-content: space-between; padding-inline: 8px; font-size: 12px; color: var(--s-ink-soft); }
.dm-phone-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0; }
.dm-phone-brand strong { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--s-accent); }
.dm-phone-home { display: grid; gap: 14px; }
.dm-phone-menu { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dm-phone-menu li { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--s-surface2); border: 1px solid var(--s-line); border-radius: 14px; font-size: 15px; font-weight: 500; }
.dm-phone-menu .uicon { width: 22px; height: 22px; }
.dm-phone-menu .dm-chev { margin-inline-start: auto; width: 18px; height: 18px; color: var(--s-ink-muted); }
.site[dir="rtl"] .dm-chev { transform: scaleX(-1); }
.dm-phone-sync { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(61, 220, 132, .08); border: 1px solid rgba(61, 220, 132, .25); }
.dm-phone-sync .status-dot { background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .18); }
.dm-phone-sync strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.dm-phone-sync small { display: block; font-size: 12px; color: var(--s-ink-soft); }
.dm-phone-scan { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; margin-bottom: 14px; }
.dm-finder { position: relative; display: grid; place-items: center; height: 150px; background: #05070a; border: 1px solid var(--s-line); border-radius: 16px; overflow: hidden; }
.dm-finder::before { content: ""; position: absolute; inset: 14px; border: 2px solid var(--s-accent); border-radius: 10px;
  -webkit-mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat, linear-gradient(#000 0 0) top right / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
  mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat, linear-gradient(#000 0 0) top right / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat; }
.dm-bars { width: 64%; height: 56px; border-radius: 2px; opacity: .85; background: repeating-linear-gradient(90deg, #e9e6df 0 3px, transparent 3px 6px, #e9e6df 6px 7px, transparent 7px 11px, #e9e6df 11px 15px, transparent 15px 17px); }
.dm-laser { position: absolute; left: 12%; right: 12%; top: 18%; height: 3px; border-radius: 3px; background: var(--s-accent); box-shadow: 0 0 18px 4px rgba(255, 74, 67, .7); opacity: 0; }
.dm-finder.is-scanning .dm-laser { opacity: 1; animation: dm-laser 1.1s ease-in-out infinite alternate; }
.dm-result { min-height: 112px; }
.dm-hint { display: grid; place-items: center; height: 100%; margin: 0; color: var(--s-ink-soft); font-size: 14px; text-align: center; }
.dm-result-card { padding: 14px; background: var(--s-surface2); border: 1px solid var(--s-line); border-radius: 14px; animation: dm-rise .35s ease-out; }
.dm-result-name { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.dm-emoji { font-size: 24px; }
.dm-result-ean { margin: 2px 0 10px; font-size: 12px; color: var(--s-ink-soft); }
.dm-result-stock { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--s-line); font-size: 14px; color: var(--s-ink-soft); }
.dm-result-stock strong { color: #3ddc84; font-size: 20px; font-weight: 600; }
.dm-phone-btn { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border: 0; border-radius: 16px; background: linear-gradient(135deg, #d81f2a, #b80f20); color: #fff; font: inherit; font-size: 16px; text-align: center; font-weight: 600; cursor: pointer; box-shadow: 0 14px 28px -14px rgba(255, 74, 67, .8); transition: transform .15s, filter .2s; }
.dm-phone-btn .uicon { width: 22px; height: 22px; }
.dm-phone-btn:hover { filter: brightness(1.1); }
.dm-phone-btn:active { transform: scale(.98); }
.dm-phone-btn:disabled { opacity: .75; cursor: progress; }

@keyframes dm-pop { 0% { transform: scale(.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dm-rise { 0% { transform: translateY(18px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes dm-laser { from { top: 18%; } to { top: 78%; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .dm-body { grid-template-columns: 330px minmax(0, 1fr); }
  .dm-pda-wrap { gap: 40px; padding: 32px; }
}
@media (max-width: 900px) {
  .dm-body { grid-template-columns: 1fr; min-height: 0; }
  .dm-cart { order: 2; max-height: none; }
  .dm-lines { max-height: 340px; }
  .dm-pda-wrap { grid-template-columns: 1fr; justify-items: center; margin-top: 48px; }
  .dm-pda-copy { justify-self: stretch; }
}
@media (max-width: 720px) {
  .dm-pos { padding: 10px; }
  .dm-top { flex-wrap: wrap; gap: 10px; }
  .dm-title span, .dm-badge { display: none; }
  .dm-search { order: 3; flex: 1 1 100%; max-width: none; margin-inline-start: 0; }
  .dm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-tile { padding: 12px; }
  .dm-tile-name { font-size: 14px; }
  .dm-total-value { font-size: 32px; }
  .dm-pda-wrap { padding: 24px 18px; }
  .dm-pda { width: min(100%, 300px); }
}
