:root {
  --gcsa-bg: #080808;
  --gcsa-surface: #0c0c0d;
  --gcsa-surface-2: #111112;
  --gcsa-surface-3: #171718;
  --gcsa-border: rgba(255, 201, 40, 0.18);
  --gcsa-border-soft: rgba(255, 255, 255, 0.08);
  --gcsa-gold: #f4bf17;
  --gcsa-gold-light: #ffd34d;
  --gcsa-text: #f7f4eb;
  --gcsa-muted: #b9b2a1;
  --gcsa-danger: #d96f6f;
}

.gcsa-root {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: inherit;
  max-width: calc(100vw - 24px);
}

.gcsa-launcher {
  appearance: none;
  border: 1px solid rgba(255, 191, 0, 0.24);
  background: var(--gcsa-gold);
  color: #090909 !important;
  min-height: 56px;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.gcsa-launcher,
.gcsa-launcher:hover,
.gcsa-launcher:focus-visible,
.gcsa-launcher:visited {
  color: #090909 !important;
  text-decoration: none !important;
}

.gcsa-launcher:hover,
.gcsa-launcher:focus-visible {
  border-color: rgba(255, 191, 0, 0.5);
  background: var(--gcsa-gold-light);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
}

.gcsa-launcher-dot {
  display: none;
}

.gcsa-launcher-label {
  letter-spacing: 0.01em;
}

.gcsa-widget {
  width: min(476px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  height: min(728px, calc(100vh - 40px));
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background: var(--gcsa-bg);
  color: var(--gcsa-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gcsa-widget[hidden] {
  display: none !important;
}

.gcsa-root.is-open .gcsa-widget {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.gcsa-widget-header {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--gcsa-border-soft);
  background: var(--gcsa-surface);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.gcsa-widget-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.gcsa-widget-status {
  font-size: 0.88rem;
  color: var(--gcsa-muted);
}

.gcsa-widget-close {
  appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--gcsa-surface-3);
  color: var(--gcsa-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.gcsa-widget-close:hover,
.gcsa-widget-close:focus-visible {
  border-color: rgba(255, 191, 0, 0.42);
  outline: none;
}

.gcsa-widget-body {
  flex: 1;
  min-height: 0;
  padding: 16px 16px 0;
  background: var(--gcsa-bg);
}

.gcsa-messages {
  height: 100%;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.gcsa-messages::-webkit-scrollbar {
  width: 8px;
}

.gcsa-messages::-webkit-scrollbar-track {
  background: transparent;
}

.gcsa-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.gcsa-row {
  display: flex;
  width: 100%;
  margin-bottom: 14px;
  animation: gcsa-fade-up 0.22s ease both;
}

.gcsa-row--assistant,
.gcsa-row--system {
  justify-content: flex-start;
}

.gcsa-row--user {
  justify-content: flex-end;
}

.gcsa-card,
.gcsa-bubble {
  max-width: 92%;
}

.gcsa-card {
  background: var(--gcsa-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 14px 12px;
}

.gcsa-card--system {
  border-color: rgba(217, 111, 111, 0.34);
  background: rgba(217, 111, 111, 0.08);
}

.gcsa-card-label {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gcsa-gold);
  margin-bottom: 10px;
}

.gcsa-bubble {
  border-radius: 18px 18px 10px 18px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gcsa-text);
  padding: 11px 13px;
  line-height: 1.5;
  font-size: 0.96rem;
}

.gcsa-content {
  color: var(--gcsa-text);
  line-height: 1.6;
  font-size: 0.97rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gcsa-content > * {
  max-width: 100%;
}

.gcsa-content > *:last-child {
  margin-bottom: 0;
}

.gcsa-content p {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.gcsa-content p:last-child {
  margin-bottom: 0;
}

.gcsa-content ul {
  margin: 0 0 12px 18px;
  padding: 0;
}

.gcsa-content li {
  margin: 0 0 6px;
}

.gcsa-content strong {
  font-weight: 800;
}

.gcsa-content a {
  color: #ffe39c;
  text-decoration: underline;
  text-decoration-color: rgba(255, 211, 77, 0.6);
  text-underline-offset: 2px;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gcsa-content a:hover {
  color: #fff0bf;
  text-decoration-color: currentColor;
}

.gcsa-inline-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffe39c !important;
  font-weight: 800;
  line-height: inherit;
  text-decoration: underline !important;
  text-decoration-color: rgba(255, 211, 77, 0.6) !important;
  text-underline-offset: 2px;
  max-width: 100%;
}

.gcsa-inline-link:hover,
.gcsa-inline-link:focus-visible,
.gcsa-inline-link:visited {
  color: #fff0bf !important;
  text-decoration-color: currentColor !important;
  outline: none;
}

.gcsa-inline-link--button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 6px 6px 6px 0;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--gcsa-gold);
  background: var(--gcsa-gold);
  color: #090909 !important;
  font-weight: 800;
  text-decoration: none !important;
}

.gcsa-inline-link--button:hover,
.gcsa-inline-link--button:focus-visible,
.gcsa-inline-link--button:visited {
  background: var(--gcsa-gold-light);
  border-color: var(--gcsa-gold-light);
  color: #090909 !important;
  text-decoration: none !important;
}

.gcsa-content .gcsa-inline-link {
  vertical-align: baseline;
}

.gcsa-typing-dots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 24px;
}

.gcsa-typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  animation: gcsa-bounce 1s infinite ease-in-out;
}

.gcsa-typing-dots span:nth-child(2) { animation-delay: .12s; }
.gcsa-typing-dots span:nth-child(3) { animation-delay: .24s; }

@keyframes gcsa-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.gcsa-link-card-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  grid-template-columns: 1fr;
}

.gcsa-link-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #111112;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gcsa-link-card-type {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gcsa-gold);
}

.gcsa-link-card-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
}

.gcsa-link-card-text {
  color: var(--gcsa-muted);
  margin: 0 0 6px;
  line-height: 1.45;
  font-size: 0.92rem;
}

.gcsa-card-coupon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gcsa-card-coupon-badge {
  font-size: 0.73rem;
  color: var(--gcsa-muted);
}

.gcsa-card-coupon-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 191, 0, 0.16);
  border: 1px solid rgba(255, 191, 0, 0.25);
  color: var(--gcsa-gold-light);
  font-weight: 800;
}

.gcsa-card-coupon-text {
  font-size: 0.85rem;
  color: var(--gcsa-muted);
}

.gcsa-link-card-button,
.gcsa-send {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  border: 1px solid var(--gcsa-gold);
  background: var(--gcsa-gold);
  color: #090909 !important;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
}

.gcsa-link-card-button {
  align-self: flex-start;
}

.gcsa-link-card-button:hover,
.gcsa-link-card-button:focus-visible,
.gcsa-send:hover,
.gcsa-send:focus-visible {
  background: var(--gcsa-gold-light);
  border-color: var(--gcsa-gold-light);
  color: #090909 !important;
  outline: none;
}

.gcsa-widget-footer {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--gcsa-border-soft);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: var(--gcsa-surface);
}

.gcsa-widget-footer textarea {
  width: 100%;
  resize: vertical;
  border-radius: 16px;
  min-height: 108px;
  max-height: 260px;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111111;
  color: var(--gcsa-text);
  line-height: 1.5;
  font: inherit;
  font-size: 0.97rem;
  overflow: auto;
  overflow-x: hidden;
  appearance: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.gcsa-widget-footer textarea::placeholder {
  color: #8f8878;
}

.gcsa-widget-footer textarea:focus-visible {
  outline: none;
  border-color: rgba(255, 191, 0, 0.34);
}

.gcsa-widget-footer textarea::-webkit-scrollbar {
  width: 10px;
}

.gcsa-widget-footer textarea::-webkit-scrollbar-track {
  background: transparent;
}

.gcsa-widget-footer textarea::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.gcsa-widget-footer textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.gcsa-widget-footer textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
  background-clip: padding-box;
}

.gcsa-widget-footer textarea::-webkit-resizer,
.gcsa-widget-footer textarea::-webkit-scrollbar-corner {
  background: transparent;
}

.gcsa-send {
  align-self: flex-end;
  min-width: 132px;
}

.gcsa-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .gcsa-root {
    left: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }

  .gcsa-widget {
    width: min(94vw, 420px);
    max-width: calc(100vw - 24px);
    height: min(76vh, 660px);
    border-radius: 22px;
  }

  .gcsa-widget-header,
  .gcsa-widget-body,
  .gcsa-widget-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .gcsa-card,
  .gcsa-bubble {
    max-width: 92%;
  }
}

@media (max-width: 480px) {
  .gcsa-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .gcsa-widget {
    width: calc(100vw - 24px);
    height: min(80vh, 680px);
  }

  .gcsa-widget-title {
    font-size: 1.02rem;
  }

  .gcsa-content,
  .gcsa-bubble,
  .gcsa-widget-footer textarea {
    font-size: 0.94rem;
  }

  .gcsa-send {
    width: 100%;
    align-self: stretch;
  }
}
