.ecajax-support {
  max-width: 920px;
  margin: 24px auto;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
  color: #2b2b2b;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.ecajax-support__header {
  padding: 14px 26px 13px;
  border-bottom: 0;
  background: #202020;
  color: #fff;
}

.ecajax-support__header h2 {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
}

.ecajax-support__header p {
  margin: 0;
  color: #f3f3f3;
  font-size: 13px;
  line-height: 1.35;
}

.ecajax-support__messages {
  min-height: 420px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 26px 30px 18px;
  background: #f4f4f4;
}

.ecajax-support__message {
  max-width: 82%;
  margin: 0 0 14px;
  padding: 15px 18px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ecajax-support__message--assistant {
  border-left: 6px solid #f80823;
  background: #fff;
  color: #2b2b2b;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.ecajax-support__message--user {
  margin-left: auto;
  background: #202020;
  color: #fff;
  font-weight: 700;
}

.ecajax-support__source-link {
  color: #d9071f;
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ecajax-support__source-link:hover,
.ecajax-support__source-link:focus {
  color: #a90618;
  text-decoration: underline;
}

.ecajax-support__form {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 26px 12px;
  border-top: 1px solid #e2e2e2;
  background: #fff;
}

.ecajax-support__form textarea {
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-height: 62px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #bcbcbc;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  line-height: 1.4;
  color: #2b2b2b;
  background: #fff;
  outline: none;
}

.ecajax-support__form textarea:focus {
  border-color: #f80823;
  box-shadow: 0 0 0 2px rgba(248, 8, 35, 0.12);
}

.ecajax-support__form button {
  flex: 0 0 132px;
  min-width: 132px;
  min-height: 62px;
  border: 0;
  border-radius: 10px;
  background: #f80823;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ecajax-support__form button:hover,
.ecajax-support__form button:focus {
  background: #d9071f;
}

.ecajax-support__form button:active {
  transform: translateY(1px);
}

.ecajax-support__form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ecajax-support__notice {
  margin: 0;
  padding: 0 26px 20px;
  background: #fff;
  color: #4f4f4f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .ecajax-support {
    margin: 16px 0;
    border-radius: 8px;
  }

  .ecajax-support__header {
    padding: 13px 18px 12px;
  }

  .ecajax-support__header h2 {
    font-size: 19px;
  }

  .ecajax-support__header p {
    font-size: 12px;
  }

  .ecajax-support__messages {
    min-height: 340px;
    max-height: 62vh;
    padding: 18px;
  }

  .ecajax-support__message {
    max-width: 94%;
  }

  .ecajax-support__form,
  .ecajax-support__form textarea,
  .ecajax-support__form button {
    display: block;
    width: 100%;
  }

  .ecajax-support__form {
    gap: 0;
    padding: 16px 18px 10px;
  }

  .ecajax-support__form button {
    min-width: 0;
    min-height: 44px;
    height: 44px;
    margin: 10px 0 0;
  }

  .ecajax-support__notice {
    padding: 0 18px 16px;
  }
}
