.chat-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.chat-new-dialog,
.widget-panel-head .chat-new-dialog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #b8c9c1;
  border-radius: 999px;
  background: transparent;
  color: #194f42;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.chat-new-dialog:hover { background: #e5eee8; }
.chat-new-dialog:focus-visible { outline: 2px solid #194f42; outline-offset: 3px; }
.chat-new-dialog:disabled { opacity: .55; cursor: wait; }
.chat-new-dialog-error { margin: 0; padding: 10px 16px; color: #9a3828; font-size: 14px; }
.chat-new-dialog-error[hidden] { display: none; }

.chat-new-dialog-confirm {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #b8c9c1;
  border-radius: 20px;
  color: #18332d;
  background: #fffdf8;
  box-shadow: 0 24px 72px rgba(15, 47, 39, .25);
}
.chat-new-dialog-confirm::backdrop { background: rgba(15, 47, 39, .42); }
.chat-new-dialog-confirm h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
.chat-new-dialog-confirm p { margin: 0 0 20px; font-size: 15px; line-height: 1.5; }
.chat-reset-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.chat-reset-accept { color: #fffdf8; background: #194f42; border-color: #194f42; }
.chat-reset-accept:hover { background: #24634f; }

.widget-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.widget-panel-head > .widget-panel-actions { display: contents; }
.widget-panel-actions .chat-new-dialog { grid-row: 2; grid-column: 1; justify-self: start; }
.widget-panel-actions [data-widget-close] { grid-row: 1; grid-column: 2; }

@media (max-width: 600px) {
  .chat-shell-header { flex-wrap: wrap; gap: 12px; }
  .chat-shell-actions { width: 100%; justify-content: space-between; }
}
