/* About-Nick chat dialog - styled to match the site's dark (#333) menu bar. */
.acn-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10, 12, 20, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.acn-overlay[hidden] { display: none; }
.acn-open, .acn-open body { overflow: hidden; }

.acn-dialog {
  width: 100%; max-width: 560px; height: min(640px, calc(100vh - 32px));
  background: #fff; color: #222; border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; overflow: hidden;
  animation: acn-in 0.16s ease-out;
}
@keyframes acn-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.acn-head {
  background: #333; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
.acn-title { font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.acn-close {
  background: none; border: 0; color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.acn-close:hover, .acn-close:focus-visible { background: #111; outline: none; }

.acn-log {
  flex: 1; overflow-y: auto; padding: 16px;
  background: #f6f6f7; display: flex; flex-direction: column; gap: 10px;
}
.acn-msg {
  max-width: 85%; padding: 10px 13px; border-radius: 12px;
  font-size: 15px; line-height: 1.5; word-wrap: break-word; box-sizing: border-box;
}
.acn-msg p { margin: 0 0 8px; }
.acn-msg p:last-child { margin-bottom: 0; }
.acn-bot { align-self: flex-start; background: #fff; border: 1px solid #e3e3e6; border-bottom-left-radius: 4px; }
.acn-user { align-self: flex-end; background: #333; color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.acn-error { border-color: #e7b4b4; background: #fff6f6; color: #8a1f1f; }

.acn-sources { margin-top: 8px; font-size: 13px; color: #666; }
.acn-sources a { color: #1a5fb4; text-decoration: none; }
.acn-sources a:hover { text-decoration: underline; }

.acn-typing { display: flex; gap: 5px; padding: 14px 16px; }
.acn-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #999;
  animation: acn-dot 1.1s infinite ease-in-out;
}
.acn-typing span:nth-child(2) { animation-delay: 0.15s; }
.acn-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes acn-dot { 0%, 80%, 100% { opacity: 0.25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.acn-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e3e3e6; background: #fff; }
.acn-input {
  flex: 1; resize: none; font: inherit; font-size: 15px; line-height: 1.4;
  padding: 9px 11px; border: 1px solid #c9c9cf; border-radius: 8px; color: #222; background: #fff;
}
.acn-input:focus { outline: none; border-color: #333; box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.15); }
.acn-send {
  background: #333; color: #fff; border: 0; border-radius: 8px;
  padding: 0 18px; font: inherit; font-size: 15px; cursor: pointer;
}
.acn-send:hover { background: #111; }
.acn-send:disabled, .acn-input:disabled { opacity: 0.55; cursor: default; }

.acn-foot { font-size: 11.5px; color: #888; padding: 0 14px 10px; background: #fff; }

@media (max-width: 480px) {
  .acn-overlay { padding: 0; }
  .acn-dialog { max-width: none; height: 100vh; border-radius: 0; }
  .acn-msg { max-width: 92%; }
}
