.context-help {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1800;
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
}

.context-help-trigger {
  min-width: 174px;
  min-height: 54px;
  padding: 6px 16px 6px 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(101, 226, 255, .55);
  border-radius: 999px;
  color: #f6fcff;
  background: linear-gradient(135deg, #09263d, #204c75 70%, #6b3fb5);
  box-shadow: 0 14px 32px rgba(8, 31, 51, .28), 0 0 24px rgba(67, 208, 255, .18);
  cursor: pointer;
}

.context-help-trigger-face {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  background-color: #dff8f6;
  background-image: url("generated/pantera-parpadeo-uam.gif");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 20%;
  box-shadow: 0 0 16px rgba(124, 230, 255, .7);
}

.context-help-trigger:hover .context-help-trigger-face,
.context-help-trigger:focus-visible .context-help-trigger-face,
.context-help-trigger[aria-expanded="true"] .context-help-trigger-face {
  background-image: url("generated/pantera-saludo-uam.gif");
}

.context-help-trigger strong {
  font-size: .82rem;
  letter-spacing: .02em;
}

.context-help-trigger:hover,
.context-help-trigger:focus-visible {
  outline: 3px solid rgba(76, 211, 255, .25);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.context-help-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(430px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 94px));
  overflow: hidden;
  border: 1px solid rgba(98, 209, 241, .28);
  border-radius: 22px;
  color: #19364a;
  background: rgba(249, 253, 255, .98);
  box-shadow: 0 28px 70px rgba(7, 28, 46, .28);
  animation: context-help-in .24s cubic-bezier(.2, .8, .2, 1) both;
}

.context-help-panel[hidden] {
  display: none;
}

.context-help-panel > header {
  position: relative;
  min-height: 112px;
  padding: 16px 54px 16px 126px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 20% 30%, rgba(68, 217, 255, .3), transparent 34%),
    linear-gradient(135deg, #071c2e, #173d61 70%, #53338d);
}

.panther-sprite {
  position: absolute;
  left: 2px;
  bottom: -4px;
  width: 122px;
  height: 122px;
  display: block;
  overflow: hidden;
  border-radius: 0 54px 54px 0;
}

.panther-sprite img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transform-origin: 50% 82%;
}

.panther-sprite::after {
  content: none;
}

@media (prefers-reduced-motion: reduce) {
  .context-help-trigger-face,
  .context-help-trigger:hover .context-help-trigger-face,
  .context-help-trigger:focus-visible .context-help-trigger-face,
  .context-help-trigger[aria-expanded="true"] .context-help-trigger-face {
    background-image: url("generated/pantera-uam-poster.webp");
  }
}

.context-help-panel > header small {
  color: #82e8ff;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.context-help-panel > header h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.15;
}

.panther-voice {
  height: 15px;
  margin-top: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: .72;
}

.panther-voice i {
  width: 4px;
  height: 5px;
  display: block;
  border-radius: 99px;
  background: #83eaff;
}

.context-help.is-talking .panther-voice i {
  animation: panther-voice .48s ease-in-out infinite alternate;
}

.context-help.is-talking .panther-voice i:nth-child(2) {
  animation-delay: -.18s;
}

.context-help.is-talking .panther-voice i:nth-child(3) {
  animation-delay: -.32s;
}

.context-help.is-talking .panther-sprite img {
  animation: panther-talk .38s ease-in-out 4 alternate;
}

.context-help.is-nodding .panther-sprite img {
  animation: panther-nod .55s cubic-bezier(.2, .8, .2, 1);
}

.context-help-panel > header button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 1.3rem;
  cursor: pointer;
}

.context-help-copy {
  max-height: min(440px, calc(100vh - 260px));
  padding: 18px;
  overflow-y: auto;
}

.context-help-copy > p {
  margin: 0 0 14px;
  color: #5a7182;
  font-size: .88rem;
  line-height: 1.5;
}

.context-help-copy input {
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #cedce4;
  border-radius: 11px;
  color: #18364b;
  background: #fff;
  font: inherit;
}

.context-help-copy textarea {
  width: 100%;
  min-height: 96px;
  padding: 11px 13px;
  resize: vertical;
  border: 1px solid #cedce4;
  border-radius: 11px;
  color: #18364b;
  background: #fff;
  font: inherit;
  line-height: 1.45;
}

.context-help-copy input:focus,
.context-help-copy textarea:focus {
  outline: 3px solid rgba(43, 177, 222, .16);
  border-color: #2baedb;
}

.context-help-tabs {
  margin-bottom: 13px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 12px;
  background: #eaf2f5;
}

.context-help-tabs button {
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: #567080;
  background: transparent;
  font: inherit;
  font-size: .77rem;
  font-weight: 850;
  cursor: pointer;
}

.context-help-tabs button[aria-selected="true"] {
  color: #123d58;
  background: #fff;
  box-shadow: 0 4px 14px rgba(26, 62, 79, .1);
}

.context-support-form {
  display: grid;
  gap: 11px;
}

.context-support-form label {
  display: grid;
  gap: 6px;
  color: #294b60;
  font-size: .76rem;
  font-weight: 800;
}

.context-support-form input {
  margin: 0;
}

.context-support-form button {
  min-height: 43px;
  padding: 10px 15px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(110deg, #0f6384, #6442a6);
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}

.context-support-form button:disabled {
  cursor: wait;
  opacity: .62;
}

.context-support-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
}

.context-support-status {
  min-height: 20px;
  margin: 0 !important;
  color: #2d6b58 !important;
  font-size: .76rem !important;
}

[data-context-help-list] {
  display: grid;
  gap: 8px;
}

[data-context-help-list] details {
  border: 1px solid #dce7ed;
  border-radius: 12px;
  background: #fff;
}

[data-context-help-list] summary {
  padding: 12px 38px 12px 13px;
  color: #173d56;
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

[data-context-help-list] summary::-webkit-details-marker {
  display: none;
}

[data-context-help-list] details p {
  margin: 0;
  padding: 0 13px 13px;
  color: #5b7282;
  font-size: .82rem;
  line-height: 1.55;
}

.context-help-panel > footer {
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #dce8ee;
  color: #526b7d;
  background: #eef7fa;
  font-size: .72rem;
}

.context-help-panel > footer a {
  color: #155d85;
  font-weight: 850;
  overflow-wrap: anywhere;
}

@keyframes context-help-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes panther-blink {
  0%, 46%, 48%, 100% { opacity: 0; }
  46.5%, 47.5% { opacity: .96; }
}

@keyframes panther-talk {
  from { transform: translateY(0) rotate(-.5deg); }
  to { transform: translateY(-3px) rotate(.7deg); }
}

@keyframes panther-nod {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(3deg) translateY(3px); }
}

@keyframes panther-voice {
  from { height: 4px; opacity: .55; }
  to { height: 13px; opacity: 1; }
}

@media (max-width: 600px) {
  .context-help {
    right: 12px;
    bottom: 12px;
  }

  .context-help-trigger {
    min-width: 48px;
    width: 48px;
    padding: 6px;
  }

  .context-help-trigger strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .context-help-panel {
    position: fixed;
    right: 12px;
    bottom: 72px;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .context-help-panel,
  .panther-sprite::after,
  .context-help.is-talking .panther-voice i,
  .context-help.is-talking .panther-sprite img,
  .context-help.is-nodding .panther-sprite img {
    animation: none;
  }
}

@media (max-width: 600px) {
  .context-help {
    right: 14px;
    bottom: 14px;
  }

  .context-help-trigger {
    min-width: 58px;
    width: 58px;
    min-height: 58px;
    height: 58px;
    padding: 6px;
    justify-content: center;
    overflow: hidden;
    border-width: 2px;
  }

  .context-help-trigger-face {
    width: 46px;
    height: 46px;
    background-size: 100% auto;
    background-position: 50% 8%;
  }
}

/* Conversaciones de soporte: continúa el diseño original de la panterita. */
.context-support-thread{margin-top:16px;border-top:1px solid var(--border,#dde1ed);padding-top:12px}.context-support-thread h3{font-size:1rem;margin:3px 0}.context-support-thread p{font-size:.82rem;line-height:1.45}.context-support-thread [data-context-support-threads]{max-height:290px;overflow:auto;margin-top:10px}.context-support-thread details{border:1px solid var(--border,#dadee9);padding:10px;border-radius:10px;margin:8px 0}.context-support-thread details summary{cursor:pointer;font-weight:650}.context-support-thread .context-support-messages{max-height:175px;overflow:auto}.context-support-thread .context-support-messages p{white-space:pre-wrap;overflow-wrap:anywhere;padding:7px 9px;background:var(--surface-secondary,#f1f2f8);border-radius:7px}.context-support-thread .context-support-messages p.from-support{border-left:3px solid #645b9e}.context-support-thread form{display:flex;gap:7px;flex-direction:column;margin-top:8px}.context-support-thread textarea{width:100%;min-height:60px;resize:vertical}.context-support-thread form button{align-self:flex-end}
.context-support-visitor-note{padding:9px 11px;border:1px solid var(--border,#b5cbd9);border-radius:9px;background:var(--surface-secondary,#e6f1f7);color:var(--text,#153b50);font-size:.86rem;line-height:1.45}
.context-support-actions{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}.context-support-actions button{font-size:.79rem;padding:6px 9px;min-height:34px}
.context-support-thread select{width:100%;padding:8px;border:1px solid var(--border,#b5cbd9);border-radius:8px;background:var(--surface,#fff);color:var(--text,#153b50)}
html[data-theme=dark] .context-support-visitor-note{background:#294554;color:#f2f8fb;border-color:#53798b}
