/* ==========================================================================
   POS Touch-Friendly Virtual On-Screen Keyboard (Lao & English)
   ========================================================================== */

.pos-vk-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  background-color: #2b3035;
  color: #fff;
  border-top: 2px solid var(--pos-primary, #17594a);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  padding: 8px 12px 12px 12px;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.22s cubic-bezier(0.1, 0.9, 0.2, 1);
  display: flex;
  flex-direction: column;
  max-width: 960px;
  margin: 0 auto;
  border-radius: 14px 14px 0 0;
}

.pos-vk-container.hidden {
  transform: translateY(115%);
  pointer-events: none;
}

[data-bs-theme="dark"] .pos-vk-container {
  background-color: #1a1d21;
  border-top-color: #20c997;
}

/* Header bar inside keyboard */
.pos-vk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.pos-vk-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #cbd5e1;
}

.pos-vk-lang-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Keypad Grid Rows */
.pos-vk-board {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pos-vk-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  touch-action: manipulation;
}

/* Base Key */
.pos-vk-key {
  flex: 1 1 0;
  min-width: 28px;
  height: 44px;
  padding: 0;
  background-color: #3e444a;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.1s ease, transform 0.05s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pos-vk-key:hover {
  background-color: #4e555c;
  color: #fff;
}

.pos-vk-key:active {
  background-color: #198754;
  color: #fff;
  transform: translateY(2px);
  box-shadow: none;
}

/* Special Action Keys */
.pos-vk-key.key-wide {
  flex: 1.5 1 0;
  font-size: 0.9rem;
}

.pos-vk-key.key-extra-wide {
  flex: 2 1 0;
  font-size: 0.9rem;
}

.pos-vk-key.key-space {
  flex: 4 1 0;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.pos-vk-key.key-action {
  background-color: #212529;
  border-color: rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.pos-vk-key.key-action:hover {
  background-color: #2d3238;
}

.pos-vk-key.key-action.active {
  background-color: #0d6efd;
  color: #fff;
}

.pos-vk-key.key-lang {
  background-color: #17594a;
  border-color: #20c997;
  color: #fff;
}

.pos-vk-key.key-lang:hover {
  background-color: #12372a;
}

.pos-vk-key.key-clear {
  background-color: #6c757d;
}

.pos-vk-key.key-close {
  background-color: #dc3545;
  color: #fff;
}

.pos-vk-key.key-enter {
  background-color: #198754;
  color: #fff;
}

@media (max-width: 768px) {
  .pos-vk-key {
    height: 40px;
    font-size: 1rem;
    min-width: 22px;
  }
}
