.lmat-assistant {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  font-family: inherit;
}

.lmat-assistant-launcher {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 7px;
  color: #fff;
  background: #17191a;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.lmat-assistant-launcher > span,
.lmat-assistant-panel header div > span {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6fff5f;
  box-shadow: 0 0 0 4px rgba(111, 255, 95, 0.13);
}

.lmat-assistant.is-open .lmat-assistant-launcher {
  visibility: hidden;
}

.lmat-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(390px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  background: #0f1112;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.lmat-assistant-panel[hidden] {
  display: none;
}

.lmat-assistant-panel header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #151718;
}

.lmat-assistant-panel header > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 10px;
}

.lmat-assistant-panel header div > span {
  grid-row: 1 / span 2;
}

.lmat-assistant-panel header strong {
  font-size: 0.83rem;
}

.lmat-assistant-panel header small {
  color: rgba(255, 255, 255, 0.43);
  font-size: 0.65rem;
}

.lmat-assistant-panel header > button {
  width: 34px;
  height: 34px;
  border: 0;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
}

.lmat-assistant-messages {
  height: 270px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
}

.lmat-assistant-message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.lmat-assistant-message.user {
  align-self: flex-end;
  color: #08130e;
  background: #74d5a5;
}

.lmat-assistant-message.human-agent {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: flex-start;
  max-width: 92%;
}

.lmat-assistant-agent-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.lmat-assistant-agent-body {
  display: grid;
  gap: 3px;
}

.lmat-assistant-agent-body small {
  color: #74d5a5;
  font-size: 0.64rem;
  font-weight: 700;
}

.lmat-assistant-message.status {
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  font-size: 0.7rem;
}

.lmat-assistant-quick {
  min-height: 62px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lmat-assistant-quick button {
  min-width: 138px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  line-height: 1.3;
}

.lmat-assistant-chat-form {
  display: grid;
  gap: 7px;
  padding: 10px 14px 8px;
}

.lmat-assistant-chat-form > label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.66rem;
}

.lmat-assistant-chat-form > div {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.lmat-assistant-chat-form textarea {
  width: 100%;
  min-height: 46px;
  max-height: 90px;
  padding: 10px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  outline: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 0.78rem;
}

.lmat-assistant-chat-form button,
.lmat-assistant-handoff-actions button:last-child {
  border: 0;
  border-radius: 6px;
  color: #07130d;
  background: #6fff5f;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.lmat-assistant-chat-form button {
  font-size: 1rem;
}

.lmat-assistant-human {
  width: calc(100% - 28px);
  min-height: 34px;
  margin: 0 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
}

.lmat-assistant-feedback {
  display: grid;
  gap: 10px;
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.lmat-assistant-feedback[hidden] {
  display: none;
}

.lmat-assistant-feedback p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.lmat-assistant-feedback > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lmat-assistant-feedback button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 780;
}

.lmat-assistant-feedback button:first-child {
  color: #07130d;
  background: #6fff5f;
}

.lmat-assistant-botcheck {
  position: absolute;
  inset: 62px 0 0;
  overflow-y: auto;
  padding: 17px;
  background: #101213;
}

.lmat-assistant-botcheck[hidden] {
  display: none;
}

.lmat-assistant-botcheck p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.5;
}

.lmat-assistant-botcheck label {
  display: grid;
  gap: 7px;
}

.lmat-assistant-botcheck label span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
}

.lmat-assistant-botcheck input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  outline: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 0.78rem;
}

.lmat-assistant-handoff {
  position: absolute;
  inset: 62px 0 0;
  overflow-y: auto;
  padding: 17px;
  background: #101213;
}

.lmat-assistant-handoff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lmat-assistant-handoff label {
  display: grid;
  gap: 6px;
}

.lmat-assistant-handoff label.wide {
  grid-column: 1 / -1;
}

.lmat-assistant-handoff label > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.67rem;
}

.lmat-assistant-handoff input,
.lmat-assistant-handoff select {
  width: 100%;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  outline: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 0.75rem;
}

.lmat-assistant-handoff .lmat-assistant-consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  margin-top: 16px;
}

.lmat-assistant-consent input {
  width: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  accent-color: #6fff5f;
}

.lmat-assistant-handoff-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 18px;
}

.lmat-assistant-handoff-actions button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
}

.lmat-assistant-handoff-actions button:last-child {
  color: #07130d;
}

@media (max-width: 520px) {
  .lmat-assistant {
    right: 10px;
    bottom: 10px;
  }

  .lmat-assistant-panel {
    width: calc(100vw - 20px);
    height: calc(100svh - 20px);
  }

  .lmat-assistant-messages {
    height: calc(100svh - 350px);
    min-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lmat-assistant * {
    scroll-behavior: auto;
  }
}
