/* Ask Schneide widget. No fonts, libraries, or CDNs.
   Inter and Cormorant Garamond are used only if the page already loads them. */

#ss-chat,
#ss-chat * {
  box-sizing: border-box;
}

#ss-chat {
  font-family: Inter, system-ui, sans-serif;
  color: #1a1a1a;
  line-height: 1.45;
}

#ss-chat button,
#ss-chat input {
  font-family: Inter, system-ui, sans-serif;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

#ss-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #f15a24;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(26, 26, 26, 0.22);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#ss-chat-launcher:hover,
#ss-chat-launcher:focus-visible {
  background: #1a1a1a;
  outline: none;
}

#ss-chat-launcher:focus-visible {
  box-shadow: 0 0 0 3px #f7f5f1, 0 0 0 5px #f15a24;
}

#ss-chat-launcher[aria-expanded="true"] {
  background: #1a1a1a;
}

#ss-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 1000;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: calc(100vh - 112px);
  max-height: 640px;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 22px 56px rgba(0, 0, 0, 0.55), 0 6px 16px rgba(0, 0, 0, 0.30);
  overflow: hidden;
}

#ss-chat-panel[hidden] {
  display: none !important;
}

.ss-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #1a1a1a;
  color: #fff;
  padding: 14px 16px 12px 20px;
  flex: 0 0 auto;
}

.ss-chat-header h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
  line-height: 1.15;
}

.ss-chat-label {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f15a24;
  font-weight: 600;
}

#ss-chat-close {
  width: 36px;
  height: 36px;
  margin: -4px -4px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#ss-chat-close:hover,
#ss-chat-close:focus-visible {
  background: #f15a24;
  border-color: #f15a24;
  outline: none;
}

#ss-chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 16px 8px;
  background: #ebe6dd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ss-msg {
  max-width: 92%;
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 12px;
  border: 1px solid #cfc6b8;
  overflow-wrap: anywhere;
}

.ss-msg p {
  margin: 0 0 8px;
  color: inherit;
}

.ss-msg p:last-child {
  margin-bottom: 0;
}

.ss-msg a {
  color: #f15a24;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ss-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: #1a1a1a;
}

.ss-msg-user {
  align-self: flex-end;
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.ss-msg-user a {
  color: #fff;
}

.ss-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  min-height: 44px;
}

.ss-typing span:not(.ss-sr-only) {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5c5c5c;
  animation: ss-dot 1s ease-in-out infinite;
}

.ss-typing span:not(.ss-sr-only):nth-child(2) {
  animation-delay: 0.15s;
}

.ss-typing span:not(.ss-sr-only):nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ss-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ss-typing span:not(.ss-sr-only) {
    animation: none;
    opacity: 0.7;
  }
}

.ss-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 16px 4px;
  background: #fff;
  border-top: 1px solid #cfc6b8;
  flex: 0 0 auto;
}

.ss-chip {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  padding: 7px 11px;
  border: 1px solid #e4dfd6;
  border-radius: 0;
  background: #f7f5f1;
  color: #1a1a1a;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ss-chip:hover,
.ss-chip:focus-visible {
  background: #f15a24;
  border-color: #f15a24;
  color: #fff;
  outline: none;
}

#ss-chat-form {
  display: flex;
  gap: 8px;
  padding: 6px 16px 8px;
  background: #fff;
  flex: 0 0 auto;
}

#ss-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e4dfd6;
  border-radius: 0;
  background: #f7f5f1;
  color: #1a1a1a;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
}

#ss-chat-input:focus {
  outline: none;
  border-color: #1a1a1a;
  background: #fff;
}

#ss-chat-send {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  background: #1a1a1a;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#ss-chat-send:hover,
#ss-chat-send:focus-visible {
  background: #f15a24;
  border-color: #f15a24;
  outline: none;
}

#ss-chat-send:disabled,
#ss-chat-input:disabled,
.ss-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ss-chat-footer {
  margin: 0;
  padding: 0 16px 12px;
  background: #fff;
  color: #5c5c5c;
  font-size: 11px;
  line-height: 1.45;
  flex: 0 0 auto;
}

.ss-chat-footer a {
  color: #f15a24;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ss-chat-footer a:hover,
.ss-chat-footer a:focus-visible {
  color: #1a1a1a;
}

.ss-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  #ss-chat-launcher {
    right: 16px;
    bottom: 16px;
  }

  #ss-chat-panel {
    right: 8px;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
  }

  #ss-chat-launcher[aria-expanded="true"] {
    visibility: hidden;
  }

  /* 16px stops iOS from zooming the page when the field is focused. */
  #ss-chat-input {
    font-size: 16px;
  }
}
