
.seno-chat {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  font-family: inherit;
}

.seno-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(22rem, calc(100vw - 2rem));
  height: min(32rem, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(15, 40, 48, 0.1);
  background: #fff;
  color: #0f2830;
  box-shadow: 0 18px 40px rgba(6, 40, 48, 0.18);
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  overflow: hidden;
}

.seno-chat.is-open .seno-chat-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.seno-chat-head {
  padding: 0.95rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(15, 40, 48, 0.08);
  flex-shrink: 0;
}

.seno-chat-title {
  margin: 0 0 0.15rem;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.seno-chat-lead {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #5a6b72;
}

.seno-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(180deg, #f7fafb 0%, #fff 40%);
}

.seno-chat-bubble {
  max-width: 92%;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.seno-chat-bubble strong {
  font-weight: 700;
}

.seno-chat-bubble em {
  font-style: italic;
}

.seno-chat-bubble--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(15, 40, 48, 0.08);
  border-bottom-left-radius: 5px;
}

.seno-chat-bubble--user {
  align-self: flex-end;
  background: #ef6c45;
  color: #fff;
  border-bottom-right-radius: 5px;
}

.seno-chat-bubble.is-thinking {
  color: #5a6b72;
  font-style: italic;
}

.seno-chat-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid rgba(15, 40, 48, 0.08);
  flex-shrink: 0;
}

.seno-chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(15, 40, 48, 0.14);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: inherit;
}

.seno-chat-input:focus {
  outline: none;
  border-color: rgba(239, 108, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 108, 69, 0.15);
}

.seno-chat-send {
  appearance: none;
  width: 2.6rem;
  height: 2.6rem;
  border: none;
  border-radius: 999px;
  background: #ef6c45;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.seno-chat-send:disabled {
  opacity: 0.55;
  cursor: default;
}

.seno-chat-send svg {
  width: 1.15rem;
  height: 1.15rem;
}

.seno-chat-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  justify-content: center;
  padding: 0.35rem 0.75rem 0.7rem;
  flex-shrink: 0;
}

.seno-chat-contacts a {
  font-size: 0.75rem;
  font-weight: 650;
  color: #5a6b72;
  text-decoration: none;
}

.seno-chat-contacts a:hover {
  color: #ef6c45;
}

.seno-chat-fab {
  appearance: none;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 999px;
  background: #ef6c45;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(239, 108, 69, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.seno-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(239, 108, 69, 0.48);
}

.seno-chat-fab:focus-visible {
  outline: 2px solid #0f2830;
  outline-offset: 3px;
}

.seno-chat-fab svg {
  width: 1.45rem;
  height: 1.45rem;
}

.seno-chat-fab .seno-chat-icon-close {
  display: none;
}

.seno-chat.is-open .seno-chat-fab .seno-chat-icon-open {
  display: none;
}

.seno-chat.is-open .seno-chat-fab .seno-chat-icon-close {
  display: block;
}

[data-mode='dark'] .seno-chat-panel {
  background: #15262c;
  color: #f4fbfc;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

[data-mode='dark'] .seno-chat-head,
[data-mode='dark'] .seno-chat-form {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-mode='dark'] .seno-chat-lead,
[data-mode='dark'] .seno-chat-contacts a,
[data-mode='dark'] .seno-chat-bubble.is-thinking {
  color: rgba(244, 251, 252, 0.65);
}

[data-mode='dark'] .seno-chat-messages {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, #15262c 45%);
}

[data-mode='dark'] .seno-chat-bubble--assistant {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-mode='dark'] .seno-chat-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f4fbfc;
}

@media (max-width: 560px) {
  .seno-chat {
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .seno-chat-panel {
    height: min(70vh, 32rem);
  }

  .seno-chat-fab {
    width: 3.25rem;
    height: 3.25rem;
  }
}
