/* ============================================
   Praxia Chatbox · estilos
   Un solo archivo, se carga en todas las páginas.
   ============================================ */

.pchat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px 12px 16px; border-radius: 999px;
  background: #1a1a1a; color: #f7f4ec;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  cursor: pointer; border: none;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  animation: pchat-pulse 2.4s ease-in-out infinite;
}
.pchat-fab:hover { transform: translateY(-2px); background: #b08a4f; box-shadow: 0 14px 34px rgba(176,138,79,.35); animation: none; }
.pchat-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.pchat-fab .pchat-fab-label { white-space: nowrap; }
.pchat-fab.collapsed .pchat-fab-label { display: none; }
.pchat-fab.collapsed { padding: 14px; }

@keyframes pchat-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(0,0,0,.22), 0 0 0 0 rgba(176,138,79,0); }
  50% { box-shadow: 0 10px 28px rgba(0,0,0,.22), 0 0 0 10px rgba(176,138,79,.18); }
}

@media (max-width: 600px) {
  .pchat-fab .pchat-fab-label { display: none; }
  .pchat-fab { padding: 14px; }
}

.pchat-panel {
  position: fixed; bottom: 100px; right: 24px; z-index: 9998;
  width: 400px; max-width: calc(100vw - 32px);
  height: 600px; max-height: calc(100vh - 130px);
  background: #f7f4ec; border: 1px solid #e6e0d4;
  border-radius: 8px; box-shadow: 0 24px 60px rgba(0,0,0,.18);
  display: none; flex-direction: column; overflow: hidden;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.pchat-panel.open { display: flex; }
.pchat-header {
  padding: 16px 18px; background: #1a1a1a; color: #f7f4ec;
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.pchat-logo {
  width: 32px; height: 32px; border: 1px solid #f7f4ec;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 16px;
}
.pchat-header-title { font-family: Georgia, serif; font-size: 16px; line-height: 1.2; }
.pchat-header-sub { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(247,244,236,.6); margin-top: 2px; }
.pchat-close { margin-left: auto; background: transparent; border: 0; color: #f7f4ec; cursor: pointer; font-size: 20px; padding: 4px 8px; }
.pchat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #f7f4ec; }
.pchat-msg { max-width: 88%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.pchat-msg.bot { background: #fff; border: 1px solid #e6e0d4; align-self: flex-start; color: #1a1a1a; }
.pchat-msg.user { background: #1a1a1a; color: #f7f4ec; align-self: flex-end; }
.pchat-actions { display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; max-width: 100%; }
.pchat-btn {
  padding: 9px 14px; border-radius: 6px; font-size: 13px;
  cursor: pointer; border: 1px solid #1a1a1a;
  background: #fff; color: #1a1a1a; font-family: inherit;
  transition: all .15s; text-align: left;
}
.pchat-btn:hover { background: #1a1a1a; color: #f7f4ec; }
.pchat-btn.primary { background: #1a1a1a; color: #f7f4ec; }
.pchat-btn.primary:hover { background: #b08a4f; border-color: #b08a4f; }
.pchat-btn.outline { background: transparent; }
.pchat-input-area { border-top: 1px solid #e6e0d4; padding: 12px; display: flex; gap: 8px; background: #fff; flex-shrink: 0; }
.pchat-input { flex: 1; border: 1px solid #e6e0d4; border-radius: 6px; padding: 10px 14px; font-size: 14px; font-family: inherit; outline: none; background: #f7f4ec; color: #1a1a1a; }
.pchat-input:focus { border-color: #1a1a1a; }
.pchat-send { background: #1a1a1a; color: #f7f4ec; border: 0; border-radius: 6px; padding: 0 18px; cursor: pointer; font-size: 14px; }
.pchat-foot { padding: 8px 14px; font-size: 10px; text-align: center; color: #888; background: #f7f4ec; border-top: 1px solid #e6e0d4; letter-spacing: .04em; flex-shrink: 0; }

/* ============================================
   Detalles de presencia · punto verde "online"
   ============================================ */
.pchat-fab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4caf50; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(76,175,80,.25);
}
.pchat-status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #4caf50; margin-right: 6px; vertical-align: middle;
}
.pchat-close:hover { opacity: .75; }
