.lia-widget-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: none;
  background: #232323;
  color: #eae6dd;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sterling-font-sans, system-ui, sans-serif);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lia-widget-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.lia-widget-button-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #eae6dd;
  color: #232323;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.lia-widget-panel {
  position: fixed;
  right: 24px;
  bottom: 104px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 136px);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 9999;
  display: none;
  flex-direction: column;
  font-family: var(--sterling-font-sans, system-ui, sans-serif);
  border: 1px solid rgba(35, 35, 35, 0.08);
}

.lia-widget-panel.open {
  display: flex;
}

.lia-widget-header {
  background: #232323;
  color: #eae6dd;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lia-widget-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #eae6dd;
  color: #232323;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.lia-widget-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.lia-widget-subtitle {
  font-size: 12px;
  opacity: 0.82;
  margin: 2px 0 0 0;
}

.lia-widget-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #eae6dd;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.lia-widget-body {
  flex: 1;
  padding: 16px;
  background: #f7f5f0;
  overflow-y: auto;
}

.lia-message {
  display: flex;
  margin-bottom: 12px;
}

.lia-message.assistant {
  justify-content: flex-start;
}

.lia-message.user {
  justify-content: flex-end;
}

.lia-message-bubble {
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.lia-message.assistant .lia-message-bubble {
  background: #ffffff;
  color: #232323;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(35, 35, 35, 0.08);
}

.lia-message.user .lia-message-bubble {
  background: #232323;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.lia-widget-footer {
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid rgba(35, 35, 35, 0.08);
}

.lia-widget-input-row {
  display: flex;
  gap: 8px;
}

.lia-widget-input {
  flex: 1;
  border: 1px solid rgba(35, 35, 35, 0.18);
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}

.lia-widget-send {
  border: none;
  border-radius: 14px;
  padding: 0 16px;
  background: #232323;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.lia-widget-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lia-widget-note {
  font-size: 11px;
  color: rgba(35, 35, 35, 0.58);
  margin-top: 8px;
  line-height: 1.35;
}

.lia-typing {
  font-size: 13px;
  color: rgba(35, 35, 35, 0.6);
  padding: 4px 2px;
}

.lia-widget-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 480px) {
  .lia-widget-panel {
    right: 12px;
    bottom: 92px;
    width: calc(100vw - 24px);
    height: calc(100vh - 120px);
  }

  .lia-widget-button {
    right: 16px;
    bottom: 16px;
  }
}

.lia-widget-button-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 2px solid #eae6dd;
}

.lia-widget-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 2px solid #eae6dd;
}

.lia-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 16px 0;
}

.lia-guided-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px 0;
}

.lia-guided-structured {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(36, 88, 201, 0.18);
  border-radius: 10px;
  background: #ffffff;
}

.lia-guided-structured-title {
  color: #232323;
  font-size: 12px;
  font-weight: 700;
}

.lia-guided-structured-field {
  display: grid;
  gap: 5px;
}

.lia-guided-structured-label {
  color: #625f57;
  font-size: 11px;
  font-weight: 700;
}

.lia-guided-structured-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(35, 35, 35, 0.18);
  border-radius: 10px;
  color: #232323;
  font-size: 14px;
  padding: 8px 10px;
  outline: none;
}

.lia-guided-structured-input:focus-visible {
  border-color: #2458c9;
  box-shadow: 0 0 0 3px rgba(36, 88, 201, 0.16);
}

.lia-guided-structured-error {
  min-height: 16px;
  color: #9f1d20;
  font-size: 11px;
  line-height: 1.35;
}

.lia-guided-structured-submit {
  min-height: 40px;
  justify-self: start;
}

.lia-guided-attachment {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(36, 88, 201, 0.18);
  border-radius: 10px;
  background: #ffffff;
}

.lia-guided-attachment-label {
  color: #232323;
  font-size: 12px;
  font-weight: 700;
}

.lia-guided-attachment-input {
  width: 100%;
  color: #232323;
  font-size: 12px;
}

.lia-guided-attachment-helper {
  color: #625f57;
  font-size: 11px;
  line-height: 1.35;
}

.lia-quick-action {
  border: 1px solid rgba(35, 35, 35, 0.14);
  background: #ffffff;
  color: #232323;
  border-radius: 14px;
  padding: 10px 10px;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  text-align: center;
}

.lia-guided-control {
  border: 1px solid rgba(36, 88, 201, 0.26);
  background: #ffffff;
  color: #2458c9;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  text-align: center;
  font-weight: 700;
}

.lia-widget-note a {
  color: #232323;
  font-weight: 700;
  text-decoration: underline;
}

.lia-widget-note a:hover {
  opacity: 0.75;
}

.lia-quick-action:hover {
  background: #eae6dd;
}

.lia-guided-control:hover {
  background: rgba(36, 88, 201, 0.08);
}

.lia-quick-action:disabled,
.lia-guided-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.lia-widget-message-row {
  display: flex;
  margin-bottom: 12px;
}

.lia-widget-message-row.assistant {
  justify-content: flex-start;
}

.lia-widget-message-row.user {
  justify-content: flex-end;
}

.lia-widget-message-bubble {
  max-width: 82%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.35;
  white-space: pre-line;
  word-break: break-word;
}

.lia-widget-message-bubble.assistant {
  background: #ffffff;
  color: #232323;
  border: 1px solid rgba(35, 35, 35, 0.08);
  border-top-left-radius: 6px;
}

.lia-widget-message-bubble.user {
  background: #232323;
  color: #ffffff;
  border-top-right-radius: 6px;
}

/* Operational Lia widget visuals — inferred extension from Figma homepage grammar. */
.lia-widget-button {
  border: 1px solid var(--sterling-gold);
  background: var(--sterling-bg-card);
  color: var(--sterling-gold);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
  font-family: var(--font-body);
}

.lia-widget-button-avatar {
  background: var(--sterling-gold);
  color: var(--sterling-bg-page);
}

.lia-widget-panel {
  border: 1px solid var(--sterling-border-strong);
  border-radius: 20px;
  background: var(--sterling-bg-card);
  color: var(--sterling-text-primary);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .48);
  font-family: var(--font-body);
}

.lia-widget-header {
  border-bottom: 1px solid var(--sterling-border);
  background: var(--sterling-bg-deep);
  color: var(--sterling-text-primary);
}

.lia-widget-avatar {
  border: 1px solid var(--sterling-gold);
  background: var(--sterling-bg-elevated);
  color: var(--sterling-gold);
}

.lia-widget-body {
  background: var(--sterling-bg-page);
}

.lia-message.assistant .lia-message-bubble,
.lia-widget-message-bubble.assistant {
  border-color: var(--sterling-border);
  background: var(--sterling-bg-elevated);
  color: var(--sterling-text-primary);
}

.lia-message.user .lia-message-bubble,
.lia-widget-message-bubble.user {
  background: var(--sterling-teal);
  color: var(--sterling-text-primary);
}

.lia-widget-footer {
  border-top-color: var(--sterling-border);
  background: var(--sterling-bg-card);
}

.lia-widget-input,
.lia-guided-structured-input {
  border-color: var(--sterling-border);
  border-radius: var(--radius-sm);
  background: var(--sterling-bg-elevated);
  color: var(--sterling-text-primary);
}

.lia-widget-input:focus-visible,
.lia-guided-structured-input:focus-visible {
  border-color: var(--sterling-gold);
  box-shadow: 0 0 0 3px rgba(200, 184, 148, .14);
}

.lia-widget-send,
.lia-guided-structured-submit {
  border: 1px solid var(--sterling-gold);
  border-radius: var(--radius-sm);
  background: var(--sterling-gold);
  color: var(--sterling-bg-page);
}

.lia-widget-note,
.lia-typing,
.lia-guided-structured-label,
.lia-guided-attachment-helper {
  color: var(--sterling-text-secondary);
}

.lia-guided-structured-title,
.lia-guided-attachment-label {
  color: var(--sterling-text-primary);
}

.lia-guided-structured-error {
  color: #ffb1b1;
}

.lia-guided-attachment,
.lia-quick-action,
.lia-guided-control {
  border-color: var(--sterling-border);
  background: var(--sterling-bg-elevated);
  color: var(--sterling-text-primary);
}

.lia-guided-control {
  border-color: var(--sterling-gold);
  color: var(--sterling-gold-soft);
}

.lia-widget-note a {
  color: var(--sterling-gold-soft);
}

@media (max-width: 520px) {
  .lia-widget-panel {
    right: 12px;
    width: calc(100vw - 24px);
  }
}
