/* Chat assistant widget (AssistantWidget.tsx) — floating launcher + panel.
   Brand vars come from colors_and_type.css; keyframes llm-blink from index.html. */

.aw-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: 'Univers', Ebrima, sans-serif;
}

.aw-launcher {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--dakby-orange-100, #f08300);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 120ms ease, background 120ms ease;
}
.aw-launcher:hover {
  transform: scale(1.06);
  background: var(--dakby-orange-90, #f18f1a);
}

.aw-panel {
  width: min(380px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--dakby-grey-20, #d8d8d8);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.aw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--dakby-black, #000);
  color: #fff;
}
.aw-title {
  font-weight: 700;
  font-size: 15px;
}
.aw-subtitle {
  font-size: 12px;
  color: var(--dakby-orange-50, #f9c180);
  margin-top: 2px;
}
.aw-close {
  border: none;
  background: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.aw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
}

.aw-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.aw-msg-user {
  align-self: flex-end;
  background: var(--dakby-orange-100, #f08300);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.aw-msg-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--dakby-grey-10, #ececec);
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
}

.aw-link {
  color: var(--dakby-orange-100, #f08300);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aw-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--dakby-orange-100, #f08300);
  animation: llm-blink 800ms steps(2) infinite;
}

.aw-status {
  align-self: flex-start;
  font-size: 12.5px;
  color: #6e6e6d;
  font-style: italic;
  animation: llm-fade 200ms ease-out both;
}

.aw-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.aw-chip {
  text-align: left;
  border: 1px solid var(--dakby-grey-20, #d8d8d8);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.aw-chip:hover {
  border-color: var(--dakby-orange-100, #f08300);
  background: var(--dakby-orange-10, #fff2e6);
}

.aw-inputrow {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--dakby-grey-10, #ececec);
  background: #fff;
}
.aw-input {
  flex: 1;
  border: 1px solid var(--dakby-grey-20, #d8d8d8);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.aw-input:focus {
  border-color: var(--dakby-orange-100, #f08300);
}
.aw-send {
  border: none;
  background: var(--dakby-black, #000);
  color: #fff;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.aw-send:disabled {
  background: var(--dakby-grey-30, #c5c5c4);
  cursor: default;
}

.aw-disclaimer {
  padding: 6px 12px 10px;
  background: #fff;
  font-size: 11px;
  color: #9d9d9c;
  text-align: center;
}

/* Mobile: full-width sheet anchored to the bottom. */
@media (max-width: 640px) {
  .aw-root {
    right: 12px;
    bottom: 12px;
  }
  .aw-panel {
    width: calc(100vw - 24px);
    height: min(70vh, calc(100vh - 100px));
  }
}
