.stregatto-ai,
.stregatto-ai * {
  box-sizing: border-box;
}

.stregatto-ai {
  --stregatto-accent: #ef4e38;
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 99990;
  font-family: inherit;
}

.stregatto-ai__launcher {
  min-width: 150px;
  min-height: 54px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--stregatto-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
  transition: transform .18s ease, box-shadow .18s ease;
}

.stregatto-ai__launcher:hover,
.stregatto-ai__launcher:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .28);
  outline: 3px solid rgba(255, 255, 255, .9);
  outline-offset: 2px;
}

.stregatto-ai__panel {
  position: absolute;
  left: 0;
  bottom: 76px;
  width: min(370px, calc(100vw - 28px));
  max-height: min(590px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  color: #2f2f34;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .28);
  border: 1px solid rgba(0, 0, 0, .08);
}

.stregatto-ai__panel[hidden] {
  display: none;
}

.stregatto-ai__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--stregatto-accent);
  color: #fff;
}

.stregatto-ai__header strong,
.stregatto-ai__header small {
  display: block;
}

.stregatto-ai__header strong {
  font-size: 17px;
}

.stregatto-ai__header small {
  margin-top: 2px;
  opacity: .88;
}

.stregatto-ai__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.stregatto-ai__messages {
  min-height: 180px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  background: #f7f7f9;
}

.stregatto-ai__message {
  width: fit-content;
  max-width: 87%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.stregatto-ai__message--bot {
  background: #fff;
  border: 1px solid #e8e8ec;
  border-bottom-left-radius: 4px;
}

.stregatto-ai__message--user {
  margin-left: auto;
  background: var(--stregatto-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.stregatto-ai__quick {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 12px 2px;
  background: #fff;
}

.stregatto-ai__quick button {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--stregatto-accent) 45%, #fff);
  border-radius: 999px;
  background: #fff;
  color: #333;
  padding: 7px 11px;
  cursor: pointer;
  font-size: 12px;
}

.stregatto-ai__quick button:hover,
.stregatto-ai__quick button:focus-visible {
  background: color-mix(in srgb, var(--stregatto-accent) 10%, #fff);
}

.stregatto-ai__form {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #fff;
}

.stregatto-ai__form input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9d9df;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  color: #28282d;
  background: #fff;
}

.stregatto-ai__form input:focus {
  border-color: var(--stregatto-accent);
  outline: 2px solid color-mix(in srgb, var(--stregatto-accent) 20%, transparent);
}

.stregatto-ai__form button {
  border: 0;
  border-radius: 12px;
  background: var(--stregatto-accent);
  color: #fff;
  font-size: 21px;
  cursor: pointer;
}

.stregatto-ai__form button:disabled,
.stregatto-ai__form input:disabled {
  opacity: .62;
  cursor: wait;
}

.stregatto-ai__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 13px 12px;
  background: #fff;
  color: #777;
  font-size: 10px;
}

.stregatto-ai__footer a {
  color: var(--stregatto-accent);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 600px) {
  .stregatto-ai {
    left: 14px;
    bottom: 14px;
  }

  .stregatto-ai__launcher {
    min-width: 138px;
    min-height: 50px;
    padding: 12px 18px;
    font-size: 15px;
  }

  .stregatto-ai__panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 82px;
    width: auto;
    max-height: calc(100vh - 105px);
  }
}
