:root {
  --pna-primary: #2563EB;
  --pna-accent: #1D4ED8;
  --pna-panel-width: 380px;
  --pna-launcher-size: 60px;
}

.pna-widget-root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #0F172A;
  line-height: 1.5;
}

/* ============================================================
   LAUNCHER FLOATING ACTION BUTTON
   ============================================================ */
.pna-widget-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--pna-launcher-size, 60px);
  min-height: var(--pna-launcher-size, 60px);
  padding: 0 20px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pna-primary, #2563EB) 0%, var(--pna-accent, #1D4ED8) 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.45), 0 4px 10px -2px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  overflow: hidden;
}

.pna-widget-launcher.pna-pos-left {
  right: auto;
  left: 24px;
}

.pna-widget-launcher:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px -4px rgba(37, 99, 235, 0.55), 0 6px 14px -2px rgba(15, 23, 42, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.pna-widget-launcher:active {
  transform: translateY(0) scale(0.98);
}

.pna-widget-launcher:focus-visible,
.pna-close-btn:focus-visible,
.pna-send-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 3px;
}

/* Launcher Icon Container with Cross-fade */
.pna-launcher-icon-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pna-launcher-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}

.pna-icon-chat {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.pna-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Launcher Text */
.pna-launcher-label {
  white-space: nowrap;
  font-weight: 600;
  color: #FFFFFF;
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, transform 0.25s ease;
  max-width: 200px;
}

/* Launcher Online Pulse Indicator */
.pna-launcher-pulse {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.pna-launcher-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.6);
  animation: pna-pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pna-pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* State when Chatbox is Open: HIDE launcher completely — only header × is the close button */
.pna-widget-launcher.pna-is-open {
  opacity: 0;
  transform: scale(0.6) translateY(8px);
  pointer-events: none;
  visibility: hidden;
}


/* ============================================================
   CHATBOX WINDOW
   ============================================================ */
.pna-chatbox-window {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  width: min(var(--pna-panel-width, 380px), calc(100vw - 32px));
  height: min(580px, calc(100vh - 110px));
  overflow: visible;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.05), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  pointer-events: none;
}

.pna-chatbox-window.pna-pos-left {
  right: auto;
  left: 24px;
  transform-origin: bottom left;
}

.pna-chatbox-window.pna-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ============================================================
   HEADER
   ============================================================ */
.pna-chat-header {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  color: #FFFFFF;
  border-top-left-radius: 19px;
  border-top-right-radius: 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  position: relative;
}

.pna-chat-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pna-bot-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #4F46E5 0%, #2563EB 50%, #0EA5E9 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25), 0 6px 16px rgba(37, 99, 235, 0.35);
  color: #FFFFFF;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.pna-bot-avatar svg {
  display: block;
  margin: auto;
  pointer-events: none;
}

.pna-bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pna-chat-titles {
  display: flex;
  flex-direction: column;
}

.pna-bot-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.pna-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #94A3B8;
  font-size: 11.5px;
  font-weight: 500;
}

.pna-status::before {
  content: "";
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* Close button — absolute floating at top-right corner of chatbox panel */
.pna-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0F172A;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 100005;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  line-height: 0;
}

.pna-close-btn:hover {
  background: #DC2626;
  border-color: #FFFFFF;
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
}

.pna-close-btn:active {
  transform: scale(0.96);
}

.pna-close-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
  pointer-events: none;
  stroke: #FFFFFF;
  stroke-width: 2.5;
}

/* ============================================================
   MESSAGE BODY
   ============================================================ */
.pna-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 12px;
  background: #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

/* ============================================================
   QUICK REPLY CHIPS
   ============================================================ */
.pna-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px 0;
  animation: pna-fade-in 0.35s ease both;
}

@keyframes pna-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pna-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 8px 14px;
  border: 1.5px solid #BFDBFE;
  border-radius: 20px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.pna-chip:hover {
  background: #DBEAFE;
  border-color: #93C5FD;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.pna-chip:active {
  transform: translateX(0);
}

.pna-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.pna-chat-messages::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.pna-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.pna-attach-btn { border: 0; background: transparent; color: var(--pna-accent); font-size: 18px; width: 34px; height: 34px; cursor: pointer; border-radius: 10px; }
.pna-attach-btn:hover, .pna-attach-btn:focus-visible { background: rgba(37,99,235,.1); }
.pna-emoji-btn { border: 0; background: transparent; font-size: 18px; width: 34px; height: 34px; cursor: pointer; border-radius: 10px; }
.pna-emoji-btn:hover, .pna-emoji-btn:focus-visible { background: rgba(37,99,235,.1); }
.pna-emoji-panel { position: absolute; bottom: 72px; right: 14px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 10px; width: 250px; border: 1px solid #dbe4f0; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(15,23,42,.16); z-index: 5; }
.pna-emoji-panel[hidden] { display: none; }
.pna-emoji-panel button { border: 0; background: transparent; font-size: 21px; border-radius: 8px; padding: 4px; cursor: pointer; }
.pna-emoji-panel button:hover, .pna-emoji-panel button:focus-visible { background: #eff6ff; }
.pna-staging-tray { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 14px 0; }
.pna-staged-file { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 7px; border: 1px solid #dbe4f0; border-radius: 9px; background: #f8fafc; font-size: 11px; color: #334155; }
.pna-staged-file img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }
.pna-staged-file span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pna-staged-file button { border: 0; background: transparent; color: #64748b; cursor: pointer; font-size: 16px; }

.pna-msg {
  max-width: 82%;
  padding: 11px 15px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.pna-msg-bot {
  align-self: flex-start;
  border: 1px solid #E2E8F0;
  border-radius: 16px 16px 16px 4px;
  background: #FFFFFF;
  color: #1E293B;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.pna-msg-user {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, var(--pna-primary, #2563EB) 0%, var(--pna-accent, #1D4ED8) 100%);
  color: #FFFFFF;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.pna-msg-error {
  align-self: flex-start;
  border: 1px solid #FECACA;
  border-radius: 14px;
  background: #FEF2F2;
  color: #991B1B;
  font-size: 13px;
}

/* Typing Indicator (3 animated dots) */
.pna-msg-loading {
  align-self: flex-start;
  border: 1px solid #E2E8F0;
  border-radius: 16px 16px 16px 4px;
  background: #FFFFFF;
  padding: 12px 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.pna-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pna-typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pna-primary, #2563EB);
  display: inline-block;
  animation: pna-typing-bounce 1.4s infinite ease-in-out both;
}

.pna-typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.pna-typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

.pna-typing-indicator span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes pna-typing-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* ============================================================
   COMPOSER (PHƯƠNG ÁN 2: INTEGRATED ACTION BAR)
   ============================================================ */
.pna-widget-root .pna-composer {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 10px 14px 12px !important;
  border-top: 1px solid #E2E8F0 !important;
  background: #FFFFFF !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

/* Staging Tray for Attachments */
.pna-staging-tray {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.pna-staging-tray[hidden] {
  display: none !important;
}

.pna-staged-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
  max-width: 180px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.pna-staged-thumb {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}

.pna-staged-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--pna-primary, #2563EB);
}

.pna-staged-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 105px;
  font-size: 12px;
}

.pna-staged-remove {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pna-staged-remove:hover {
  color: #EF4444;
  background: #FEE2E2;
}

/* Unified Capsule Shell */
.pna-widget-root .pna-composer-shell {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 4px 6px 4px 16px !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 999px !important;
  background: #F8FAFC !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  gap: 6px !important;
}

.pna-widget-root .pna-composer-shell:focus-within {
  background: #FFFFFF !important;
  border-color: var(--pna-primary, #2563EB) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

.pna-widget-root .pna-composer-shell input,
.pna-widget-root .pna-composer-shell input[type="text"],
.pna-widget-root .pna-composer-input {
  min-width: 0 !important;
  flex: 1 !important;
  height: 38px !important;
  line-height: 38px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0F172A !important;
  font-family: inherit !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  display: block !important;
}

.pna-widget-root .pna-composer-shell input::placeholder,
.pna-widget-root .pna-composer-shell input[type="text"]::placeholder,
.pna-widget-root .pna-composer-input::placeholder {
  color: #94A3B8 !important;
  line-height: normal !important;
}

.pna-widget-root .pna-composer-shell input:focus,
.pna-widget-root .pna-composer-shell input[type="text"]:focus,
.pna-widget-root .pna-composer-shell input[type="text"]:focus-visible,
.pna-widget-root .pna-composer-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Actions cluster (Right side: Attach, Emoji, Send) */
.pna-composer-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

.pna-action-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #64748B !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: none !important;
}

.pna-action-btn:hover {
  background: #EFF6FF !important;
  color: var(--pna-primary, #2563EB) !important;
}

.pna-action-btn:active {
  transform: scale(0.92) !important;
}

.pna-action-btn svg {
  width: 19px !important;
  height: 19px !important;
  display: block !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  pointer-events: none !important;
}

.pna-send-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--pna-primary, #2563EB) 0%, var(--pna-accent, #1D4ED8) 100%) !important;
  color: #FFFFFF !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 0 0 2px !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
}

.pna-send-btn svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  margin: auto !important;
  pointer-events: none !important;
  stroke: #FFFFFF !important;
  stroke-width: 2.5 !important;
}

.pna-send-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.45) !important;
}

.pna-send-btn:active {
  transform: scale(0.94) !important;
}

.pna-send-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Popover Emoji Picker */
.pna-emoji-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 12px;
  width: 320px;
  max-width: calc(100% - 24px);
  height: 270px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  animation: pna-popover-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.pna-emoji-picker[hidden] {
  display: none !important;
}

@keyframes pna-popover-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pna-emoji-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #F1F5F9;
  background: #F8FAFC;
  padding: 6px 8px;
  gap: 4px;
}

.pna-emoji-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}

.pna-emoji-tab:hover {
  background: #E2E8F0;
}

.pna-emoji-tab.pna-active {
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.pna-emoji-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px;
}

.pna-emoji-section {
  display: none;
}

.pna-emoji-section.pna-active {
  display: block;
}

.pna-emoji-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 2px 8px;
}

.pna-emoji-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 3px !important;
  justify-items: center !important;
  align-items: center !important;
}

.pna-widget-root .pna-emoji-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 20px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif !important;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background 0.12s ease !important;
}

.pna-widget-root .pna-emoji-item:hover {
  background: #F1F5F9 !important;
  transform: scale(1.22) !important;
}

.pna-widget-root .pna-emoji-item img.emoji {
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  vertical-align: middle !important;
  pointer-events: none !important;
}

/* Rich Media in Chat Bubbles */
.pna-msg-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.pna-msg-img-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.04);
}

.pna-msg-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.pna-msg-img-wrap:hover img {
  transform: scale(1.05);
}

.pna-msg-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: inherit;
  margin-bottom: 6px;
}

.pna-msg-bot .pna-msg-file-card {
  background: #F1F5F9;
  border-color: #E2E8F0;
  color: #0F172A;
}

.pna-msg-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--pna-primary, #2563EB);
  flex-shrink: 0;
}

.pna-msg-bot .pna-msg-file-icon {
  background: #E0E7FF;
  color: #3730A3;
}

.pna-msg-file-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pna-msg-file-name {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.pna-msg-file-size {
  font-size: 11px;
  opacity: 0.75;
}

/* Lightbox Modal */
.pna-lightbox-modal {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 20px;
  animation: pna-fade-in 0.15s ease;
}

.pna-lightbox-modal[hidden] {
  display: none !important;
}

.pna-lightbox-img {
  max-width: 100%;
  max-height: 88%;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  object-fit: contain;
}

.pna-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.pna-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
}


/* ============================================================
   PRIVACY & SECURITY NOTE
   ============================================================ */
.pna-privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px 10px;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  border-bottom-left-radius: 19px;
  border-bottom-right-radius: 19px;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  flex-shrink: 0;
  overflow: hidden;
}

.pna-privacy-note svg {
  color: #94A3B8;
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ============================================================ */
@media (max-width: 560px) {
  .pna-widget-launcher {
    right: 16px;
    bottom: 16px;
    height: 50px;
    min-height: 50px;
    width: 50px;
    min-width: 50px;
    padding: 0;
    justify-content: center;
  }

  .pna-widget-launcher.pna-pos-left {
    left: 16px;
    right: auto;
  }

  .pna-launcher-label {
    display: none !important;
  }

  .pna-launcher-pulse {
    position: absolute;
    top: 11px;
    right: 11px;
  }

  .pna-chatbox-window {
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: 10px;
    width: auto;
    height: auto;
    border-radius: 18px;
    transform-origin: bottom right;
  }

  .pna-chatbox-window.pna-pos-left {
    transform-origin: bottom left;
  }
}

/* ============================================================
   ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .pna-widget-launcher,
  .pna-chatbox-window,
  .pna-launcher-icon,
  .pna-launcher-label,
  .pna-send-btn,
  .pna-close-btn {
    transition: none !important;
    animation: none !important;
  }

  .pna-launcher-pulse::after {
    animation: none !important;
  }

  .pna-typing-indicator span {
    animation: none !important;
    opacity: 0.7;
  }
}
