/* ThreeQ Glass Space Dock (unified bottom navigation)
   Used across all main & sub pages (except splash). */

:root{
  --dock-bg: var(--glass, rgba(255,255,255,.10));
  --dock-stroke: var(--stroke, rgba(255,255,255,.16));
  --dock-text: var(--text, #eaf1ff);
  --dock-text-dim: rgba(234,241,255,.78);
  --dock-hover-bg: rgba(255,255,255,.12);
  --dock-hover-text: #0b1430;
  --dock-active-bg: rgba(255,255,255,.28);
  --dock-active-stroke: rgba(255,255,255,.26);
}

/* Prevent content being hidden behind the dock */
body{ padding-bottom: 120px; }

/* The dock itself */
.threeq-dock{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(430px, calc(100% - 28px));
  background: var(--dock-bg);
  border: 1px solid var(--dock-stroke);
  border-radius: 22px;
  padding: 12px 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999;
}

.threeq-dock .dock-item{
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--dock-text);
  font-size: 12px;
  border-radius: 16px;
  padding: 10px 6px;
  transition: .15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.threeq-dock .dock-icon{
  font-size: 22px;
  line-height: 1;
  opacity: .95;
}

.threeq-dock .dock-label{
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--dock-text-dim);
}

.threeq-dock .dock-item:hover{
  background: var(--dock-hover-bg);
  color: var(--dock-hover-text);
}

.threeq-dock .dock-item:hover .dock-label{
  color: var(--dock-hover-text);
}

/* Active / selected tab */
.threeq-dock .dock-item.active{
  background: var(--dock-active-bg);
  border: 1px solid var(--dock-active-stroke);
}

.threeq-dock .dock-item.active .dock-label{
  color: var(--dock-text);
}

/* SVG icons support */
.threeq-dock .dock-icon{
  width: 22px;
  height: 22px;
  display: block;
}

/* Stronger hover contrast (some browsers apply different highlight colors) */
.threeq-dock .dock-item:hover{
  color: #0b1430;
}

.threeq-dock .dock-icon-wrap{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
}
.threeq-dock .dock-item:hover .dock-icon-wrap{
  background: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.92);
}


/* ===== ThreeQ Patch v56: Fix dock hover sticking + keep cosmic contrast ===== */
.threeq-dock .dock-item:hover{
  background: rgba(255,255,255,.12) !important;
  color: var(--dock-text) !important;
}
.threeq-dock .dock-item:hover .dock-label{
  color: var(--dock-text) !important;
}
.threeq-dock .dock-item:focus,
.threeq-dock .dock-item:focus-within{
  /* prevent stuck light background after click (desktop focus) */
  background: transparent !important;
  color: var(--dock-text) !important;
  outline: none !important;
}
.threeq-dock .dock-item:focus-visible{
  outline: 2px solid rgba(255,255,255,.22) !important;
  outline-offset: 2px;
}
/* keep active state glassy but not 'white' */
.threeq-dock .dock-item.active{
  background: rgba(255,255,255,.22) !important;
}


/* ===== ThreeQ Patch v57: Safari/Chrome hover behavior + black icon on hover (no 'stuck white') ===== */
/* Keep hover highlight but ensure icon/text turn black for contrast */
.threeq-dock .dock-item:hover .dock-icon,
.threeq-dock .dock-item:hover .dock-label{
  color: rgba(10,16,28,.92) !important;
}
/* Make hover icon tile light, but do NOT keep this look for active tabs */
.threeq-dock .dock-item:hover .dock-icon-wrap{
  background: rgba(255,255,255,0.90) !important;
  border-color: rgba(255,255,255,0.92) !important;
}
/* Active tab should stay glassy (prevents 'hover stuck' feeling after click) */
.threeq-dock .dock-item.active .dock-icon-wrap{
  background: rgba(255,255,255,0.14) !important;
  border-color: rgba(255,255,255,0.26) !important;
}
/* Active colors remain bright (not black) */
.threeq-dock .dock-item.active .dock-icon,
.threeq-dock .dock-item.active .dock-label{
  color: var(--dock-text) !important;
}


/* ===== ThreeQ v58 Dock Patch: fix hover readability + avoid sticky focus ===== */
@media (hover:hover) and (pointer:fine){
  .tabbar.cosmic .tab:hover{
    background: rgba(255,255,255,.85) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.25) !important;
  }
  .tabbar.cosmic .tab:hover .tabLabel{
    color: rgba(10,16,28,.95) !important;
  }
  /* SVG icons inside .tabIcon */
  .tabbar.cosmic .tab:hover .tabIcon svg,
  .tabbar.cosmic .tab:hover .tabIcon svg path,
  .tabbar.cosmic .tab:hover .tabIcon svg rect,
  .tabbar.cosmic .tab:hover .tabIcon svg circle{
    stroke: rgba(10,16,28,.95) !important;
    fill: none !important;
  }
  /* If some icons are images, darken them */
  .tabbar.cosmic .tab:hover .tabIcon img{
    filter: brightness(0) saturate(100%) !important;
  }
}
/* Do NOT make active tab pure white; keep glassy */
.tabbar.cosmic .tab.active{
  background: rgba(255,255,255,.12) !important;
}
.tabbar.cosmic .tab:focus,
.tabbar.cosmic .tab:focus-visible,
.tabbar.cosmic .tab:focus-within{
  background: inherit !important;
  outline: none !important;
}

