.gcrc-root {
  --gcr-navy: #0d2745;
  --gcr-navy-deep: #08172a;
  --gcr-red: #b3202e;
  --gcr-red-active: #941924;
  --gcr-ink: #1c2b3a;
  --gcr-muted: #5b6b7b;
  --gcr-line: #dbe2ea;
  --gcr-paper: #ffffff;
  --gcr-fog: #f4f6f9;
  --gcr-success: #1b6b4a;
  --gcr-online: #3ddc84;
  --gcr-warning: #8a5b16;
  --gcr-error: #a61b29;
  color-scheme: light;
  letter-spacing: 0;
}

.gcrc-root, .gcrc-root * { box-sizing: border-box; }
.gcrc-root button, .gcrc-root input, .gcrc-root textarea { font: inherit; letter-spacing: 0; }
.gcrc-root button { cursor: pointer; }
.gcrc-root [hidden] { display: none !important; }
.gcrc-root :focus-visible { outline: 3px solid #f0b323; outline-offset: 2px; }

.gcrc-root {
  --panel-width: 430px;
  position: relative;
  z-index: 9000;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.gcrc-launcher {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 9002;
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--gcr-paper);
  background: linear-gradient(135deg, var(--gcr-navy), var(--gcr-navy-deep));
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 16px 40px -14px rgba(8, 23, 42, 0.8);
  isolation: isolate;
}

.gcrc-launcher::before {
  position: absolute;
  inset: -6px;
  z-index: -1;
  border: 2px solid var(--gcr-red);
  border-radius: 50%;
  content: "";
  opacity: 0.7;
  animation: gcrc-launcher-ring 2.4s ease-out infinite;
}

.gcrc-launcher:hover {
  background: linear-gradient(135deg, #173e69, var(--gcr-navy));
}

.gcrc-launcher:focus-visible {
  outline-offset: 7px;
}

.gcrc-launcher img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.gcrc-launcher-status {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gcr-navy);
  border-radius: 50%;
  background: var(--gcr-online);
}

@keyframes gcrc-launcher-ring {
  0% { opacity: 0.7; transform: scale(0.92); }
  70%, 100% { opacity: 0; transform: scale(1.16); }
}

.gcrc-panel {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 9001;
  display: grid;
  width: min(var(--panel-width), calc(100vw - 32px));
  height: min(680px, calc(100svh - 116px));
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  overflow: hidden;
  color: var(--gcr-ink);
  background: var(--gcr-paper);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(8, 23, 42, 0.28);
}

.gcrc-header {
  display: grid;
  min-height: 74px;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--gcr-paper);
  background: var(--gcr-navy);
}

.gcrc-title-block {
  min-width: 0;
  padding-left: 4px;
  text-align: left;
}

.gcrc-title-block strong,
.gcrc-title-block span {
  display: block;
  overflow-wrap: anywhere;
}

.gcrc-title-block strong {
  font-size: 18px;
  line-height: 1.25;
}

.gcrc-title-block span {
  margin-top: 3px;
  color: #d9e3ee;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.gcrc-icon-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--gcr-paper);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 25px;
  line-height: 1;
}

.gcrc-icon-button:hover,
.gcrc-icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.gcrc-navigation {
  display: grid;
  min-height: 58px;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--gcr-fog);
  border-top: 1px solid var(--gcr-line);
  border-bottom: 1px solid var(--gcr-line);
}

.gcrc-nav-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--gcr-navy);
  background: var(--gcr-paper);
  border: 1px solid #b9c6d4;
  border-radius: 5px;
  font-size: 23px;
  line-height: 1;
}

.gcrc-nav-button:hover:not(:disabled),
.gcrc-nav-button:focus-visible {
  color: var(--gcr-paper);
  background: var(--gcr-navy);
  border-color: var(--gcr-navy);
}

.gcrc-nav-button:disabled {
  cursor: default;
  opacity: 0.32;
}

.gcrc-progress-summary {
  min-width: 0;
}

.gcrc-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--gcr-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.gcrc-progress-track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: #d7dee7;
  border-radius: 2px;
}

.gcrc-progress-value {
  width: 0;
  height: 100%;
  background: var(--gcr-red);
  transition: width 180ms ease;
}

.gcrc-transcript {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 16px 10px;
  background: var(--gcr-paper);
  scrollbar-gutter: stable;
}

.gcrc-message {
  display: flex;
  width: 100%;
  margin: 0 0 12px;
}

.gcrc-message p {
  max-width: 88%;
  margin: 0;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.gcrc-message-bot p {
  color: var(--gcr-ink);
  background: var(--gcr-fog);
  border: 1px solid #e2e7ed;
  border-bottom-left-radius: 2px;
}

.gcrc-message-user {
  justify-content: flex-end;
}

.gcrc-message-user p {
  color: var(--gcr-paper);
  background: var(--gcr-navy);
  border-bottom-right-radius: 2px;
}

.gcrc-composer {
  padding: 10px 16px 13px;
  background: var(--gcr-paper);
  border-top: 1px solid var(--gcr-line);
}

.gcrc-options {
  display: grid;
  max-height: 342px;
  grid-template-columns: 1fr;
  gap: 7px;
  overflow-y: auto;
  padding: 1px;
}

.gcrc-option,
.gcrc-secondary,
.gcrc-submit,
.gcrc-retry {
  min-height: 43px;
  padding: 9px 12px;
  overflow-wrap: anywhere;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
}

.gcrc-option {
  color: var(--gcr-navy);
  background: var(--gcr-paper);
  border: 1px solid #b9c6d4;
}

.gcrc-option:hover,
.gcrc-option:focus-visible {
  color: var(--gcr-paper);
  background: var(--gcr-navy);
  border-color: var(--gcr-navy);
}

.gcrc-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: end;
}

.gcrc-field-wrap {
  min-width: 0;
}

.gcrc-input,
.gcrc-textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--gcr-ink);
  background: var(--gcr-paper);
  border: 1px solid #aebdcb;
  border-radius: 6px;
  outline: 0;
  font-size: 16px;
  line-height: 1.35;
}

.gcrc-textarea {
  min-height: 82px;
  max-height: 120px;
  resize: vertical;
}

.gcrc-input:focus,
.gcrc-textarea:focus {
  border-color: var(--gcr-navy);
  box-shadow: 0 0 0 3px rgba(13, 39, 69, 0.14);
}

.gcrc-send {
  display: inline-flex;
  width: 48px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--gcr-paper);
  background: var(--gcr-red);
  border: 1px solid var(--gcr-red);
  border-radius: 6px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.gcrc-send:hover,
.gcrc-send:focus-visible {
  background: var(--gcr-red-active);
  border-color: var(--gcr-red-active);
}

.gcrc-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.gcrc-secondary {
  min-height: 38px;
  padding: 7px 10px;
  color: var(--gcr-navy);
  background: transparent;
  border: 1px solid #c7d1dc;
  font-size: 12px;
  text-align: center;
}

.gcrc-secondary:hover,
.gcrc-secondary:focus-visible {
  background: var(--gcr-fog);
  border-color: var(--gcr-navy);
}

.gcrc-submit,
.gcrc-retry {
  width: 100%;
  color: var(--gcr-paper);
  background: var(--gcr-red);
  border: 1px solid var(--gcr-red);
  text-align: center;
}

.gcrc-submit:hover,
.gcrc-submit:focus-visible,
.gcrc-retry:hover,
.gcrc-retry:focus-visible {
  background: var(--gcr-red-active);
  border-color: var(--gcr-red-active);
}

.gcrc-submit[disabled],
.gcrc-send[disabled] {
  cursor: wait;
  opacity: 0.64;
}

.gcrc-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0 0 10px;
  color: var(--gcr-muted);
  font-size: 12px;
  line-height: 1.5;
}

.gcrc-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--gcr-red);
}

.gcrc-consent a {
  color: var(--gcr-navy);
  font-weight: 800;
  text-underline-offset: 2px;
}

.gcrc-preview-note {
  margin: 0;
  color: var(--gcr-muted);
  font-size: 12px;
  line-height: 1.45;
}

.gcrc-error {
  min-height: 0;
  margin: 0 16px;
  color: var(--gcr-error);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.gcrc-error:not(:empty) {
  padding: 0 0 8px;
}

.gcrc-privacy {
  min-height: 42px;
  margin: 0;
  padding: 9px 16px 10px;
  color: var(--gcr-muted);
  background: var(--gcr-fog);
  border-top: 1px solid var(--gcr-line);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.gcrc-contact-links {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.gcrc-contact-links a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: var(--gcr-navy);
  background: var(--gcr-paper);
  border: 1px solid #bdc9d6;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.gcrc-contact-links a:hover,
.gcrc-contact-links a:focus-visible {
  color: var(--gcr-paper);
  background: var(--gcr-navy);
}

.gcrc-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 560px) {
  body.gcrc-dialog-open {
    overflow: hidden;
  }
  .gcrc-launcher {
    right: 14px;
    bottom: 14px;
    width: 60px;
    height: 60px;
  }

  .gcrc-panel {
    inset: 0;
    width: 100vw;
    height: 100svh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .gcrc-root[data-open="true"] .gcrc-launcher {
    display: none;
  }

  .gcrc-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .gcrc-transcript {
    padding-right: 14px;
    padding-left: 14px;
  }

  .gcrc-composer {
    padding-right: 14px;
    padding-bottom: max(13px, env(safe-area-inset-bottom));
    padding-left: 14px;
  }

  .gcrc-privacy {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .gcrc-root, .gcrc-root *, .gcrc-root *::before, .gcrc-root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
