.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: 'futura-lt-w01-light', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.chat-widget__trigger {
  --chat-btn-bg: #a3b8b4;
  --chat-btn-bg-hover: rgba(163, 184, 180, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  max-width: 340px;
  height: 56px;
  padding: 0 22px 0 12px;
  border: none;
  border-radius: 30px;
  background: var(--chat-btn-bg);
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 3px 0 hsla(0, 1.4%, 71%, 0.5);
  transition: background 0.2s ease;
}

.chat-widget__trigger:hover {
  background: var(--chat-btn-bg-hover);
}

.chat-widget__trigger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.chat-widget__trigger-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.chat-widget__trigger-label {
  margin-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-widget__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(360px, calc(100vw - 48px));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 120px));
}

.chat-widget__panel[hidden] {
  display: none;
}

.chat-widget__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #eee;
}

.chat-widget__header-text {
  min-width: 0;
}

.chat-widget__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}

.chat-widget__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

.chat-widget__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dbb5d;
  flex-shrink: 0;
}

.chat-widget__close {
  border: none;
  background: transparent;
  color: #888;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.chat-widget__close:hover {
  color: #333;
}

.chat-widget__messages {
  flex: 1;
  min-height: 200px;
  padding: 16px;
  background: #f4f4f4;
  overflow-y: auto;
}

.chat-widget__placeholder {
  margin: 0;
  font-size: 14px;
  color: #888;
  text-align: center;
  padding-top: 40px;
}

.chat-widget__notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef5f2;
  color: #3d5a52;
  font-size: 13px;
  line-height: 1.4;
}

.chat-widget__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #eee;
  background: #fff;
}

.chat-widget__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background: transparent;
  min-width: 0;
}

.chat-widget__input::placeholder {
  color: #aaa;
}

.chat-widget__input:disabled {
  opacity: 0.7;
}

.chat-widget__icon-btn {
  border: none;
  background: transparent;
  color: #999;
  cursor: default;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-widget__icon-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .chat-widget {
    right: 16px;
    bottom: 16px;
  }

  .chat-widget__trigger {
    min-width: 180px;
    height: 52px;
    padding: 0 20px 0 12px;
    font-size: 17px;
  }

  .chat-widget__trigger-icon {
    width: 24px;
    height: 24px;
  }

  .chat-widget__trigger-label {
    margin-left: 8px;
  }
}
