.cresora-chat {
  --cresora-ink: #2f2f2f;
  --cresora-muted: #60758d;
  --cresora-line: #d9eaff;
  --cresora-chat-height: 64px;
  --cresora-chat-background: #f4f8f7;
  --cresora-button-color: #303030;
  --cresora-arrow-color: #ffffff;
  --cresora-results-background: #fbfbff;
  --cresora-results-text-color: #2f2f2f;
  --cresora-results-border-color: #d9eaff;
  --cresora-results-footer-background: #edf6ff;
  --cresora-disclaimer-color: #60758d;
  --cresora-quote-link-color: #318AF0;
  width: min(100%, 680px);
  margin: 24px auto;
  color: var(--cresora-ink);
  font: 400 16px/1.6 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cresora-chat *, .cresora-chat *::before, .cresora-chat *::after { box-sizing: border-box; }

.cresora-chat__form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--cresora-chat-height);
  min-height: var(--cresora-chat-height);
  padding: 6px 7px 6px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--cresora-chat-background);
  box-shadow: 0 7px 24px rgba(29, 45, 52, .07), 0 0 0 7px rgba(236, 244, 243, .72);
  transition: box-shadow .2s ease, transform .2s ease;
}

.cresora-chat__form:focus-within {
  box-shadow: 0 9px 28px rgba(29, 45, 52, .09), 0 0 0 7px rgba(236, 244, 243, .82);
}

.cresora-chat__input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: calc(var(--cresora-chat-height) - 16px);
  align-self: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none !important;
  background: transparent !important;
  color: #383838;
  font: 500 17px/1.25 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: normal;
  vertical-align: middle;
}

.cresora-chat__input:hover,
.cresora-chat__input:focus,
.cresora-chat__input:focus-visible,
.cresora-chat__input:active {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.cresora-chat__input::placeholder { color: #777777; opacity: 1; }
.cresora-chat__input:disabled { cursor: wait; }

/*
 * The selectors below intentionally use extra specificity and !important.
 * WordPress themes and page builders commonly ship global button rules with
 * !important declarations. The Cresora appearance settings must remain
 * authoritative inside the chat component.
 */
.cresora-chat .cresora-chat__form button.cresora-chat__send {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  width: calc(var(--cresora-chat-height) - 14px) !important;
  height: calc(var(--cresora-chat-height) - 14px) !important;
  align-self: center !important;
  min-width: calc(var(--cresora-chat-height) - 14px) !important;
  min-height: calc(var(--cresora-chat-height) - 14px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  outline: 0;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: var(--cresora-button-color) !important;
  background-image: none !important;
  color: var(--cresora-arrow-color) !important;
  -webkit-text-fill-color: var(--cresora-arrow-color) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font: inherit !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, filter .15s ease;
}

.cresora-chat .cresora-chat__form button.cresora-chat__send:hover,
.cresora-chat .cresora-chat__form button.cresora-chat__send:focus,
.cresora-chat .cresora-chat__form button.cresora-chat__send:focus-visible,
.cresora-chat .cresora-chat__form button.cresora-chat__send:active {
  border: 0 !important;
  background-color: var(--cresora-button-color) !important;
  background-image: none !important;
  color: var(--cresora-arrow-color) !important;
  -webkit-text-fill-color: var(--cresora-arrow-color) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.cresora-chat .cresora-chat__form button.cresora-chat__send:hover {
  filter: brightness(.92);
  transform: scale(1.03);
}

.cresora-chat .cresora-chat__form button.cresora-chat__send:focus-visible {
  outline: 3px solid rgba(48, 48, 48, .24);
  outline-offset: 2px;
}

.cresora-chat .cresora-chat__form button.cresora-chat__send:disabled {
  cursor: wait;
  opacity: .58;
  transform: none;
  filter: none;
}

.cresora-chat .cresora-chat__form button.cresora-chat__send::before,
.cresora-chat .cresora-chat__form button.cresora-chat__send::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.cresora-chat .cresora-chat__form button.cresora-chat__send svg {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  fill: none !important;
  color: var(--cresora-arrow-color) !important;
  stroke: var(--cresora-arrow-color) !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.cresora-chat .cresora-chat__form button.cresora-chat__send svg path {
  fill: none !important;
  stroke: var(--cresora-arrow-color) !important;
}

.cresora-chat__send-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cresora-chat__website {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
}

.cresora-chat__answer[hidden] { display: none; }

.cresora-chat__answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-6px);
  transition: grid-template-rows .26s ease, opacity .2s ease, transform .26s ease;
}

.cresora-chat__answer--visible {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.cresora-chat__answer-clip { min-height: 0; overflow: hidden; }

.cresora-chat__answer-card {
  margin: 14px 4px 0;
  overflow: hidden;
  border: 1px solid var(--cresora-results-border-color) !important;
  border-radius: 16px;
  background: var(--cresora-results-background) !important;
  background-image: none !important;
  box-shadow: 0 12px 32px rgba(49, 138, 240, .1);
}

.cresora-chat__answer-text {
  padding: 22px 24px 18px;
  border-left: 0 !important;
  color: var(--cresora-results-text-color) !important;
  -webkit-text-fill-color: var(--cresora-results-text-color) !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cresora-chat__footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--cresora-results-border-color) !important;
  background: var(--cresora-results-footer-background) !important;
  background-image: none !important;
  color: var(--cresora-disclaimer-color) !important;
  font-size: 11px;
}

.cresora-chat .cresora-chat__footer .cresora-chat__disclaimer {
  color: var(--cresora-disclaimer-color) !important;
  -webkit-text-fill-color: var(--cresora-disclaimer-color) !important;
}

.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link,
.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link:visited,
.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link:hover,
.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link:focus,
.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link:active {
  color: var(--cresora-quote-link-color) !important;
  -webkit-text-fill-color: var(--cresora-quote-link-color) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link:hover,
.cresora-chat .cresora-chat__footer a.cresora-chat__quote-link:focus-visible {
  text-decoration: underline !important;
}

@media (max-width: 600px) {
  .cresora-chat { margin: 14px auto; }
  .cresora-chat__form { gap: 6px; height: var(--cresora-chat-height); min-height: var(--cresora-chat-height); padding: 5px 6px 5px 18px; }
  .cresora-chat__input { height: calc(var(--cresora-chat-height) - 12px); font-size: 14px; line-height: normal; }
  .cresora-chat__send { width: calc(var(--cresora-chat-height) - 12px); min-width: calc(var(--cresora-chat-height) - 12px); height: calc(var(--cresora-chat-height) - 12px); min-height: calc(var(--cresora-chat-height) - 12px); padding: 0; }
  .cresora-chat__send svg { width: 22px; height: 22px; }
  .cresora-chat__answer-text { padding: 18px; }
  .cresora-chat__footer { padding: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .cresora-chat *, .cresora-chat *::before, .cresora-chat *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
