.finder-form {
  grid-template-columns: minmax(0, 1fr) 24px repeat(3, minmax(0, 1fr)) auto;
  gap: 9px;
}

.parts-assistant {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  color: #242525;
  font-family: var(--body);
}

.assistant-launcher {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(115deg, #edaa53, #e18b37);
  box-shadow: 0 8px 26px rgba(0,0,0,.25);
  color: #20170d;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
}

.assistant-launcher svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.assistant-panel[hidden],
.assistant-form[hidden],
.assistant-quick-replies[hidden] {
  display: none;
}

.assistant-panel {
  display: flex;
  width: min(370px, calc(100vw - 32px));
  height: min(550px, calc(100dvh - 112px));
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: #f0efeb;
  box-shadow: 0 18px 58px rgba(0,0,0,.42);
  animation: assistant-open .2s ease-out;
}

.assistant-header {
  display: flex;
  min-height: 67px;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  background: #17191a;
  color: #f5f3ed;
}

.assistant-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  background: rgba(241,168,74,.14);
  color: #f1a84a;
}

.assistant-avatar svg {
  width: 21px;
  height: 21px;
}

.assistant-header h2 {
  margin: 0;
  font: 700 11px var(--font);
}

.assistant-header p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 0;
  color: #aaa9a4;
  font-size: 9px;
}

.assistant-header p span {
  width: 6px;
  height: 6px;
  background: #71bf83;
  border-radius: 50%;
}

.assistant-close {
  width: 31px;
  height: 31px;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.16);
  background: transparent;
  color: #e7e5df;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.assistant-messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 16px 13px;
  scrollbar-width: thin;
}

.assistant-message {
  max-width: 88%;
  padding: 10px 12px;
  font-size: 10px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.assistant-message-bot {
  align-self: flex-start;
  background: #fff;
  color: #333431;
  border: 1px solid #e0dfd8;
}

.assistant-message-user {
  align-self: flex-end;
  background: #252728;
  color: #fff;
}

.assistant-quick-replies {
  display: grid;
  gap: 7px;
  padding: 0 13px 12px;
}

.assistant-quick-replies button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d5d2c9;
  background: #f8f7f3;
  color: #353633;
  cursor: pointer;
  font-size: 9px;
  text-align: left;
  transition: border-color .2s, background .2s;
}

.assistant-quick-replies button:hover {
  border-color: #db9948;
  background: #fff;
}

.assistant-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #d8d6cf;
  background: #e9e8e2;
}

.assistant-form input {
  min-width: 0;
  height: 39px;
  flex: 1;
  padding: 0 10px;
  border: 1px solid #d1cfc7;
  border-radius: 0;
  outline: none;
  background: #fff;
  color: #242525;
  font-size: 10px;
}

.assistant-form input:focus {
  border-color: #d99745;
}

.assistant-form button {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  background: #e8a24d;
  color: #261b10;
  cursor: pointer;
}

.assistant-form button svg {
  width: 19px;
  height: 19px;
}

.assistant-status {
  margin: 0;
  padding: 0 13px 8px;
  background: #e9e8e2;
  color: #9c5730;
  font-size: 9px;
  line-height: 1.5;
}

@keyframes assistant-open {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .finder-form {
    grid-template-columns: minmax(0, 1fr) 24px repeat(3, minmax(0, 1fr)) auto;
  }
}

@media (max-width: 760px) {
  .finder-form {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  }

  .finder-form .field:nth-of-type(n + 3) {
    grid-column: 1 / -1;
  }

  .parts-assistant {
    right: 12px;
    bottom: 12px;
    gap: 9px;
  }

  .assistant-launcher {
    min-height: 47px;
    gap: 8px;
    padding: 0 12px;
    font-size: 10px;
  }

  .assistant-panel {
    width: min(370px, calc(100vw - 24px));
    height: min(540px, calc(100dvh - 90px));
  }
}

@media (max-width: 360px) {
  .assistant-launcher {
    min-height: 44px;
    font-size: 9px;
  }

  .assistant-panel {
    width: calc(100vw - 18px);
  }
}