/* NAC_GUEST_CANONICAL_SHELL_20260801
   Supplemental rules only. The approved NAC Unified shell remains controlled by
   nac-unified-chat.css and its existing production refinements. */
#nac-unified-chat.nac-auth-gate-preview .nac-stage {
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(55, 135, 255, .08), transparent 34%),
    linear-gradient(180deg, #f8faff, #eef3fb);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-thread {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 15px 14px 22px;
  scrollbar-width: thin;
  scrollbar-color: #bdd0ea transparent;
  scroll-behavior: smooth;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 13px;
  animation: nacLocalIn .22s ease-out;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-user {
  justify-content: flex-end;
  padding-left: 48px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-assistant,
#nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-typing {
  padding-right: 34px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 1.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nac-cyan, #38d6ff), var(--nac-gold, #f5c66a));
  box-shadow: 0 5px 14px rgba(3, 16, 40, .16);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-message-body {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-user .nac-local-message-body {
  align-items: flex-end;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-speaker {
  padding-left: 5px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .01em;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-bubble {
  position: relative;
  max-width: 100%;
  min-height: 20px;
  padding: 11px 13px;
  border: 1px solid #dfe7f2;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(3, 16, 40, .085);
  color: #1b2940;
  font-size: 13px;
  line-height: 1.52;
  white-space: pre-wrap;
  word-break: break-word;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-bubble.is-typewriting::after {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  border-radius: 2px;
  background: #1769e8;
  content: '';
  vertical-align: -.12em;
  animation: nacTypeCaret .72s steps(1, end) infinite;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-user .nac-local-bubble {
  border-color: #0f5eea;
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, #0d55d3, #1463ff);
  color: #fff;
  box-shadow: 0 9px 24px rgba(15, 94, 234, .22);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-system {
  width: max-content;
  max-width: 92%;
  margin: 0 auto 14px;
  padding: 6px 10px;
  border: 1px solid #d5e1f1;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #63718a;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 13px rgba(3, 16, 40, .05);
  backdrop-filter: blur(8px);
}

#nac-unified-chat.nac-auth-gate-preview .nac-typing-bubble {
  display: inline-flex;
  width: 58px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 13px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-typing-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f84a1;
  animation: nacTypingDot 1.12s ease-in-out infinite;
}

#nac-unified-chat.nac-auth-gate-preview .nac-typing-bubble span:nth-child(2) {
  animation-delay: .14s;
}

#nac-unified-chat.nac-auth-gate-preview .nac-typing-bubble span:nth-child(3) {
  animation-delay: .28s;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-actions a,
#nac-unified-chat.nac-auth-gate-preview .nac-local-actions button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bcd0ef;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .98);
  color: #0b55d5;
  font: 800 10px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 13px rgba(22, 81, 160, .05);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-actions a:hover,
#nac-unified-chat.nac-auth-gate-preview .nac-local-actions button:hover {
  border-color: #7aa9ef;
  background: #edf5ff;
  box-shadow: 0 7px 18px rgba(22, 81, 160, .11);
  transform: translateY(-1px);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-actions .is-primary {
  border-color: #0b55d5;
  background: linear-gradient(135deg, #0b55d5, #1463ff);
  color: #fff;
  box-shadow: 0 8px 19px rgba(20, 99, 255, .2);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-actions .is-primary:hover {
  background: linear-gradient(135deg, #0847b5, #0f55db);
  color: #fff;
}

#nac-unified-chat.nac-auth-gate-preview .nac-choice-actions {
  margin-top: 7px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-choice-actions button {
  min-height: 42px;
  padding-inline: 14px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-choice-actions button:disabled {
  opacity: .58;
  cursor: default;
  transform: none;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 9px 11px;
  border-top: 1px solid #dfe7f2;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -7px 24px rgba(3, 16, 40, .035);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-composer[hidden] {
  display: none !important;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-input-wrap {
  display: block;
  min-width: 0;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-input-wrap input {
  width: 100%;
  height: 44px;
  border: 1px solid #d1ddec;
  border-radius: 15px;
  padding: 0 13px;
  background: #f9fbfe;
  color: #142033;
  font: 500 12px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  outline: 0;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-input-wrap input::placeholder {
  color: #8b98aa;
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-input-wrap input:focus {
  border-color: #8eb7ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 99, 255, .12);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b55d5, #1463ff);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(20, 99, 255, .24);
}

#nac-unified-chat.nac-auth-gate-preview .nac-local-send:hover {
  filter: brightness(1.06);
}

#nac-unified-chat.nac-auth-gate-preview .nac-auth-start {
  min-height: 44px !important;
  padding: 10px 15px !important;
  font-size: 11px !important;
}

#nac-unified-chat.nac-auth-gate-preview .nac-auth-start:disabled {
  opacity: .65;
  cursor: wait;
}

#nac-unified-chat.nac-auth-gate-preview .nac-upload {
  display: none !important;
}

#nac-unified-chat.nac-auth-gate-preview .nac-head-actions [data-action=account] {
  font-size: 16px;
}

#nac-unified-chat.nac-auth-gate-preview .nac-service-nav {
  position: relative;
  z-index: 2;
}

#nac-unified-chat.nac-auth-gate-preview .nac-quick button {
  font-weight: 700;
}

#nac-unified-chat.nac-auth-gate-preview footer button {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#nac-unified-chat.nac-auth-gate-preview .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes nacLocalIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes nacTypingDot {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes nacTypeCaret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 640px) {
  #nac-unified-chat.nac-auth-gate-preview .nac-local-thread {
    padding: 13px 11px 22px;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-assistant,
  #nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-typing {
    padding-right: 16px;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-user {
    padding-left: 38px;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-bubble {
    font-size: 13px;
    line-height: 1.48;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-actions a,
  #nac-unified-chat.nac-auth-gate-preview .nac-local-actions button {
    min-height: 42px;
    padding: 9px 12px;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-choice-actions {
    display: grid;
    width: min(100%, 310px);
    grid-template-columns: 1fr;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-choice-actions button {
    width: 100%;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-composer {
    padding-bottom: max(9px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  #nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-assistant,
  #nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-typing {
    padding-right: 4px;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-row.is-user {
    padding-left: 24px;
  }

  #nac-unified-chat.nac-auth-gate-preview .nac-local-avatar {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #nac-unified-chat.nac-auth-gate-preview .nac-local-row,
  #nac-unified-chat.nac-auth-gate-preview .nac-typing-bubble span,
  #nac-unified-chat.nac-auth-gate-preview .nac-local-bubble.is-typewriting::after {
    animation: none !important;
  }
}
