html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* 全局变量：统一控制导航高度与内容顶部留白 */
:root {
  --navbar-height: 56px;    /* 与 Bootstrap 默认固定导航栏高度一致 */
  --content-gap: 12px;      /* 导航下方与页面内容的额外留白 */
}

body {
  margin-bottom: 60px;
  padding-top: 0;
}

/* 导航栏固定样式 */
.navbar.fixed-top {
  z-index: 1030;
}

/* 确保内容不被导航栏遮挡（同时兼容 container 与 container-fluid） */
body > .container,
body > .container-fluid {
  /* 导航高度 + 视觉留白；不会影响 sticky 表头的对齐（其 top 仅为导航高度） */
  padding-top: calc(var(--navbar-height) + var(--content-gap));
}

/* 即将分红表格容器 */
#upcomingDividendsTable {
  position: relative;
}

/* 修正 Bootstrap .table-responsive 对纵向 sticky 的影响 */
.table-responsive {
  overflow: visible; /* 允许纵向粘性定位正常工作；避免 sticky 被 overflow 裁剪 */
}

/* 表头吸顶效果：将 sticky 应用于 th，避免整块 thead 的兼容性问题 */
.sticky-header th {
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: var(--navbar-height); /* 仅与导航高度对齐，避免与内容额外留白产生缝隙 */
  background-color: #180574;
  color: #fff;
  z-index: 1025; /* 高于页面内容，低于导航（1030） */
}

/* 提升表体层级，避免表头与数据层叠错位 */
.table-responsive tbody td,
.table-responsive tbody th {
  position: relative;
  z-index: 1;
  background-color: #fff;
}

/* 热门搜索标签悬停效果 */
.hover-primary:hover {
  background-color: #180574 !important;
  color: white !important;
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* 股票名称链接样式 */
.stock-name-link {
  color: #180574;
  text-decoration: none;
}

.stock-name-link:hover {
  color: #2d19a0;
  text-decoration: underline;
}

/* 股票详情页 - 带贯穿竖线的信息区域 */
.info-section-with-divider {
  position: relative;
}

/* 贯穿整个区域的竖线，位于左右两列之间 */
.info-section-with-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #dee2e6;
  transform: translateX(-50%);
}

/* 左列添加右侧内边距，为竖线留出空间 */
.info-section-with-divider .info-left-column {
  padding-right: 18px; /* 12px 原有间距 + 6px 额外留白 */
}

/* 右列添加左侧内边距，为竖线留出空间 */
.info-section-with-divider .info-right-column {
  padding-left: 18px; /* 12px 原有间距 + 6px 额外留白 */
}
