#gc-inbox-widget {
  all: initial;
  display: flex;
  width: min(360px, calc(100vw - 24px));
  height: auto;
  justify-content: flex-end;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  color: #172033;
  font: 16px/1.4 Arial, sans-serif;
  text-align: left;
}

#gc-inbox-widget[data-coexist-with-jivo="true"] { bottom: 96px; }

#gc-inbox-widget,
#gc-inbox-widget *,
#gc-inbox-widget *::before,
#gc-inbox-widget *::after { box-sizing: border-box; }

#gc-inbox-widget button,
#gc-inbox-widget textarea {
  all: unset;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
}

#gc-inbox-widget [hidden] { display: none !important; }

#gc-inbox-widget .gc-widget-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 190px !important;
  max-width: none !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  border: 0;
  border-radius: 16px;
  gap: 10px;
  padding: 7px 10px;
  background: linear-gradient(135deg, #29262b 0%, #a51f2a 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px #4b111c40;
}

#gc-inbox-widget .gc-widget-logo {
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: #ffffff;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 2px 10px #00000026;
}

#gc-inbox-widget .gc-widget-toggle-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
}

#gc-inbox-widget .gc-widget-toggle-copy strong {
  color: white;
  font-size: 14px;
  line-height: 1.2;
}

#gc-inbox-widget .gc-widget-toggle-copy small {
  color: #f4dadd;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

#gc-inbox-widget .gc-widget-open-mark {
  display: block;
  color: white;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

#gc-inbox-widget .gc-widget-panel {
  flex: 0 0 100%;
  width: 100%;
  height: min(520px, calc(100vh - 40px));
  margin: 0;
  padding: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d9d5d7;
  border-radius: 18px;
  background: #fbfafb;
  box-shadow: 0 18px 52px #24171b38;
}

#gc-inbox-widget .gc-widget-panel:not([hidden]) { display: grid; }

#gc-inbox-widget .gc-widget-panel header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  min-height: 68px;
  padding: 11px 12px;
  background: linear-gradient(125deg, #29262b 0%, #3b2529 46%, #a51f2a 100%);
  color: white;
}

#gc-inbox-widget .gc-widget-logo-header {
  width: 50px;
  height: 33px;
}

#gc-inbox-widget .gc-widget-heading {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
}

#gc-inbox-widget .gc-widget-heading strong {
  color: white;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}

#gc-inbox-widget .gc-widget-heading small {
  color: #f4dadd;
  font-size: 12px;
  line-height: 1.25;
}

#gc-inbox-widget .gc-widget-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: #ffffff14;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

#gc-inbox-widget .gc-widget-close:hover { background: #ffffff26; }

#gc-inbox-widget .gc-widget-status {
  display: block;
  margin: 0;
  padding: 9px 14px;
  background: #fff4e6;
  color: #6d4817;
  font-size: 13px;
}

#gc-inbox-widget .gc-widget-messages {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  background:
    radial-gradient(circle at 12% 10%, #f5dfe233 0 90px, transparent 91px),
    linear-gradient(180deg, #f8f6f7 0%, #f2eff1 100%);
}

#gc-inbox-widget .gc-widget-empty {
  display: flex;
  align-self: center;
  width: min(250px, 88%);
  margin: auto 0;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid #eadfe2;
  border-radius: 16px;
  background: #ffffffd9;
  color: #5f5659;
  text-align: center;
  box-shadow: 0 8px 24px #3c20270d;
}

#gc-inbox-widget .gc-widget-empty strong {
  color: #8d1c26;
  font-size: 15px;
}

#gc-inbox-widget .gc-widget-empty span { font-size: 13px; }

#gc-inbox-widget .gc-widget-message {
  display: block;
  max-width: 82%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e4dfe1;
  border-radius: 14px 14px 14px 4px;
  background: #ffffff;
  color: #292429;
  box-shadow: 0 2px 8px #32171e0a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#gc-inbox-widget .gc-widget-message.outbound {
  align-self: flex-end;
  border-color: #a9dfc0;
  border-radius: 14px 14px 4px 14px;
  background: #d9f7e6;
  color: #173d2a;
}

#gc-inbox-widget .gc-widget-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: end !important;
  gap: 8px;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
  padding: 12px;
  border-top: 1px solid #e4dfe1;
  background: #ffffff;
}

#gc-inbox-widget .gc-widget-form textarea {
  display: block;
  align-self: end;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  border: 1px solid #cfc7ca;
  border-radius: 21px;
  padding: 9px 14px;
  overflow-y: auto;
  resize: none;
  background: white;
  color: #292429;
  font-size: 14px !important;
  line-height: 22px !important;
}

#gc-inbox-widget .gc-widget-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #a51f2a;
  color: white;
  font-weight: 700;
  line-height: 1 !important;
  cursor: pointer;
}

#gc-inbox-widget .gc-widget-form button:hover { background: #881923; }

#gc-inbox-widget .gc-widget-form button span {
  display: block;
  transform: translateX(1px) rotate(-8deg);
  font-size: 18px;
}

#gc-inbox-widget button:focus-visible,
#gc-inbox-widget textarea:focus-visible {
  outline: 3px solid #f2a4ab !important;
  outline-offset: 2px !important;
}

#gc-inbox-widget .gc-widget-form textarea:focus-visible { border-color: #a51f2a; }
#gc-inbox-widget .gc-widget-form button:disabled { cursor: wait; opacity: 0.62; }

#gc-inbox-widget .gc-widget-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.widget-demo { max-width: 720px; margin: 80px auto; padding: 24px; font-family: Arial, sans-serif; }
.widget-demo #gc-inbox-widget { position: static; margin-top: 20px; }
.widget-build-marker { font-weight: 700; color: #a51f2a; }

@media (max-width: 480px) {
  #gc-inbox-widget { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  #gc-inbox-widget[data-coexist-with-jivo="true"] { bottom: 88px; }
  #gc-inbox-widget .gc-widget-panel { width: calc(100vw - 24px); height: calc(100vh - 24px); }
  #gc-inbox-widget[data-coexist-with-jivo="true"] .gc-widget-panel { height: calc(100vh - 100px); }
}
