/* 号码标记清除中心 - 自定义样式 */
:root {
  --b-touch-min: 44px; /* 移动端触控最小高度 */
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

.card {
  border-radius: 0.5rem;
}

.card-header {
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

a {
  text-decoration: none;
}

/* 导航栏图标间距 */
.navbar .nav-link i,
.navbar .btn i {
  margin-right: 2px;
}

/* ==========================================================================
   顶部导航：管理员菜单项较多时也保持单行、整齐（避免品牌名与菜单折成两行）
   ========================================================================== */
@media (min-width: 992px) {
  .navbar { flex-wrap: nowrap; }
  .navbar .navbar-brand { white-space: nowrap; }
  .navbar .navbar-collapse { flex-wrap: nowrap; }
  .navbar-expand-lg .navbar-nav .nav-link {
    padding-left: .5rem;
    padding-right: .5rem;
    white-space: nowrap;
  }
  .navbar .navbar-text { white-space: nowrap; }
  /* 右侧账户区与菜单之间留出适当间距，整体更紧凑整齐 */
  .navbar .d-flex.align-items-center { gap: .25rem; }
}

/* 表单控件聚焦 */
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* 订单平台勾选列表 hover */
.list-group-item:hover {
  background-color: #f8f9fa;
}

/* footer 置底 */
footer {
  background: #fff;
}

/* ==========================================================================
   移动端优化
   ========================================================================== */

/* 主要操作按钮、输入框在窄屏上保证足够触控面积 */
@media (max-width: 767.98px) {
  .btn {
    min-height: var(--b-touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* 表单输入同样加大触控高度 */
  .form-control,
  .form-select,
  .input-group-text {
    min-height: var(--b-touch-min);
  }
  .input-group-lg .form-control,
  .input-group-lg .btn,
  .input-group-lg .input-group-text {
    min-height: 3rem; /* 48px */
    font-size: 1.0625rem;
  }
  /* 主按钮保持可点、不因内联 flex 缩小 */
  .btn-primary,
  .btn-success,
  .btn-outline-primary,
  .btn-outline-success {
    width: 100%;
  }
  /* 结果页结算按钮 */
  .w-100.btn-primary,
  .w-100.btn-success {
    width: 100% !important;
  }
}

/* 桌面端下不想让结算/支付按钮变成满宽 */
@media (min-width: 768px) {
  .w-auto { width: auto !important; }
  .w-md-auto { width: auto !important; }
}

/* 表格在窄屏下横向滚动，避免撑破页面 */
@media (max-width: 767.98px) {
  .card .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .card .table thead,
  .card .table tbody,
  .card .table tr,
  .card .table th,
  .card .table td {
    vertical-align: middle;
  }
}

/* 勾选框加大（结果页平台列表、移动端更好点选） */
.form-check-lg .form-check-input {
  width: 1.35em;
  height: 1.35em;
  margin-top: 0.2em;
}
.form-check-lg {
  padding-left: 2.1em;
  min-height: 1.7em;
}
.platform-check.form-check-input:checked {
  background-color: var(--bs-primary, #0d6efd);
  border-color: var(--bs-primary, #0d6efd);
}

/* 结果页平台行：标记名突出 */
.mark-name {
  font-size: 1.05rem;
  color: #dc3545;
}
.platform-row {
  padding: 0.8rem 1rem;
}
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }

/* ==========================================================================
   顶部全局进度条（类似 YouTube/Twitter）
   ========================================================================== */
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1080;
  background: rgba(13, 110, 253, 0.15);
  overflow: hidden;
}
.top-progress-bar {
  position: absolute;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #0d6efd, #0dcaf0);
  border-radius: 3px;
  animation: top-progress-slide 1.1s ease-in-out infinite;
}
@keyframes top-progress-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* 查询进度条（按钮下方卡片内） */
.query-progress {
  border: 1px solid #e7edf7;
  background: #f6f9ff;
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem 0.9rem;
}
.query-progress-body {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #385474;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.query-progress-bar {
  height: 8px;
  border-radius: 4px;
}

/* ==========================================================================
   回到顶部按钮
   ========================================================================== */
.btn-back-top {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(33, 37, 41, 0.82);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 1040;
  cursor: pointer;
}
.btn-back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.btn-back-top:active {
  background: #000;
}
@media (min-width: 768px) {
  .btn-back-top { right: 28px; bottom: 28px; }
}

/* 短信验证输入（移动端键盘友好、够大） */
.sms-code-input {
  min-width: 0;
  font-size: 1rem !important;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   查询框（移动端优先：输入框大、按钮协调、触控舒适）
   ========================================================================== */
.query-box {
  width: 100%;
}

/* 输入框行：图标 + 输入框，输入框撑满、字体够大 */
.query-input-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.query-input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-height: 52px;
  background: #fff;
  border: 1px solid #ced4da;
  border-right: none;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  color: #6c757d;
  font-size: 1.25rem;
  border-radius: 0.5rem 0 0 0.5rem;
  flex-shrink: 0;
}
.query-input {
  height: 52px;
  font-size: 1.1rem !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  border-left-width: 0;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  padding-left: 0.9rem;
}

/* 查询按钮：全宽、高度与输入框一致、触控友好 */
.query-btn {
  width: 100%;
  height: 52px;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 0.625rem;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

/* 电脑/平板（>=576px）：按钮与输入框并排，不再全宽堆叠 */
@media (min-width: 576px) {
  .query-box {
    display: flex;
    align-items: stretch;
  }
  .query-input-row {
    flex: 1;
  }
  .query-input {
    border-radius: 0 0.5rem 0.5rem 0 !important;
  }
  .query-btn {
    width: 170px;
    height: 52px;
    margin-top: 0;
    margin-left: 10px;
    border-radius: 0.625rem;
    flex-shrink: 0;
  }
}
