/* Perakende dokunmatik tuş takımı (public/perakende-tus.js). Tuşlar en az 56 px; dar ekranda (≤ 600 px) aşağıdan açılan panel. */
.pk-tus { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-sizing: border-box; min-width: 0; }
.pk-tus[hidden] { display: none; }
.pk-tus-bas { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pk-tus-ekran { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; padding: 4px 10px; min-height: 44px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt, var(--surface)); }
.pk-tus-hedef { flex: 0 1 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted, var(--text-muted, #64748b)); }
.pk-tus-deger { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.pk-tus-carpan { color: var(--pri, var(--primary)); font-size: 16px; }
.pk-tus-kip { flex: 0 0 auto; width: 92px; min-height: 44px; font: inherit; font-size: 13px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); padding: 0 4px; }
.pk-tus-kapat { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.pk-tus-izgara { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pk-tus-t { min-width: 56px; min-height: 56px; padding: 0; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-alt, var(--surface)); color: var(--text); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pk-tus-t[data-tus="temizle"], .pk-tus-t[data-tus="geri"], .pk-tus-t[data-tus="carpan"] { font-size: 15px; }
.pk-tus-t[data-tus="temizle"] { font-size: 13px; }
.pk-tus-t.ekle { grid-column: span 2; border-color: transparent; background: var(--pri, var(--primary)); color: #fff; font-size: 18px; }
.pk-tus-t:active:not(:disabled) { filter: brightness(.92); }
.pk-tus-t:disabled { opacity: .35; cursor: not-allowed; }
.pk-tus-t:focus-visible, .pk-tus-kapat:focus-visible, .pk-tus-kip:focus-visible { outline: 3px solid var(--pri, var(--primary)); outline-offset: 2px; }
.pk-tus-ac.on { background: var(--pri, var(--primary)); color: #fff; border-color: transparent; }
.pk-tus-hedef-alan { outline: 3px solid var(--pri, var(--primary)); outline-offset: 1px; border-radius: 10px; }
.pk-tus-izgara + * { margin: 0; }
@media (max-width: 820px) {
  .pk-sag .pk-tus { flex: 1 1 100%; }
  .pk-sag { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .pk-tus:not(.pk-tus-gomulu) { height: min(40vh, 300px); height: min(40dvh, 300px); overflow: hidden; gap: 6px; position: fixed; left: 0; right: 0; bottom: var(--yt-bottom-h, 0px); z-index: 1200; border-radius: 16px 16px 0 0; border-width: 1px 0 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, .22); padding: 8px 10px 10px; }
  body.pk-tus-acik .pk, body.pk-tus-acik #stock-count-form { padding-bottom: calc(var(--pk-tus-h, 0px) + var(--yt-bottom-h, 0px)); } /* alttaki sabit panel son satırı kapatmasın (sayfa sonunda ikisinin yüksekliği kadar boşluk) */
  body.pk-tus-acik .pk-sag { position: fixed; left: 0; right: 0; top: auto; bottom: calc(var(--yt-bottom-h, 0px) + var(--pk-tus-ph, 0px)); z-index: 1190; margin: 0; border-radius: 0; box-sizing: border-box; }
}
@media (max-width: 600px) { /* kompakt alt panel: yükseklik ekranın %40'ını aşmaz; tuşlar kalan yüksekliği paylaşır */
  body.pk-tus-acik #pk2-hizli-kap > .pk-not { display: none; } /* panel açıkken boş 'Hızlı tuş' açıklaması ve boş sepet kutusu küçülür: hiçbiri toplam çubuğunun altında kalmaz */
  body.pk-tus-acik .pk-bos { padding: 12px; }
  .pk-tus:not(.pk-tus-gomulu) .pk-tus-kip { display: none; }
  .pk-tus:not(.pk-tus-gomulu) .pk-tus-ekran { min-height: 40px; }
  .pk-tus:not(.pk-tus-gomulu) .pk-tus-kapat { height: 40px; width: 44px; }
  .pk-tus:not(.pk-tus-gomulu) .pk-tus-izgara { flex: 1 1 auto; min-height: 0; grid-auto-rows: minmax(0, 1fr); gap: 5px; }
  .pk-tus:not(.pk-tus-gomulu) .pk-tus-t { min-width: 0; min-height: 0; font-size: 18px; }
}
@media (max-width: 600px) { .pk-tus-ac { display: none !important; } } /* telefonda tuş takımı yok: düğme de gizli */
/* Mal kabul / Sayım (altPanel): ekran tuş takımı ALTA yapışık kompakt panel (ekranın en çok %40'ı, en çok 340 px); sayfa altına panel kadar boşluk eklenir, odaktaki satır panelin üstüne kaydırılır */
.pk-tus.pk-tus-alt:not(.pk-tus-gomulu) { position: fixed; left: 50%; transform: translateX(-50%); width: min(760px, 100%); bottom: var(--yt-bottom-h, 0px); z-index: 1200; height: min(40vh, 340px); height: min(40dvh, 340px); overflow: hidden; gap: 6px; border-radius: 16px 16px 0 0; border-width: 1px 1px 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, .22); padding: 8px 10px 10px; }
.pk-tus-alt:not(.pk-tus-gomulu) .pk-tus-ekran { min-height: 40px; }
.pk-tus-alt:not(.pk-tus-gomulu) .pk-tus-kapat { height: 40px; }
.pk-tus-alt:not(.pk-tus-gomulu) .pk-tus-izgara { flex: 1 1 auto; min-height: 0; grid-auto-rows: minmax(0, 1fr); gap: 5px; }
.pk-tus-alt:not(.pk-tus-gomulu) .pk-tus-t { min-width: 0; min-height: 0; }
body.pk-tus-acik #stock-count-form, body.pk-tus-acik .pk2-mk { padding-bottom: calc(var(--pk-tus-h, 0px) + var(--yt-bottom-h, 0px) + 12px); }
@media print { .pk-tus { display: none !important; } }
