/* Hide original toolbar visually but keep logic alive */
@media (max-width: 768px) {
  .wd-toolbar {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Floating container */
#gstore-floating-toolbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  height: 62px;

  padding: 6px 8px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);

  display: flex;
  justify-content: space-between;
  align-items: center;

  z-index: 100000;

  box-shadow: 0 12px 32px rgba(0,0,0,0.15);

  transition:
    transform .25s ease,
    opacity .2s ease;
}

@media (min-width: 769px) {
  #gstore-floating-toolbar {
    display: none;
  }
}

/* Buttons */
.gstore-toolbar-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  user-select: none;

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.gstore-toolbar-btn:active {
  transform: scale(.96);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Icons */
.gstore-toolbar-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.gstore-toolbar-btn.is-chat img {
  transform: scale(1.12);
}

.gstore-toolbar-btn.is-cart .gstore-cart-badge {
  position: absolute;
  top: 3px;
  right: 17px;
  height: 18px;
  color: #156cd9;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  opacity: 0;
  transform: scale(.8);
  transition: transform .2s ease, opacity .2s ease;
  pointer-events: none;
}

.gstore-toolbar-btn.is-cart.has-count .gstore-cart-badge {
  opacity: 1;
  transform: scale(1);
}

.gstore-toolbar-btn.is-cart .gstore-cart-toast {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 6px) scale(.96);
  padding: 4px 8px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.gstore-toolbar-btn.is-cart.is-toast .gstore-cart-toast {
  animation: gstore-cart-toast 1.1s ease;
}

.gstore-toolbar-btn.is-cart.is-bump .gstore-cart-badge {
  animation: gstore-cart-bump .35s ease;
}

@keyframes gstore-cart-toast {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.95); }
  20% { opacity: 1; transform: translate(-50%, -2px) scale(1); }
  70% { opacity: 1; transform: translate(-50%, -2px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(.98); }
}

@keyframes gstore-cart-bump {
  0% { transform: scale(.8); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Hide on scroll down */
#gstore-floating-toolbar.is-hidden {
  transform: translateY(120%);
}
