/* BLUEBERRY UNIVERSAL SHELL v1.2 */

:root {
  --bb-shell-height: 46px;
  --bb-shell-blue: #087BFF;
  --bb-shell-deep: #0057D9;
  --bb-shell-sky: #69B5FF;
}

#bb-shell-root,
#bb-shell-root * {
  box-sizing: border-box;
}

#bb-shell-root {
  --bb-bg: rgba(255,255,255,.88);
  --bb-panel: rgba(255,255,255,.96);
  --bb-text: #071426;
  --bb-muted: #6b7c90;
  --bb-line: rgba(7,20,38,.09);
  --bb-shadow: 0 28px 80px rgba(0,42,100,.18), 0 4px 20px rgba(0,0,0,.05);

  position: relative;
  z-index: 2147483000;
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",system-ui,sans-serif;
}

@media (prefers-color-scheme: dark) {
  #bb-shell-root {
    --bb-bg: rgba(7,20,38,.88);
    --bb-panel: rgba(8,23,43,.97);
    --bb-text: #f8fbff;
    --bb-muted: #9eb1c5;
    --bb-line: rgba(255,255,255,.09);
    --bb-shadow: 0 30px 82px rgba(0,0,0,.40), 0 5px 20px rgba(0,0,0,.18);
  }
}

#bb-shell-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2147483000;
  height: calc(var(--bb-shell-height) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--bb-line);
  background: color-mix(in srgb,var(--bb-bg) 86%,transparent);
  backdrop-filter: blur(28px) saturate(160%);
}

#bb-shell-home {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bb-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -.025em;
}

#bb-shell-mark {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: linear-gradient(145deg,var(--bb-shell-sky),var(--bb-shell-blue));
  box-shadow: 0 0 0 4px rgba(8,123,255,.08);
}

#bb-shell-product {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bb-muted);
  font-size: 13px;
}

#bb-shell-spacer {
  flex: 1;
}

#bb-shell-account {
  max-width: min(42vw,260px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bb-muted);
  text-decoration: none;
  font-size: 12px;
  overflow: hidden;
}

#bb-shell-account-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bb-shell-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb,var(--bb-shell-blue) 10%,transparent);
  border: 1px solid var(--bb-line);
  color: var(--bb-shell-blue);
  font-size: 10px;
  font-weight: 800;
}

#bb-shell-reserve {
  height: calc(var(--bb-shell-height) + env(safe-area-inset-top));
}

#bb-shell-float {
  position: fixed;
  right: max(18px,env(safe-area-inset-right));
  bottom: max(18px,env(safe-area-inset-bottom));
  z-index: 2147483001;
}

#bb-shell-button {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,var(--bb-shell-blue),var(--bb-shell-deep));
  color: white;
  box-shadow: 0 16px 42px rgba(8,123,255,.30);
  cursor: pointer;
  font: inherit;
  font-size: 21px;
  transition: transform .18s ease, box-shadow .18s ease;
}

#bb-shell-button:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 21px 50px rgba(8,123,255,.36);
}

#bb-shell-button[aria-expanded="true"] {
  transform: rotate(45deg);
}

#bb-shell-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(370px,calc(100vw - 28px));
  max-height: min(720px,calc(100vh - var(--bb-shell-height) - 74px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border: 1px solid var(--bb-line);
  border-radius: 22px;
  color: var(--bb-text);
  background: var(--bb-panel);
  backdrop-filter: blur(32px) saturate(165%);
  box-shadow: var(--bb-shadow);
  transform-origin: bottom right;
  animation: bbShellPanelIn .16s ease-out;
}

#bb-shell-panel[hidden] {
  display: none !important;
}

@keyframes bbShellPanelIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.bb-shell-panel-head {
  padding: 10px 10px 8px;
}

.bb-shell-panel-head strong {
  display: block;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -.02em;
}

.bb-shell-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--bb-muted);
  font-size: 12px;
}

#bb-shell-search {
  width: 100%;
  height: 40px;
  margin: 4px 0 8px;
  padding: 0 11px;
  border: 1px solid var(--bb-line);
  border-radius: 11px;
  outline: none;
  background: color-mix(in srgb,var(--bb-panel) 88%,transparent);
  color: var(--bb-text);
  font: inherit;
  font-size: 13px;
}

#bb-shell-search:focus {
  border-color: color-mix(in srgb,var(--bb-shell-blue) 58%,var(--bb-line));
  box-shadow: 0 0 0 3px rgba(8,123,255,.10);
}

.bb-shell-group-title {
  padding: 8px 10px 5px;
  color: var(--bb-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.bb-shell-link {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--bb-text);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background .14s ease, transform .14s ease;
}

.bb-shell-link:hover,
.bb-shell-link[aria-current="page"] {
  background: color-mix(in srgb,var(--bb-text) 6%,transparent);
}

.bb-shell-link:hover {
  transform: translateX(2px);
}

.bb-shell-link[aria-current="page"] {
  outline: 1px solid color-mix(in srgb,var(--bb-shell-blue) 24%,transparent);
}

.bb-shell-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bb-shell-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bb-line);
  border-radius: 9px;
  background: color-mix(in srgb,var(--bb-shell-blue) 8%,transparent);
  color: var(--bb-shell-blue);
  font-size: 11px;
  font-weight: 800;
}

.bb-shell-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 620;
}

.bb-shell-link small {
  color: var(--bb-muted);
  font-size: 11px;
}

.bb-shell-divider {
  height: 1px;
  margin: 7px 4px;
  background: var(--bb-line);
}

.bb-shell-hidden {
  display: none !important;
}

@media (max-width: 560px) {
  #bb-shell-product {
    display: none;
  }

  #bb-shell-account-label {
    max-width: 120px;
  }

  #bb-shell-float {
    right: 14px;
    bottom: max(14px,env(safe-area-inset-bottom));
  }

  #bb-shell-panel {
    width: min(370px,calc(100vw - 20px));
    max-height: calc(100vh - var(--bb-shell-height) - 70px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #bb-shell-root *,
  #bb-shell-root *::before,
  #bb-shell-root *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
