/* Floating Gusi consult widget — shared by landing and shop (uses gm-asst shell) */
.gm-float-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.gm-float-gusi {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  background: var(--gm-black, #0a0a0a);
  border: 2px solid var(--gm-magenta, #e65297);
  overflow: hidden;
}

.gm-float-gusi:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 24px rgba(230, 82, 151, 0.45);
}

.gm-float-gusi img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  display: block;
}

.gm-float-gusi-panel {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  z-index: 55;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(var(--gm-asst-vh, 100dvh) - 7rem));
  display: flex;
  flex-direction: column;
}

.gm-float-gusi-panel[hidden] {
  display: none !important;
}

.gm-float-gusi-panel-card {
  background: var(--gm-dark, #111);
  border: 1px solid rgba(230, 82, 151, 0.35);
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  max-height: inherit;
}

.gm-float-gusi-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #000 0%, #e65297 100%);
}

.gm-float-gusi-panel-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.gm-float-gusi-panel-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}

.gm-float-gusi-panel-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
  opacity: 0.9;
}

.gm-float-gusi-panel-close:hover {
  opacity: 1;
}

.gm-float-gusi-quote-hint {
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--gm-gray-light, #d0d0d0);
  background: rgba(246, 215, 107, 0.08);
  border-bottom: 1px solid rgba(246, 215, 107, 0.2);
}

.gm-float-gusi-assistant-link {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--gm-yellow, #f6d76b);
  font-weight: 600;
  text-decoration: none;
}

.gm-float-gusi-assistant-link:hover {
  text-decoration: underline;
  color: var(--gm-yellow, #f6d76b);
}

.gm-float-gusi-login {
  margin: 0.65rem 1rem 0;
}

.gm-float-gusi-messages-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gm-float-gusi-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gm-float-gusi-msg {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 92%;
}

.gm-float-gusi-msg.user {
  align-self: flex-end;
  background: rgba(230, 82, 151, 0.22);
}

.gm-float-gusi-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
}

.gm-float-gusi-msg.assistant a {
  color: var(--gm-yellow, #f6d76b);
  font-weight: 600;
}

.gm-float-gusi-usage {
  padding: 0 1rem 0.35rem;
  font-size: 0.75rem;
  color: var(--gm-gray, #888);
}

.gm-float-gusi-usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gm-float-gusi-usage-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 0.25rem;
}

.gm-float-gusi-usage-bar-fill {
  height: 100%;
  background: var(--gm-yellow, #f6d76b);
  border-radius: 2px;
  width: 0%;
}

.gm-float-gusi-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.gm-float-gusi-input {
  flex: 1;
  min-height: 2.5rem;
  resize: vertical;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  color: var(--gm-gray-light, #f0f0f0);
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
}

.gm-float-gusi-send {
  align-self: flex-end;
  background: var(--gm-magenta, #e65297);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.gm-float-gusi-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 575.98px) {
  .gm-float-gusi-panel {
    right: 0.75rem;
    bottom: 5.5rem;
    width: calc(100vw - 1.5rem);
  }
}
