/* Lái tàu: nút "Cầm lái" + cụm bẻ lái / buồm / neo (trinh_khach/src/lai.ts dựng vào #cum-lai).
   Kiểu mặc định; HUD muốn dời chỗ / đổi dáng thì ghi đè theo id. Mọi nút ≥ 48px. */
#cum-lai { z-index: 4; }
.lai-nut { min-width: 52px; min-height: 52px; padding: 4px 8px; border-radius: 12px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--nen, rgba(7, 24, 40, .9)); border: 1px solid var(--vien, rgba(79, 227, 255, .45)); box-shadow: var(--phat, 0 0 10px rgba(79, 227, 255, .2));
  color: #e8fdff; font: inherit; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.lai-nut b { font-size: 20px; line-height: 1; }
.lai-nut small { font-size: 10px; opacity: .85; white-space: nowrap; }
.lai-nut:active, .lai-nut.an { transform: scale(.94); background: rgba(31, 111, 140, .95); }
.lai-nut:disabled { opacity: .38; cursor: default; }
#lai-nut-cam { flex-direction: row; gap: 8px; padding: 8px 16px; min-height: 48px; border-color: #ffd84a; box-shadow: 0 0 14px rgba(255, 216, 74, .45); animation: laiNhay 1.2s ease-in-out infinite; }
#lai-nut-cam span { font-weight: 700; font-size: 15px; }
#lai-nut-cam .lai-phim { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .14); font-size: 11px; }
body.cam-ung #lai-nut-cam .lai-phim { display: none; }
#lai-nut-cam[hidden], #lai-bang[hidden] { display: none !important; }
@keyframes laiNhay { 50% { transform: translateY(-3px); } }

#lai-bang { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#lai-tt { display: flex; gap: 10px; align-items: center; padding: 4px 12px; border-radius: 99px; background: rgba(7, 24, 40, .88); border: 1px solid rgba(79, 227, 255, .35);
  font-size: 12px; color: #d8eef5; white-space: nowrap; }
#lai-tt b { color: #ffe9a8; }
#lai-tt-toc { font-weight: 700; color: #9ff7ff; }
#lai-tt-gio.tot { color: #8dffb0; }
#lai-tt-gio.xau { color: #ff9a8a; }
#lai-hang { display: flex; gap: 6px; align-items: stretch; }
#lai-buom-muc { width: 12px; display: flex; flex-direction: column-reverse; gap: 4px; justify-content: center; }
#lai-buom-muc i { display: block; height: 18px; border-radius: 3px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
#lai-buom-muc[data-muc="1"] i:first-child, #lai-buom-muc[data-muc="2"] i { background: #f4ead2; border-color: #fff; box-shadow: 0 0 6px rgba(255, 240, 200, .7); }
#lai-neo.bat { border-color: #ffb04a; background: rgba(120, 60, 10, .92); box-shadow: 0 0 12px rgba(255, 160, 60, .5); }
#lai-roi { border-color: rgba(255, 140, 140, .6); }

/* đang cầm lái: thanh cầm + gợi ý câu nhường chỗ cho cụm lái (không câu, không đặt đồ lúc lái) */
body.dang-lai #thanh-cam, body.dang-lai #goi-y, body.dang-lai #nut-chinh, body.dang-lai #nut-phu { display: none !important; }

/* điện thoại: cụm lái xếp 2 hàng gọn bên tay phải, cần điều khiển bên trái vẫn bẻ lái được nên ẩn ◀ ▶ */
body.cam-ung #lai-trai, body.cam-ung #lai-phai { display: none; }
body.cam-ung.dang-lai #cum-lai { bottom: calc(14px + var(--day, 0px)); }
body.cam-ung #lai-bang { align-items: flex-end; }
body.cam-ung .lai-nut { min-width: 56px; min-height: 56px; }
@media (max-width: 620px) {
  body.cam-ung #lai-hang { flex-wrap: wrap; justify-content: flex-end; max-width: 200px; }
  #lai-tt { font-size: 11px; gap: 7px; padding: 3px 9px; }
}

/* ---- biển vô hạn: nút kéo / phóng bản đồ lớn + dòng toạ độ (ban_do.ts) ---- */
#bd-dk { position: absolute; left: 8px; bottom: 34px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
#bd-dk button { width: 44px; height: 44px; border-radius: 10px; background: rgba(7, 24, 40, .9); border: 1px solid rgba(79, 227, 255, .45); color: #e8fdff;
  font: 700 20px/1 system-ui, sans-serif; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; touch-action: manipulation; }
#bd-dk button small { font-size: 8.5px; font-weight: 600; opacity: .9; white-space: nowrap; }
#bd-dk button:active { transform: scale(.94); background: rgba(31, 111, 140, .95); }
#bd-ve.bat { border-color: #ffd84a; box-shadow: 0 0 12px rgba(255, 216, 74, .5); color: #fff6cf; }
#bd-toado { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 10px; background: rgba(4, 14, 26, .78); color: #d8eef5; font-size: 11.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 2; font-variant-numeric: tabular-nums; }
/* ---- kênh chat "Gần đây" + biểu cảm nhanh (nguoi_khac.ts) ---- */
#chat-kenh { flex: 0 0 auto; padding: 0 9px; margin-right: 4px; border-radius: 8px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(79, 227, 255, .35); color: #d8eef5;
  font: 600 12px/1 system-ui, sans-serif; white-space: nowrap; cursor: pointer; min-height: 32px; }
#chat-kenh.gan { border-color: #8dffb0; color: #c8ffd8; background: rgba(20, 80, 50, .55); }
#chat-bc { display: flex; gap: 4px; padding: 4px 8px 0; }
#chat-bc[hidden] { display: none; }
#chat-bc button { flex: 1 1 0; min-height: 36px; border-radius: 8px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .16); font-size: 18px; cursor: pointer; }
#chat-bc button:active { transform: scale(.92); }
#chat-log p.gan { color: #c8ffd8; }
#chat-log .gan-nhan { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: rgba(60, 170, 110, .5); color: #eafff0; }

/* nút máy hơi nước (may_tau) trong cụm lái */
#lai-may[hidden] { display: none; }
#lai-may.bat { border-color: #ffb04a; background: rgba(120, 60, 10, .92); box-shadow: 0 0 12px rgba(255, 160, 60, .5); }
#lai-may.bat b { animation: may-quay 1.2s linear infinite; display: inline-block; }
@keyframes may-quay { to { transform: rotate(360deg); } }
