/*
#	Project: fileearner - Engineering with logic, software with soul.
#
#	This is NOT a freeware, use is subject to license terms.
#
#	Website: https://fileearner.com
#
#	Author: Along ( fileearner@outlook.com)
#
#	$Id$
#
#	Copyright (C) 2008-2083 fileearner Team. All Rights Reserved.
*/

/* H5 bottom tab bar (app-style), shown below max-width breakpoint only. */
:root {
  --fe-h5-tabbar-h: 3.25rem;
  --fe-h5-tabbar-z: 9400;
  --fe-h5-tabbar-bg: rgba(255, 255, 255, 0.96);
  --fe-h5-tabbar-border: rgba(15, 23, 42, 0.1);
  --fe-h5-tabbar-muted: #64748b;
  --fe-h5-tabbar-active: #2563eb;
}

/* Public H5: light tab bar (white) for consistent mobile chrome; active item uses theme blue */
.fe-h5-bottom-tabbar--public {
  --fe-h5-tabbar-bg: rgba(255, 255, 255, 0.98);
  --fe-h5-tabbar-border: rgba(15, 23, 42, 0.1);
  --fe-h5-tabbar-muted: color-mix(in srgb, var(--fe-accent, #3b82f6) 72%, #334155);
  --fe-h5-tabbar-active: var(--fe-accent, #3b82f6);
}

/* User center */
.fe-h5-bottom-tabbar--panel {
  --fe-h5-tabbar-bg: rgba(255, 255, 255, 0.98);
  --fe-h5-tabbar-border: rgba(15, 23, 42, 0.1);
  --fe-h5-tabbar-muted: color-mix(in srgb, var(--fe-accent, #3b82f6) 72%, #334155);
  --fe-h5-tabbar-active: var(--fe-accent, #3b82f6);
}

/* Admin: dark bar to align with top chrome */
.fe-h5-bottom-tabbar--admin {
  --fe-h5-tabbar-bg: #0f172a;
  --fe-h5-tabbar-border: rgba(255, 255, 255, 0.08);
  --fe-h5-tabbar-muted: #94a3b8;
  --fe-h5-tabbar-active: #60a5fa;
}

.fe-h5-bottom-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--fe-h5-tabbar-z);
  min-height: var(--fe-h5-tabbar-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: var(--fe-h5-tabbar-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--fe-h5-tabbar-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* H5: hide when user scrolls down; show on scroll up (class toggled from h5-bottom-tabbar.js) */
.fe-h5-bottom-tabbar.fe-h5-tabbar--offscreen {
  transform: translate3d(0, calc(100% + 16px), 0);
  pointer-events: none;
}

.fe-h5-bottom-tabbar__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  max-width: 32rem;
  margin: 0 auto;
  min-height: var(--fe-h5-tabbar-h);
  padding: 0 0.15rem;
}

.fe-h5-bottom-tabbar a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.3rem 0.2rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  text-align: center;
  color: var(--fe-h5-tabbar-muted);
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.fe-h5-bottom-tabbar a i {
  font-size: 1.32rem;
  line-height: 1;
  opacity: 0.9;
}

.fe-h5-bottom-tabbar a[aria-current="page"],
.fe-h5-bottom-tabbar a.is-active {
  color: var(--fe-h5-tabbar-active);
  font-weight: 700;
}

.fe-h5-bottom-tabbar a[aria-current="page"] i,
.fe-h5-bottom-tabbar a.is-active i {
  opacity: 1;
  transform: translateY(-1px);
}

.fe-h5-bottom-tabbar a:focus-visible {
  outline: 2px solid var(--fe-h5-tabbar-active);
  outline-offset: -2px;
  border-radius: 0.4rem;
}

/* Reserve space: class toggled from h5-bottom-tabbar.js on narrow viewports */
@media (max-width: 900.98px) {
  .fe-h5-bottom-tabbar {
    display: block;
  }

  body.fe-h5-tabbar-pad {
    padding-bottom: calc(var(--fe-h5-tabbar-h) + env(safe-area-inset-bottom, 0px) + 2px);
  }

  /* “返回顶部”让出底栏 */
  body.fe-h5-tabbar-pad .fe-back-to-top {
    bottom: calc(var(--fe-h5-tabbar-h) + env(safe-area-inset-bottom, 0px) + 0.5rem);
  }

  /* Tab bar auto-hidden: same bottom offset as without tab bar (back-to-top.js / default) */
  body:not(.fe-h5-tabbar-pad) .fe-back-to-top {
    bottom: 1.25rem;
  }
}

@media (min-width: 901px) {
  .fe-h5-bottom-tabbar {
    display: none !important;
  }
  body.fe-h5-tabbar-pad {
    padding-bottom: 0;
  }
}
