/* Scanner Keyboard for the product hero (Pages/Shared/Sections/HeroApps/_KeyboardWindow.cshtml): the Android keyboard
   in a phone, portrait, and the scanner view its barcode button opens. Builds on app-window.css (keyframes); loaded
   only by the partial. No Tailwind, no site tokens. The figure is a phone, not a window: it drops the shared frame's
   background, shadow and clipping. */

.tec-appwin--keyboard {
  --kb-key: #fff;
  --kb-board: #eceff1;
  --kb-teal: #26a69a;
  --kb-red: #d32f2f;
  --kb-scan: 1.6s;               /* when the barcode button is tapped */

  align-items: center;
  overflow: visible;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
}
.tec-appwin--keyboard i, .tec-appwin--keyboard b { font-style: normal; }

/* ---- phone ---- */
.tec-appwin__kb-phone { width: 300px; height: 600px; padding: 10px; border-radius: 42px; background: #111; box-shadow: 0 0 0 1.5px #3a3a3c, 0 40px 80px -24px rgba(20, 0, 20, .7); }
.tec-appwin__kb-screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 33px; background: #fff; }
.tec-appwin__kb-status { flex: none; display: flex; justify-content: space-between; align-items: center; height: 30px; padding: 4px 24px 0; background: #fff; font-size: 11px; font-weight: 600; color: #222; }
.tec-appwin__kb-icons { display: flex; gap: 4px; align-items: center; }
.tec-appwin__kb-icons i { width: 12px; height: 8px; background: #222; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.tec-appwin__kb-icons b { width: 16px; height: 8px; border-radius: 2px; background: #222; }

/* ---- the text field with the scanned values ---- */
.tec-appwin__kb-field { flex: 1; min-height: 0; padding: 10px 18px; font-size: 16px; line-height: 1.55; letter-spacing: .02em; color: #9aa0a6; }
.tec-appwin__kb-new { color: #202124; }
.tec-appwin__kb-new::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: text-bottom; background: var(--kb-teal); animation: tec-appwin-caret .9s step-end calc(var(--kb-scan) + 2s) 4 both; }

/* ---- keyboard ---- */
.tec-appwin__kb-board { flex: none; padding: 0 3px 6px; background: var(--kb-board); }
.tec-appwin__kb-bar { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 10px 4px; border-bottom: 1px solid #dde1e4; }
.tec-appwin__kb-tool { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.tec-appwin__kb-tool svg { width: 18px; height: 18px; }
.tec-appwin__kb-scan::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--kb-red); border-radius: 50%; }
.tec-appwin__kb-row { display: flex; justify-content: center; gap: 3px; margin-top: 7px; }
.tec-appwin__kb-row--1 { padding: 0 12px; }
.tec-appwin__kb-key { position: relative; flex: 1; display: grid; place-items: center; height: 36px; border-radius: 5px; background: var(--kb-key); box-shadow: 0 1px 0 #b9bdc1; font-size: 15px; color: #202124; }
.tec-appwin__kb-key sup { position: absolute; top: 2px; right: 3px; font-size: 7px; color: #80868b; }
.tec-appwin__kb-key--fn { flex: 1.4; background: #d5d9dc; font-size: 12px; color: #3c4043; }
.tec-appwin__kb-key--fn svg { width: 14px; height: 14px; }
.tec-appwin__kb-space { flex: 4; height: 36px; border-radius: 5px; background: var(--kb-key); box-shadow: 0 1px 0 #b9bdc1; }
.tec-appwin__kb-enter { flex: 1.4; display: grid; place-items: center; height: 36px; border-radius: 18px; background: var(--kb-teal); font-size: 16px; color: #fff; }
.tec-appwin__kb-nav { flex: none; display: flex; justify-content: space-around; align-items: center; height: 40px; background: #000; }
.tec-appwin__kb-nav i { width: 12px; height: 12px; border: 1.6px solid #e8eaed; }
.tec-appwin__kb-nav .tec-appwin__kb-back { border-width: 0 0 1.6px 1.6px; transform: rotate(45deg); }
.tec-appwin__kb-home { border-radius: 50%; }
.tec-appwin__kb-recent { border-radius: 2px; }

/* ---- the scanner view ---- */
.tec-appwin__kb-scanner {
  position: absolute;
  inset: 30px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: radial-gradient(ellipse at 50% 45%, #59626d 0%, #2e353d 70%, #1f252b 100%);
  visibility: hidden;
}
.tec-appwin__kb-finder { position: relative; width: 78%; padding: 18px 16px; border: 2px solid rgba(255, 255, 255, .85); border-radius: 6px; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 2000px rgba(0, 0, 0, .35); }
/* The scanned label: straight and sharp (a tilt or blur makes thin bars look jagged). */
.tec-appwin__kb-finder img { display: block; width: 100%; height: auto; padding: 8px 10px 6px; border-radius: 3px; background: #fff; }
.tec-appwin__kb-laser { position: absolute; left: 8px; right: 8px; top: 45%; height: 2px; background: #ff1744; box-shadow: 0 0 6px #ff1744; }
.tec-appwin__kb-hint { width: 82%; text-align: center; font-size: 12px; line-height: 1.4; color: #fff; }

@container (max-width: 520px) {
  .tec-appwin__kb-phone { width: 250px; height: 500px; padding: 8px; border-radius: 36px; }
  .tec-appwin__kb-screen { border-radius: 28px; }
  .tec-appwin__kb-key, .tec-appwin__kb-space, .tec-appwin__kb-enter { height: 30px; font-size: 13px; }
  .tec-appwin__kb-field { font-size: 14px; }
}

/* ---- animation: tap the barcode button, the scanner opens and reads, the value is typed in ---- */
.tec-appwin__kb-scan::after { animation: tec-appwin-kbtap .5s ease-out var(--kb-scan) both; }
.tec-appwin__kb-scanner { animation: tec-appwin-kbscanner 1.9s ease-in-out calc(var(--kb-scan) + .35s) both; }
.tec-appwin__kb-laser { animation: tec-appwin-kblaser .6s ease-in-out calc(var(--kb-scan) + .6s) 2 alternate both; }
.tec-appwin__kb-new { animation: tec-appwin-key 0s calc(var(--kb-scan) + 2.25s) both; }
@keyframes tec-appwin-kbtap { 50% { transform: scale(1.25); background: rgba(211, 47, 47, .15); } }
@keyframes tec-appwin-kbscanner { 0% { visibility: visible; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { visibility: hidden; opacity: 0; } }
@keyframes tec-appwin-kblaser { from { top: 28%; } to { top: 62%; } }   /* across the bars, not the digits */
