/**
 * Glow Beauty shared topbar — soft glass chrome with store logo
 * Scope: body.gb-chrome
 */

body.gb-chrome {
  --gb-tb-ink: #4a3933;
  --gb-tb-muted: #8a7570;
  --gb-tb-line: rgba(192, 132, 151, 0.18);
  --gb-tb-blush: #fff5f7;
  --gb-tb-rose: #c08497;
  --gb-tb-nav-h: 58px;
  --gb-tb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--gb-tb-nav-h) + 18px) !important;
}

body.gb-chrome .gb-topbar {
  position: fixed;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 1100;
  height: var(--gb-tb-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.75rem 0 0.55rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--gb-tb-line);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 10px 32px rgba(74, 57, 51, 0.08);
}

@media (min-width: 720px) {
  body.gb-chrome .gb-topbar {
    left: max(16px, calc(50% - 560px));
    right: max(16px, calc(50% - 560px));
    padding: 0 1rem 0 0.75rem;
  }
}

body.gb-chrome .gb-topbar-back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gb-tb-ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.72;
  padding: 0.4rem;
}

body.gb-chrome .gb-topbar-back-txt { display: none; }
@media (min-width: 720px) {
  body.gb-chrome .gb-topbar-back-txt { display: inline; }
}

body.gb-chrome .gb-topbar-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
}

body.gb-chrome .gb-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

body.gb-chrome .gb-topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gb-tb-blush);
  border: 1px solid var(--gb-tb-line);
}

body.gb-chrome .gb-topbar-logo--ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--gb-tb-rose);
}

body.gb-chrome .gb-topbar-name {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gb-tb-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

@media (min-width: 720px) {
  body.gb-chrome .gb-topbar-name { max-width: 280px; }
}

body.gb-chrome .gb-topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

body.gb-chrome .gb-topbar-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gb-tb-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s var(--gb-tb-ease), transform 0.15s var(--gb-tb-ease);
}

body.gb-chrome .gb-topbar-icon:hover {
  background: var(--gb-tb-blush);
}

body.gb-chrome .gb-topbar-icon:active {
  transform: scale(0.94);
}

body.gb-chrome .gb-topbar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gb-tb-rose);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.gb-chrome .gb-topbar-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
  visibility: hidden;
}

body.gb-chrome .gb-topbar-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

body.gb-chrome .gb-topbar-drawer__back {
  position: absolute;
  inset: 0;
  background: rgba(74, 57, 51, 0.28);
  opacity: 0;
  transition: opacity 0.28s var(--gb-tb-ease);
}

body.gb-chrome .gb-topbar-drawer.is-open .gb-topbar-drawer__back {
  opacity: 1;
}

body.gb-chrome .gb-topbar-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #fff;
  padding: 1.15rem 1rem 1.5rem;
  box-shadow: -12px 0 40px rgba(74, 57, 51, 0.12);
  transform: translateX(104%);
  transition: transform 0.32s var(--gb-tb-ease);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.gb-chrome .gb-topbar-drawer.is-open .gb-topbar-drawer__panel {
  transform: none;
}

body.gb-chrome .gb-topbar-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

body.gb-chrome .gb-topbar-drawer__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--gb-tb-blush);
  cursor: pointer;
}

body.gb-chrome .gb-topbar-drawer__panel > a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.75rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--gb-tb-ink);
  font-weight: 650;
  font-size: 0.92rem;
}

body.gb-chrome .gb-topbar-drawer__panel > a:hover {
  background: var(--gb-tb-blush);
}

body.gb-chrome .gb-topbar-drawer__panel > a i {
  width: 1.1rem;
  color: var(--gb-tb-rose);
  text-align: center;
}
