/* PC QA UI & Responsive Fixes (P0-3, P1-2, P1-6) */

/* 1. Prevent global 1248px min-width overflow on narrow desktop viewports */
.coin-main {
  min-width: 0 !important;
  max-width: 100vw;
}

/* 2. Responsive Header at <= 1380px so Thai & all 11 languages keep Globe & Theme icons inside 1280px */
@media (max-width: 1380px) {
  .coin-top {
    padding: 0 12px !important;
  }
  .top-menu .top-logo {
    width: 36px !important;
    height: 36px !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
  }
  .top-menu .menu-list {
    gap: 2px !important;
  }
  .top-menu .menu-list .menu-item {
    margin-right: 0 !important;
    font-size: 13px !important;
  }
  .top-menu .menu-list .menu-item .item-title {
    padding: 0 8px !important;
    min-width: auto !important;
    gap: 3px !important;
    font-size: 13px !important;
    height: 34px !important;
  }
  .top-operation,
  .top-operation .no-login,
  .top-operation .off-login {
    gap: 5px !important;
    flex-shrink: 0 !important;
  }
  .top-operation .operat-item {
    font-size: 13px !important;
  }
  .top-operation .operat-item .operat-login,
  .top-operation .operat-item .operat-register {
    min-width: auto !important;
    padding: 0 11px !important;
    height: 34px !important;
    font-size: 13px !important;
  }
  .top-operation .operat-item .operat-property,
  .top-operation .operat-item .operat-user,
  .top-operation .operat-item .operat-order {
    padding: 0 8px !important;
    font-size: 13px !important;
  }
  .top-operation .operat-lang.icon-action {
    width: 32px !important;
    height: 32px !important;
  }
}

/* 3. Trade Page Horizontal Overflow Fix (1562px -> 100% viewport cleanly at 1440px & 1280px) */
.container_box1560 {
  width: 100% !important;
  max-width: 1560px !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.trade_all {
  width: 100% !important;
  overflow-x: hidden !important;
}
.trade_main {
  width: 100% !important;
  max-width: 1560px !important;
  box-sizing: border-box !important;
}
.trade_main .content_box {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.trade_main .content_box .content_l {
  min-width: 0 !important;
  flex: 1 1 0% !important;
}
.trade_main .content_box .content_r {
  min-width: 260px !important;
  max-width: 340px !important;
  flex: 0 0 300px !important;
  box-sizing: border-box !important;
}
@media (max-width: 1360px) {
  .trade_main .content_box .content_r {
    flex: 0 0 268px !important;
    min-width: 248px !important;
  }
  .trade_main .coin_header .coin_detail .coin_detail_item {
    padding: 0 10px !important;
  }
}
.trade_main .coin_bottom {
  min-width: 0 !important;
}
.trade_main .coin_bottom .left_container,
.trade_main .coin_bottom .right_container {
  min-width: 0 !important;
}
.trade_main .top_quotes {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.trade_main .order_details_box {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
}
.trade_main .order_details_box .in_tabs_box .in_tabs_inner .el-tabs {
  flex-wrap: wrap;
  gap: 8px;
}

/* 4. Header Dropdown Popovers (Avatar & Asset Management): prevent clipping Help Center / Logout / Asset Details */
.operat-info-tooltip,
.operat-property-tooltip,
.el-popover.operat-info-tooltip,
.el-tooltip__popper.operat-info-tooltip {
  max-height: 520px !important;
  overflow-y: auto !important;
}

/* 5. Floating Customer Service Blue FAB: compact & unobtrusive bottom-right */
.online-service {
  bottom: 20px !important;
  right: 16px !important;
  z-index: 1900 !important;
}
.online-service .float-btn {
  width: 44px !important;
  height: 44px !important;
  font-size: 20px !important;
}
.online-service .chat-panel {
  bottom: 56px !important;
}

/* 6. U-contract & Trade Table Header: prevent mid-word breaks */
.order_details_box .el-table th .cell,
.order_list .el-table th .cell {
  word-break: normal !important;
  white-space: nowrap !important;
}

/* 7. Fee Schedule (/rate/index) Dark Mode Title Contrast */
.theme-night .rate-main__title {
  color: #e6ecf5 !important;
}

/* 8. Deposit Page (/#/assets/index?key=recharge) Confirm Recharge Button & Card Overflow Fix */
.recharge_form_box {
  width: 100% !important;
  max-width: 1200px !important;
  box-sizing: border-box !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
.recharge_form_box .recharge_inner {
  width: 100% !important;
  max-width: 750px !important;
  box-sizing: border-box !important;
}
.recharge_form_box .recharge_inner .el-form .confirm_btn {
  width: 100% !important;
  margin-top: 28px !important;
}
.recharge_form_box .recharge_inner .el-form .confirm_btn > div {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
}
.recharge_record_main {
  width: 100% !important;
  max-width: 1200px !important;
  box-sizing: border-box !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* 9. Second Contract Countdown Modal & Dark-Mode Dialog Text Contrast */
.theme-night .el-dialog {
  background: #161d2b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
}
.theme-night .el-dialog__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.theme-night .el-dialog__title {
  color: #f0f5fc !important;
  font-weight: 700 !important;
}
.theme-night .el-dialog__headerbtn .el-dialog__close {
  color: #9bb4cc !important;
}
.theme-night .el-dialog__body,
.theme-night .el-dialog__body p,
.theme-night .el-dialog__body span,
.theme-night .el-dialog__body .time p,
.theme-night .el-dialog__body .buyPrice p {
  color: #e6ecf5 !important;
}
.theme-night .el-dialog__body .rise {
  color: #00d27a !important;
  font-weight: 700 !important;
}
.theme-night .el-dialog__body .fall {
  color: #ff5b5c !important;
  font-weight: 700 !important;
}
.theme-night .el-dialog__footer .el-button--default {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #e6ecf5 !important;
}
