/* =====================================================================
   MÀN CHỌN TOWER (khởi đầu + sau mỗi vài round) — dòng chỉ số đầy đủ chữ, nhãn "Đánh quái bay", nút Chọn, gợi ý khung Chi tiết.
   Con số (cỡ chữ, màu, bề rộng cột điện thoại) lấy từ CONFIG.CHON_TOWER (js/config.js) qua biến --ct-* do game.js đặt lên #buy.
   ===================================================================== */

/* ---- dòng chỉ số: ba dòng ngắn "Sát thương 9" / "Tầm đánh 1,8 ô" / "Tốc độ đánh 1,8 lần mỗi giây" ---- */
#buy .buycard .bcinfo .bcstat { display: flex !important; flex-direction: column; align-items: center; gap: 1px; margin-top: 4px; font-size: var(--ct-co, 12px) !important; line-height: 1.35; }
#buy .buycard .bcinfo .bcstat .cs { display: block !important; font-size: inherit !important; white-space: nowrap; }
#buy .buycard .bcinfo .bcstat .cs > span { display: inline !important; font-size: inherit !important; color: var(--ct-nhan, #e3d4b4) !important; }
#buy .buycard .bcinfo .bcstat .cs > em { font-style: normal; font-weight: 700; color: var(--ct-so, #fff4d6); }

/* ---- nhãn "Đánh quái bay": một dòng riêng dưới dòng chỉ số, giữa thẻ (nhãn dùng chung .airTag) ---- */
.airRow { display: flex !important; justify-content: center; margin-top: 4px; }
#buy .buycard .bcinfo .airRow .airTag, #buyDetail .airRow .airTag { display: inline-flex !important; }
#buyDetail .airRow { justify-content: flex-start; margin-top: 6px; }
/* bản thu gọn của cùng nhãn (chỉ ✈) cho ô rất nhỏ — dải "Đại hiệp trong kho" ở thanh dưới: góc trên phải ô, bấm vào vẫn là chọn ô */
body .airTag.nho, #tbox.tcompact .airTag.nho { position: absolute; top: 1px; right: 1px; min-height: 0; padding: 0 3px; margin: 0; font-size: 12px !important; line-height: 16px; pointer-events: none; }
.airTag.nho::after { display: none; }
.tdTw { position: relative; }
#tdHuongDan .airTag { margin: 0 0 0 6px; }

/* ---- nút Chọn: chữ trắng kem trên nút gỗ (như các nút khác), tương phản > 4,5:1 ---- */
#buy .buycard .buyopt { color: var(--ct-nut, #fff4d6) !important; text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000 !important; font-size: 14px; font-weight: 700; }
#buy .buycard .buyopt:disabled { opacity: .7; }

/* ---- khung Chi tiết: dòng gợi ý (Rê chuột / Chạm) ---- */
#buyDetail .bdgoiy { margin-top: 8px; padding-top: 6px; border-top: 1px dashed rgba(196,145,63,.35); text-align: center; font-size: max(12px, 1em); color: #d6c6a4 !important; }
#buyDetail .bdhint { color: #d6c6a4 !important; font-size: max(12px, 1em); }
#buyDetail .dim { color: #cbbb98; }
/* chống nháy màn (05/12/2026): chiều cao khung do game.js đặt theo CONFIG.CHON_TOWER; chữ dài cuộn bên trong, chừa sẵn chỗ thanh cuộn để chữ không xô ngang */
#buyDetail { overflow-y: auto; scrollbar-gutter: stable; flex: none; }
#buy .fbox > #buyTitle, #buy .fbox > #buyGift, #buy .fbox > #buyList, #buy .fbox > #buyBtns { flex-shrink: 0; } /* không cho trình duyệt co hàng thẻ theo nội dung bảng chi tiết (trước đây thẻ cao / thấp 16 điểm ảnh tùy nhân vật) */

/* ---- điện thoại dọc (#buy.chonDt, mức CONFIG.CHON_TOWER.dtMaxW): mỗi thẻ một hàng — hình | tên, sở hữu, hệ phái | nút; chỉ số và nhãn bên dưới ---- */
#buy.chonDt #buyList { grid-template-columns: minmax(0, 1fr) !important; gap: 6px; width: 100%; }
#buy.chonDt .buycard { display: grid; grid-template-columns: var(--ct-hinh, 60px) minmax(0, 1fr) var(--ct-cotnut, 96px); grid-auto-rows: auto; align-items: center; column-gap: 8px; row-gap: 2px; padding: 6px 8px; text-align: left; }
#buy.chonDt .buycard > :first-child { grid-column: 1; grid-row: 1 / span 3; justify-self: center; }
#buy.chonDt .buycard .bcinfo { display: contents; }
#buy.chonDt .buycard .bcinfo > b { grid-column: 2; grid-row: 1; font-size: 15px; }
#buy.chonDt .buycard .bcinfo > .bcown { grid-column: 2; grid-row: 2; font-size: 13px; height: auto; line-height: 1.3; }
#buy.chonDt .buycard .bcinfo > i { grid-column: 2; grid-row: 3; font-size: 14px; }
#buy.chonDt .buycard .buyopt { grid-column: 3; grid-row: 1 / span 3; width: 100%; min-height: 44px; margin: 0; padding: 2px 6px; font-size: 15px; }
#buy.chonDt .buycard .bcinfo .bcstat { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; column-gap: 14px; row-gap: 0; margin-top: 4px; font-size: var(--ct-co-dt, 14px) !important; }
#buy.chonDt .buycard .bcinfo .airRow { grid-column: 1 / -1; justify-content: flex-start; margin-top: 2px; }
#buy.chonDt .buycard .buyrel { grid-column: 1 / -1; font-size: 13px; }
#buy.chonDt #buyDetail { font-size: 13px; max-height: 30vh; }
#buy.chonDt #buyDetail .bdgoiy, #buy.chonDt #buyDetail .bdhint { font-size: 14px; }
