.switch_game_mode_btn {
  display: flex;
  align-items: stretch;
  margin-left: 4px;
  height: 35px;
  min-width: 136px;
  cursor: pointer;
}

.switch_game_mode_btn__left {
  flex: 0 0 25px;
  background: url("../../images-web/baccarat/switch_game_mode_btn__left.png")
    no-repeat;
  background-size: 100% 100%;
}

.switch_game_mode_btn__mid {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 96px;
  padding: 0 4px;
  background: url("../../images-web/baccarat/switch_game_mode_btn__mid.png")
    repeat-x;
  background-size: auto 100%;
}

.switch_game_mode_btn__title {
  color: #ffffff;
  font-size: 13px;
  line-height: 12px;
  white-space: nowrap;
}

.switch_game_mode_btn__content {
  min-height: 12px;
  color: #a89546;
  font-size: 10px;
  line-height: 12px;
  white-space: nowrap;
  opacity: 0.8;
}

.switch_game_mode_btn__right {
  flex: 0 0 15px;
  background: url("../../images-web/baccarat/switch_game_mode_btn__right.png")
    no-repeat;
  background-size: 100% 100%;
}

.switch_game_mode_btn--disabled {
  cursor: auto;
  pointer-events: none;
  user-select: none;
}

.switch_game_mode_btn--disabled .switch_game_mode_btn__left {
  background-image: url("../../images-web/baccarat/switch_game_mode_btn__left--disabled.png");
}

.switch_game_mode_btn--disabled .switch_game_mode_btn__mid {
  background-image: url("../../images-web/baccarat/switch_game_mode_btn__mid--disabled.png");
}

.switch_game_mode_btn--disabled .switch_game_mode_btn__right {
  background-image: url("../../images-web/baccarat/switch_game_mode_btn__right--disabled.png");
}

.switch_game_mode_btn--disabled .switch_game_mode_btn__title {
  opacity: 0.5;
}

/* ================================================================
   switchGameMode Popup
   結構參考 MultiBaccarat SwitchMode.vue + _popup_set.scss(.popup-switch)，
   從 SCSS 轉為固定 px 的扁平選擇器：
   - vw(Npx) 一律先用 375 基準換算出的 px 數字直接寫死（桌面版無 @media 斷點機制，非流體版型）
   - @extend %popup_basic / %popup_header 的屬性直接內聯
   - 未搬移 @include fullpage-breakpoint(fat_4) 響應式變化、.popup_con 遮罩背景（此頁面 popup 慣例無遮罩）
   - 關閉鈕 / 確認鈕目前為色塊佔位，樣式待後續設計稿/素材補上
   ================================================================ */

#switchGameModeBox.popup-switch {
  position: absolute;
  top: 0;
  left: 0;
  min-width: initial;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  transform: none;
}

.popup-switch__card {
  overflow: hidden;
  width: 624px;
  border-radius: 4px;
  background: rgba(27, 28, 27, 0.95);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.4);
}

.popup-switch__header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  background: #2b2b2b;
}

.popup-switch__header .header-title {
  position: relative;
  margin: 0;
  color: #aaaaaa;
  font-weight: 400;
  font-size: 20px;
  line-height: 20px;
}

.popup-switch__header .header-close-button {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("../../images-web/baccarat/header-close-button.svg");
  cursor: pointer;
}

.popup-switch__list {
  padding: 12px 20px 0;
}

.popup-switch__list h5 {
  margin: 0 0 12px;
  color: #999688;
  font-weight: 400;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.switch-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0 0 16px;
  border-bottom: 1px solid #58564f;
  list-style: none;
}

.switch-list__item {
  display: flex;
  flex-flow: column nowrap;
  background-color: transparent;
  color: #484848;
  font-size: 11px;
  cursor: pointer;
}

.switch-list__item-header {
  width: 100%;
  height: 16px;
  border-radius: 4px 4px 0 0;
  background-color: #484848;
  color: #909090;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.switch-list__item-body {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 1px;
  width: 100%;
  height: auto;
  border: 1px solid #484848;
  background-color: #484848;
  white-space: pre; /* 只手動用 \A 換行，超過不換行 */
}

.switch-list__item-body .betitem {
  display: flex;
  grid-column: span 3;
  justify-content: center;
  align-items: center;
  min-height: 39px;
  background-color: #000000;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: pre-line; /* DOM 內容若有真正的換行字元(\n)會斷行，其餘空白正常收合/換行 */
}

.jp .bac-pair .betitem.phoenix {
  letter-spacing: -13%;
}

.vn .bac-natural .betitem.player-natural,
.vn .bac-natural .betitem.banker-natural,
.vn .bac-pair .betitem.turtle,
.vn .bac-pair .betitem.phoenix {
  letter-spacing: -8%;
}

.switch-list__item-body .betitem:nth-child(n + 6) {
  grid-column: span 5;
  min-height: 25px;
}

/* .game_info_box 對 .banker/.player/.tie 這幾個 class 有全域寫死顏色（給 betLimitBox 類別文字用，
   見 style_one_bac.css 的 .game_info_box .banker/.player/.tie），
   這裡的 betitem 只是玩法標籤沿用同名 class，需恢復成跟其他 betitem 一致的預設顏色 */
.switch-list__item-body .betitem.banker,
.switch-list__item-body .betitem.player,
.switch-list__item-body .betitem.tie {
  color: inherit;
}

.switch-list__item--now .switch-list__item-header {
  background-color: #d4c798;
  color: #3f3a34;
}

.switch-list__item--now .switch-list__item-body {
  border-color: #d4c798;
  background-color: #d4c798;
}

.switch-list__item--now .switch-list__item-body .betitem {
  background-color: #3f3a34;
  color: #d4c798;
}

.popup-switch__action {
  padding: 16px 0 24px;
}

.popup-switch__action .submit-button {
  display: block;
  width: 256px;
  height: 40px;
  margin: 0 auto;
  border: 1px solid #191919;
  border-radius: 4px;
  background: linear-gradient(0deg, #ce9500 0%, #ffc300 100%);
  color: #000000;
  font-size: 13px;
  line-height: 40px;
  text-align: center;
}

.popup-switch__action .submit-button:hover {
  background: linear-gradient(0deg, #e6a700 0%, #ffee00 100%);
}

/* ================================================================
   Road Zone 龍虎鬥說明按鈕
   結構參考 MultiBaccarat Road.vue 的 .zone-road__btn--info
   絕對定位貼齊大路右下角，說明圖示素材已套用（icon_info_question.svg）
   ================================================================ */

.road-zone__btn--info {
  position: absolute;
  z-index: 10;
  right: 4px;
  bottom: 4px;
  width: 26px;
  height: 26px;
  border: none;
  background-color: transparent;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("../../images-web/baccarat/icon_info_question.svg");
  cursor: pointer;
}

/* ================================================================
   龍虎鬥說明 Popup
   結構參考 MultiBaccarat DTInfo.vue + DTInfoIcon.vue，
   由 .road-zone__btn--info（#dtInfoBtn）點擊觸發開啟
   - 版面/色塊佔位規則沿用上方 popup-switch 的作法
   - icon class 命名對齊 mobile 版編譯後的 .icon-pic-dt_sd/bd/st/bt/dt
   - 實際「幾局未開」數據綁定待後續補上
   ================================================================ */

#dlInfoBox.popup-dt-info {
  position: absolute;
  top: 0;
  left: 0;
  min-width: initial;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  transform: none;
}

.popup-dt-info__card {
  overflow: hidden;
  border-radius: 4px;
  background: rgba(27, 28, 27, 0.95);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.4);
}

.popup-dt-info__header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  background: #2b2b2b;
}

.popup-dt-info__header .header-title {
  position: relative;
  margin: 0;
  color: #aaaaaa;
  font-weight: 400;
  font-size: 20px;
  line-height: 20px;
}

.popup-dt-info__header .header-close-button {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("../../images-web/baccarat/header-close-button.svg");
  cursor: pointer;
}

.popup-dt-info__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 48px;
  padding: 24px 48px;
}

.dt_info-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dt_info-icon__title {
  color: #f1e4be;
  font-size: 11px;
  text-align: center;
}

.dt_info-icon__pic {
  width: 70px;
  height: 70px;
  background-size: 72px 72px;
  background-repeat: no-repeat;
  background-position: -1px -1px;
}

.dt_info-icon__pic.icon-pic-dt_sd {
  background-image: url("../../images-web/baccarat/dtinfo_small_dragon.png");
}

.dt_info-icon__pic.icon-pic-dt_bd {
  background-image: url("../../images-web/baccarat/dtinfo_big_dragon.png");
}

.dt_info-icon__pic.icon-pic-dt_st {
  background-image: url("../../images-web/baccarat/dtinfo_small_tiger.png");
}

.dt_info-icon__pic.icon-pic-dt_bt {
  background-image: url("../../images-web/baccarat/dtinfo_big_tiger.png");
}

.dt_info-icon__pic.icon-pic-dt_dt {
  background-image: url("../../images-web/baccarat/dtinfo_dt.png");
}

.dt_info-icon__info {
  width: max-content;
  min-height: 19px;
  margin-top: -10px;
  padding: 1px 7px;
  border: 0.5px solid #ffd694;
  border-radius: 10px;
  background-color: #000000;
  color: #f1e4be;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  word-break: break-word;
}

/* ================================================================
   betLimit Popup
   結構參考 MultiBaccarat BetLimit.vue + _popup_set.scss(.popup-betlimit)，
   從 SCSS 轉為固定 px 的扁平選擇器，版面/色塊佔位規則沿用上方 popup-switch 的作法：
   - vw(Npx) 一律直接寫死 px 數字（桌面版無 @media 斷點機制，非流體版型）
   - 外框寬度 870px，例外沒有對齊本頁其他已搬移 popup（popup-switch/popup-dt-info）的 624px，
     是為了讓 .popup-betlimit__detail 的左右兩欄（各 386px + 16px gap）放得下，不會超版
   - .detail-row__title 疊加 .banker/.player/.tie/.tie_super/.pair 需要比
     style_one_bac.css 的 .game_info_box .banker 等全域規則多一層 class，
     specificity 才會贏（同名 class 沿用自 switch-list__item-body .betitem 的
     衝突處理方式，見上方 189 行註解）
   ================================================================ */

#betLimitBox.popup-betlimit {
  position: absolute;
  top: 0;
  left: 0;
  min-width: initial;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  transform: none;
}

.popup-betlimit__card {
  overflow: hidden;
  width: 870px;
  border-radius: 4px;
  background: rgba(27, 28, 27, 0.95);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.4);
}

.popup-betlimit__header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  background: #2b2b2b;
}

.popup-betlimit__header .header-title {
  position: relative;
  margin: 0;
  color: #aaaaaa;
  font-weight: 400;
  font-size: 20px;
  line-height: 20px;
}

.popup-betlimit__header .header-close-button {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("../../images-web/baccarat/header-close-button.svg");
  cursor: pointer;
}

.popup-betlimit__list {
  padding: 16px 9px 14px;
}

.popup-betlimit__list h5 {
  margin: 0 0 8px;
  color: #999688;
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
}

/* betLimitSet(目錄) 跟 popup-betlimit__action(送出鈕) 是 popup-betlimit__list 裡的左右欄，
   跟下面 .popup-betlimit__detail 的 .detail-columns 是同一種「固定寬度 + space-between」處理方式 */
.popup-betlimit__list-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.limit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 704px; /* 172 * 4 + 4 * 3，剛好排滿 4 欄 */
  margin: 0;
  padding: 0;
  list-style: none;
}

.limit-list__item {
  display: flex;
  align-items: center;
  flex: 0 0 172px;
  height: 40px;
  padding: 13px 11px;
  border: 1px solid #999688;
  border-radius: 2px;
  background-color: transparent;
  color: #999688;
  font-size: 12px;
  cursor: pointer;
}

.limit-list__item.now {
  background-color: #d8c88e;
  color: #212121;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.5);
}

/* ID 補在前面蓋過 style_one_bac.css 的 .game_info_box dl { width: 50%; ... }
   （#betLimitDetailSet 是 <dl>，一class 選擇器 specificity 贏不了 1class+1element 的舊規則） */
#betLimitDetailSet.popup-betlimit__detail {
  position: relative;
  width: auto;
  margin: 0;
  padding: 8px 20px;
}

.popup-betlimit__detail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  display: block;
  width: calc(100% - 40px);
  border-top: 1px solid #3b3b3b;
}

.popup-betlimit__detail .detail-title {
  margin-bottom: 3px;
  color: #f1e4be;
  font-weight: 700;
  font-size: 13px;
  line-height: 20px;
}

/* 依玩法(betMode)把 .detail-row 分配到左右兩欄，見 singleBacTable.js applyBetLimitDetailOrder。
   每欄寬度跟著 row 內容(150+8+228=386px)走，不是左右各半平分，靠 space-between 讓左欄貼左、右欄貼右 */
.popup-betlimit__detail .detail-columns {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 11px;
}

.popup-betlimit__detail .detail-column {
  flex: 0 0 auto;
  min-width: 0;
}

.popup-betlimit__detail .detail-row {
  display: flex;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 16px;
}

.popup-betlimit__detail .detail-row__title {
  flex: 0 0 150px;
}

.popup-betlimit__detail .detail-row__value {
  flex: 0 0 228px;
  margin: 0;
  color: #999688;
}

.popup-betlimit__detail .detail-row__title.banker {
  color: #ff2f2f;
}

.popup-betlimit__detail .detail-row__title.player {
  color: #51b5f6;
}

.popup-betlimit__detail .detail-row__title.tie {
  color: #9dde3d;
}

.popup-betlimit__detail .detail-row__title.tie_super {
  color: #e6a100;
}

.popup-betlimit__detail .detail-row__title.pair {
  color: #b8ab83;
}

.popup-betlimit__action .submit-button {
  display: block;
  margin-bottom: 5px;
  width: 135px;
  height: 30px;
  border: 1px solid #191919;
  border-radius: 4px;
  background: linear-gradient(0deg, #ce9500 0%, #ffc300 100%);
  color: #000000;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
}

.popup-betlimit__action .submit-button:hover {
  background: linear-gradient(0deg, #e6a700 0%, #ffee00 100%);
}
