/* OnlyShorts 演示站 · 五栏底栏
 *
 * 五个一级页面（index / foryou / create / chat / me）和 auxiliary 共用同一条底栏：
 * 同一份 HTML（<nav class="bottom-nav os-tabbar">），同一份样式（本文件，放在各页样式之后加载）。
 * 尺寸、颜色取自原型 Home 在 v0.6 下的实测底栏（mobile-viewport.css）。
 * 选中态按 PRD「底栏选中态」：当前栏目上方玫粉短线；For You 选中时播放三角变亮红；
 * Chat 选中时气泡里的爱心变亮粉；切走后内芯恢复线框；Create 保留蓝色加号。
 * 选择器统一以 nav.bottom-nav.os-tabbar 开头，用来压过各页原有的 nav / .bottom-nav 规则。
 */
nav.bottom-nav.os-tabbar {
  box-sizing: border-box;
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  width: 100%;
  height: auto;
  min-height: 60px;
  margin: 0;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-top: 1px solid #dce9ec;
  border-radius: 0;
  background: #fcffff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

nav.bottom-nav.os-tabbar[hidden] {
  display: none;
}

nav.bottom-nav.os-tabbar a {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #506771;
  font-size: clamp(10px, 2.6cqw, 11px);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

nav.bottom-nav.os-tabbar a::before {
  content: none;
}

nav.bottom-nav.os-tabbar a[aria-current="page"] {
  align-self: stretch;
  color: #172a33;
  font-weight: 750;
}

nav.bottom-nav.os-tabbar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 25px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: #d83995;
}

nav.bottom-nav.os-tabbar a:focus-visible {
  outline: 2px solid #087da6;
  outline-offset: -4px;
}

nav.bottom-nav.os-tabbar .tab-icon {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}

nav.bottom-nav.os-tabbar .tab-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav.bottom-nav.os-tabbar a[aria-current="page"] .tab-icon svg {
  stroke-width: 2.35;
}

/* Create：始终是蓝底白色加号，选中与否只看上方短线和文字。 */
nav.bottom-nav.os-tabbar .tab-icon.create-icon {
  width: 29px;
  padding: 2px 5px;
  border-radius: 7px;
  background: #087da6;
  color: #fff;
}

nav.bottom-nav.os-tabbar .tab-icon.create-icon svg,
nav.bottom-nav.os-tabbar a[aria-current="page"] .tab-icon.create-icon svg {
  stroke-width: 1.8;
}

/* 未选中时内芯为线框；选中后 For You 三角亮红、Chat 爱心亮粉（取原型各自页面的选中色）。 */
nav.bottom-nav.os-tabbar .nav-play-mark,
nav.bottom-nav.os-tabbar .nav-heart-mark {
  fill: none;
  stroke: currentColor;
}

nav.bottom-nav.os-tabbar a[aria-current="page"] .nav-play-mark {
  fill: #fa2a48;
  stroke: #fa2a48;
}

nav.bottom-nav.os-tabbar a[aria-current="page"] .nav-heart-mark {
  fill: #ef187b;
  stroke: #ef187b;
}

@container (max-height: 610px) {
  nav.bottom-nav.os-tabbar {
    min-height: 52px;
    padding-top: 3px;
    padding-bottom: calc(3px + env(safe-area-inset-bottom, 0px));
  }
  nav.bottom-nav.os-tabbar a { min-height: 44px; }
  nav.bottom-nav.os-tabbar a[aria-current="page"]::before { top: -3px; }
}
