/* Inline Product Agent — mismo look que los demos .zip, con colores del tenant */
.pa-card {
  margin-top: 24px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  font-family: inherit;
}
.pa-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e5e5;
  background: linear-gradient(to right, color-mix(in srgb, var(--color-primary, #2563eb) 8%, #fff), #fff);
}
.pa-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary, #2563eb);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pa-sparkle { animation: paSparkle 2.4s ease-in-out infinite; }
@keyframes paSparkle { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.pa-header-text { min-width: 0; }
.pa-header-text h4 { margin: 0; font-size: 14px; font-weight: 600; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-header-text p { margin: 0; font-size: 10px; color: #6b6b6b; text-transform: uppercase; letter-spacing: 0.08em; }
.pa-dots { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; }
.pa-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary, #2563eb); display: inline-block; animation: paDot 1.2s infinite; }
.pa-dots .dot2 { animation-delay: 0.15s; }
.pa-dots .dot3 { animation-delay: 0.3s; }
@keyframes paDot { 0%,60%,100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

.pa-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.pa-messages { display: flex; flex-direction: column; gap: 12px; max-height: 290px; overflow-y: auto; scroll-behavior: smooth; padding-right: 4px; }
.pa-messages::-webkit-scrollbar { width: 6px; }
.pa-messages::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--color-primary, #2563eb) 35%, transparent); border-radius: 3px; }
.pa-messages:empty { display: none; }

.pa-shimmer-group { display: flex; flex-direction: column; gap: 8px; }
.pa-shimmer {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 0%, #e5e5e5 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: paShimmer 1.4s infinite;
}
@keyframes paShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.pa-fade-in { animation: paFade 0.35s ease-out; }
@keyframes paFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.pa-row { display: flex; align-items: flex-start; gap: 8px; }
.pa-row.user { justify-content: flex-end; }
.pa-row.agent p { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: #1a1a1a; white-space: pre-wrap; }
.pa-mini-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: color-mix(in srgb, var(--color-primary, #2563eb) 15%, #fff);
  color: var(--color-primary, #2563eb);
  display: inline-flex; align-items: center; justify-content: center;
}
.pa-user-bubble {
  max-width: 85%;
  background: var(--color-accent, #16a34a);
  color: #fff;
  font-size: 14px;
  border-radius: 16px 16px 6px 16px;
  padding: 8px 16px;
}

.pa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-chips:empty { display: none; }
.pa-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  color: #1a1a1a;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pa-chip svg { color: var(--color-primary, #2563eb); flex-shrink: 0; }
.pa-chip:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-primary, #2563eb) 8%, #fff);
  border-color: var(--color-primary, #2563eb);
}
.pa-chip:disabled { opacity: 0.5; cursor: not-allowed; }

.pa-input-row { display: flex; align-items: center; gap: 8px; }
.pa-input-wrap { position: relative; flex: 1; }
.pa-input-wrap input {
  width: 100%; box-sizing: border-box;
  padding: 10px 38px 10px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pa-input-wrap input:focus {
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary, #2563eb) 20%, transparent);
}
.pa-input-sparkle { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--color-primary, #2563eb); }
.pa-input-row > button {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: var(--color-primary, #2563eb);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: filter 0.15s;
}
.pa-input-row > button:hover:not(:disabled) { filter: brightness(0.9); }
.pa-input-row > button:disabled { opacity: 0.4; cursor: not-allowed; }

.pa-error { background: #fef2f2; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #991b1b; }
.pa-error p { margin: 0 0 4px; font-weight: 600; }
.pa-error span { font-size: 11px; color: #b45050; }
.pa-error button {
  margin-left: 6px; border: 1px solid #991b1b; background: #fff; color: #991b1b;
  border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}

.pa-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 10px 18px;
  background: #f7f7f7;
  border-top: 1px solid #e5e5e5;
}
.pa-powered { font-size: 10px; color: #6b6b6b; white-space: nowrap; }
.pa-powered strong { font-size: 12px; color: #1a1a1a; letter-spacing: 0.06em; }
.pa-footer p { margin: 0; font-size: 10px; color: #9a9a9a; line-height: 1.35; flex: 1; min-width: 200px; text-align: right; }
