.chef-assistant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  font-family: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chef-assistant * {
  box-sizing: border-box;
}

.chef-assistant__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(255, 184, 104, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a2a 0%, #ff6417 100%);
  color: #17110c;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

.chef-assistant__toggle:hover,
.chef-assistant__toggle:focus-visible {
  filter: brightness(1.06);
  outline: 3px solid rgba(255, 184, 104, 0.35);
}

.chef-assistant__avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  border: 3px solid rgba(255, 255, 255, 0.86);
  background: #1b1d23;
}

.chef-assistant__toggle-text {
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1;
}

.chef-assistant__toggle-title {
  font-size: 1rem;
  font-weight: 700;
}

.chef-assistant__toggle-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.86;
}

.chef-assistant__panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(650px, calc(100vh - 112px));
  display: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(27, 29, 35, 0.98);
  color: var(--text, #e8e8ea);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.chef-assistant.is-open .chef-assistant__panel {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
}

.chef-assistant__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chef-assistant__header-text {
  min-width: 0;
  flex: 1;
}

.chef-assistant__title {
  margin: 0;
  font-size: 1.05rem;
}

.chef-assistant__status {
  margin: 2px 0 0;
  color: var(--muted, #aaa);
  font-size: 0.88rem;
}

.chef-assistant__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #e8e8ea);
  cursor: pointer;
  font-size: 1.2rem;
}

.chef-assistant__messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}

.chef-assistant__message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.38;
  white-space: pre-wrap;
}

.chef-assistant__message--chef {
  justify-self: start;
  background: rgba(255, 255, 255, 0.08);
  border-top-left-radius: 4px;
}

.chef-assistant__message--user {
  justify-self: end;
  background: rgba(255, 122, 26, 0.96);
  color: #17110c;
  border-top-right-radius: 4px;
}

.chef-assistant__message--limit {
  display: grid;
  gap: 10px;
  max-width: 94%;
}

.chef-assistant__payment-title {
  margin: 0;
  font-weight: 700;
}

.chef-assistant__payment-text,
.chef-assistant__payment-note {
  margin: 0;
}

.chef-assistant__payment-note {
  color: var(--muted, #aaa);
  font-size: 0.9rem;
}

.chef-assistant__products {
  display: grid;
  gap: 6px;
}

.chef-assistant__product {
  display: block;
  padding: 7px 8px;
  border: 1px solid rgba(255, 122, 26, 0.22);
  border-radius: 8px;
  background: rgba(255, 122, 26, 0.09);
  font-size: 0.9rem;
}

.chef-assistant__payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--brand, #ff7a1a);
  color: #17110c;
  font-weight: 700;
  text-decoration: none;
}

.chef-assistant__payment-link:hover,
.chef-assistant__payment-link:focus-visible,
.chef-assistant__catering-link:hover,
.chef-assistant__catering-link:focus-visible {
  filter: brightness(1.06);
  outline: 3px solid rgba(255, 184, 104, 0.28);
}

.chef-assistant__catering-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 122, 26, 0.44);
  border-radius: 12px;
  color: var(--text, #e8e8ea);
  font-weight: 700;
  text-decoration: none;
}

.chef-assistant__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}

.chef-assistant__suggestion {
  border: 1px solid rgba(255, 122, 26, 0.38);
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.12);
  color: var(--text, #e8e8ea);
  padding: 8px 10px;
  cursor: pointer;
}

.chef-assistant__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chef-assistant__input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #e8e8ea);
  padding: 11px 12px;
  font: inherit;
}

.chef-assistant__send {
  border: 0;
  border-radius: 12px;
  background: var(--brand, #ff7a1a);
  color: #17110c;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.chef-assistant__send:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 560px) {
  .chef-assistant {
    right: 14px;
    bottom: 14px;
  }

  .chef-assistant__toggle-text {
    display: none;
  }

  .chef-assistant__toggle {
    min-height: 64px;
    padding: 6px;
  }

  .chef-assistant__panel {
    bottom: 76px;
  }
}
