/* GBG "Bestie" AI stylist — FAB + chat panel */
:root {
  --gbg-pink: #ff2d8b;
  --gbg-pink-soft: #ff7ab8;
  --gbg-gold: #e7c873;
  --gbg-ink: #0c0c0e;
}

/* Floating action button */
.gbg-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px 13px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, #15151a, #2a0f1f 55%, var(--gbg-pink));
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 45, 139, .35), 0 2px 8px rgba(0, 0, 0, .4);
  transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}
.gbg-fab:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px rgba(255, 45, 139, .5); }
.gbg-fab.hidden { opacity: 0; pointer-events: none; transform: scale(.8); }
.gbg-fab-spark {
  font-size: 18px;
  color: var(--gbg-gold);
  animation: gbg-spark 2.4s ease-in-out infinite;
}
@keyframes gbg-spark { 0%,100% { transform: rotate(0) scale(1); opacity: 1; } 50% { transform: rotate(20deg) scale(1.2); opacity: .8; } }

/* Proactive teaser bubble */
.gbg-teaser {
  position: fixed;
  right: 22px;
  bottom: 84px;
  z-index: 99997;
  max-width: 270px;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 13px 32px 13px 14px;
  background: #fff;
  color: #15151a;
  font-size: 14px; font-weight: 600; line-height: 1.35;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,.32), 0 0 0 1px rgba(255,45,139,.18);
  cursor: pointer;
  opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.9,.3,1.2);
}
.gbg-teaser.show { opacity: 1; transform: translateY(0) scale(1); }
.gbg-teaser:hover { box-shadow: 0 18px 44px rgba(0,0,0,.4), 0 0 0 1px rgba(255,45,139,.4); }
.gbg-teaser-spark { color: var(--gbg-pink); font-size: 15px; line-height: 1.4; }
.gbg-teaser-x {
  position: absolute; top: 5px; right: 7px;
  border: none; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: #b3b3bb; padding: 2px 4px;
}
.gbg-teaser-x:hover { color: #15151a; }

/* Toasts */
.gbg-toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 14px);
  z-index: 100000;
  background: #15151a; color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid rgba(255,45,139,.4);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.gbg-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Chat panel */
.gbg-bestie {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  width: 384px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  background: #121215;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(24px) scale(.96);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2, .9, .3, 1.2);
}
.gbg-bestie.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.gbg-bestie-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(120deg, #1b0c16, #2a0f1f 60%, var(--gbg-pink));
  color: #fff;
}
.gbg-bestie-id { display: flex; align-items: center; gap: 11px; }
.gbg-bestie-ava {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gbg-gold), var(--gbg-pink));
  color: #1b0c16; font-size: 18px; font-weight: 900;
}
.gbg-bestie-name { display: block; font-weight: 900; font-size: 16px; letter-spacing: .02em; }
.gbg-bestie-sub { display: block; font-size: 11px; opacity: .8; }
.gbg-bestie-close {
  background: rgba(255, 255, 255, .12);
  border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.gbg-bestie-close:hover { background: rgba(255, 255, 255, .25); }

.gbg-bestie-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(800px 200px at 100% 0, rgba(255, 45, 139, .10), transparent 60%),
    #121215;
}
.gbg-bestie-log::-webkit-scrollbar { width: 7px; }
.gbg-bestie-log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 4px; }

.gbg-msg { display: flex; }
.gbg-msg-user { justify-content: flex-end; }
.gbg-bub {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.45;
  color: #f3f3f5;
}
.gbg-msg-assistant .gbg-bub {
  background: #1f1f25;
  border: 1px solid rgba(255, 255, 255, .06);
  border-bottom-left-radius: 5px;
}
.gbg-msg-user .gbg-bub {
  background: linear-gradient(120deg, var(--gbg-pink), #c01e6b);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.gbg-typing .gbg-bub { display: inline-flex; gap: 4px; padding: 13px 14px; }
.gbg-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gbg-pink-soft);
  animation: gbg-bounce 1.1s infinite ease-in-out;
}
.gbg-typing span:nth-child(2) { animation-delay: .15s; }
.gbg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes gbg-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* Live status line (while Bestie works) */
.gbg-status .gbg-bub { display: inline-flex; align-items: center; gap: 9px; background: #1f1f25; border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 5px; color: #cfcfd6; font-style: normal; }
.gbg-status em { font-style: normal; font-size: 13.5px; }
.gbg-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gbg-pink); box-shadow: 0 0 0 0 rgba(255,45,139,.5); animation: gbg-pulse 1.2s infinite; }
@keyframes gbg-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,45,139,.5); } 70% { box-shadow: 0 0 0 8px rgba(255,45,139,0); } 100% { box-shadow: 0 0 0 0 rgba(255,45,139,0); } }

/* Product cards */
.gbg-cards { display: flex; flex-direction: column; gap: 9px; padding: 2px 0 4px; }

/* Look builder — add the whole look */
.gbg-addall {
  width: 100%;
  border: none; cursor: pointer;
  background: linear-gradient(120deg, var(--gbg-gold), var(--gbg-pink));
  color: #1b0c16; font-family: inherit; font-weight: 900; font-size: 13.5px;
  padding: 11px 14px; border-radius: 12px; letter-spacing: .01em;
  transition: transform .14s ease, filter .14s ease;
}
.gbg-addall:hover { transform: translateY(-1px); filter: brightness(1.05); }
.gbg-addall:disabled { opacity: .85; cursor: default; transform: none; }
.gbg-card {
  display: flex;
  gap: 11px;
  background: #1a1a20;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  padding: 9px;
  transition: border-color .15s ease, transform .15s ease;
}
.gbg-card:hover { border-color: var(--gbg-pink); transform: translateY(-1px); }
.gbg-card-img { flex: 0 0 72px; }
.gbg-card-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.gbg-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gbg-card-name {
  font-weight: 800; font-size: 13.5px; color: #fff; text-decoration: none;
  line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gbg-card-name:hover { color: var(--gbg-pink-soft); }
.gbg-card-price { color: var(--gbg-gold); font-weight: 800; font-size: 13px; }
.gbg-card-actions { display: flex; gap: 7px; margin-top: 3px; }
.gbg-card-add, .gbg-card-view {
  flex: 1; text-align: center; text-decoration: none;
  font-size: 12px; font-weight: 800; padding: 7px 8px; border-radius: 9px;
}
.gbg-card-add { background: var(--gbg-pink); color: #fff; }
.gbg-card-add:hover { background: #ff4f9e; }
.gbg-card-view { background: rgba(255, 255, 255, .08); color: #eee; }
.gbg-card-view:hover { background: rgba(255, 255, 255, .16); }

/* Quick-reply chips */
.gbg-bestie-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.gbg-bestie-chips:empty { display: none; }
.gbg-chip {
  background: rgba(255, 45, 139, .12);
  border: 1px solid rgba(255, 45, 139, .4);
  color: #ffd9ec;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease;
}
.gbg-chip:hover { background: rgba(255, 45, 139, .28); }

/* Composer */
.gbg-bestie-input {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px 14px;
  background: #16161b;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.gbg-bestie-input input {
  flex: 1;
  background: #24242b;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  font-family: inherit; font-size: 14px;
  outline: none;
}
.gbg-bestie-input input::placeholder { color: #8a8a93; }
.gbg-bestie-input input:focus { border-color: var(--gbg-pink); }
.gbg-bestie-input button {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border: none; border-radius: 50%;
  background: linear-gradient(120deg, var(--gbg-pink), #c01e6b);
  color: #fff; font-size: 16px; cursor: pointer;
  transition: transform .12s ease;
}
.gbg-bestie-input button:hover { transform: scale(1.08); }

@media (max-width: 480px) {
  .gbg-bestie { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .gbg-fab { right: 16px; bottom: 16px; }
}
