/* GoSendIt support chat widget */
#gs-chat-root, #gs-chat-root * { box-sizing: border-box; }

#gs-chat-launcher {
  position: fixed;
  color: #fff !important;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: none;
  background: #ff6a1a;
  color: #12141c;
  box-shadow: 0 14px 34px rgba(255,106,26,.38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#gs-chat-launcher:hover { transform: scale(1.06); }
#gs-chat-launcher svg { width: 26px; height: 26px; }
#gs-chat-launcher .gs-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #1a9e5c;
  border: 2px solid #fff;
  display: none;
}
#gs-chat-launcher.gs-has-new .gs-dot { display: block; }

#gs-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 2147483000;
  width: 366px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(18,20,28,.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1c1f26;
  border: 1px solid #e9e7e4;
}
#gs-chat-panel.gs-open { display: flex; }

#gs-chat-head {
  background: #12141c;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}
#gs-chat-head strong { font-size: 15px; font-weight: 600; }
#gs-chat-head span { display: block; font-size: 12.5px; opacity: .85; margin-top: 2px; }
#gs-chat-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gs-chat-close:hover { background: rgba(255,255,255,.28); }

#gs-chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  background: #f6f5f4;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gs-msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.gs-msg-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e9e7e4;
  border-bottom-left-radius: 4px;
}
.gs-msg-user {
  align-self: flex-end;
  background: #ff6a1a;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.gs-msg-system {
  align-self: center;
  background: #fff1e8;
  color: #a2410c;
  font-size: 12px;
  border-radius: 10px;
  text-align: center;
}
.gs-typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 13px; }
.gs-typing span {
  width: 6px; height: 6px; border-radius: 999px; background: #9aa0a8;
  animation: gsTypingBounce 1.1s infinite ease-in-out;
}
.gs-typing span:nth-child(2) { animation-delay: .15s; }
.gs-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes gsTypingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

#gs-chat-form {
  padding: 18px;
  overflow-y: auto;
  background: #fff;
}
#gs-chat-form h3 { margin: 0 0 4px; font-size: 16px; }
#gs-chat-form p { margin: 0 0 16px; font-size: 13px; color: #6b7280; }
#gs-chat-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
#gs-chat-form .gs-field { margin-bottom: 12px; }
#gs-chat-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dcd9d4;
  font-size: 13.5px;
  font-family: inherit;
  background: #f6f5f4;
}
#gs-chat-form input:focus { outline: 2px solid #ffb48a; outline-offset: 1px; }
#gs-chat-form button {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: none;
  background: #ff6a1a;
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  margin-top: 4px;
}
#gs-chat-form button:hover { background: #e8380a; }
#gs-chat-form .gs-error { color: #d64545; font-size: 12.5px; margin: 0 0 10px; display: none; }
#gs-chat-form .gs-error.gs-show { display: block; }

#gs-chat-inputrow {
  flex: 0 0 auto;
  border-top: 1px solid #e9e7e4;
  padding: 10px;
  display: flex;
  gap: 8px;
  background: #fff;
}
#gs-chat-input {
  flex: 1;
  resize: none;
  border: 1px solid #dcd9d4;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  max-height: 90px;
  min-height: 38px;
}
#gs-chat-input:focus { outline: 2px solid #ffb48a; outline-offset: 1px; }
#gs-chat-send {
  border: none;
  background: #ff6a1a;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gs-chat-send:hover { background: #e8380a; }
#gs-chat-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  #gs-chat-panel { right: 16px; left: 16px; width: auto; bottom: 86px; }
  #gs-chat-launcher { right: 16px; bottom: 16px; }
}

/* A real person (Gary) replying in the chat */
.gs-msg-agent { align-self: flex-start; background: #EAF1FF; border: 1px solid #C9D9FB; border-bottom-left-radius: 4px; }
.gs-msg-who { display: block; font-size: 11px; font-weight: 700; color: #1F4FB0; margin-bottom: 2px; }

.gs-msg a { color: #ff6a1a; text-decoration: underline; word-break: break-all; }
.gs-msg a.gs-pay { display: inline-block; margin: 4px 0; background: #ff6a1a; color: #12141c; padding: 9px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; word-break: normal; }
.gs-msg a.gs-pay:hover { filter: brightness(1.05); }

/* GoSendIt: white icon on the orange launcher, white text on the orange pay button */
#gs-chat-launcher { background: linear-gradient(135deg, #ff6a1a, #e8380a); }
.gs-msg a.gs-pay { color: #fff; }
.gs-msg-user a { color: #fff; }

/* The site's global button style (gradient, padding, shadow) mustn't squash the chat's icon buttons. */
#gs-chat-launcher, #gs-chat-send, #gs-chat-close { padding: 0; box-shadow: none; transform: none; }
#gs-chat-launcher { box-shadow: 0 14px 34px rgba(255,106,26,.38); }
#gs-chat-close { background: rgba(255,255,255,.15); }
#gs-chat-send { background: linear-gradient(135deg, #ff6a1a, #e8380a); }
#gs-chat-send svg, #gs-chat-launcher svg { flex: 0 0 auto; }
#gs-chat-form button { display: block; box-shadow: none; }
