/**
 * PSPM AI Chatbot — Brand Styling & Animations
 *
 * Brand colors:
 *   Navy:  #1e3a5f
 *   Teal:  #00c9e3
 *   Dark:  #3C3950
 *   Light: #99A9B5
 */

/* ------------------------------------------------------------------ */
/*  Widget positioning                                                 */
/* ------------------------------------------------------------------ */

elevenlabs-convai {
  /* Bottom-right, above most elements but below accessibility tools */
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999998 !important;
}

/* Mobile: push up slightly to clear iOS safe area */
@media (max-width: 480px) {
  elevenlabs-convai {
    bottom: 12px !important;
    right: 12px !important;
  }
}

/* ------------------------------------------------------------------ */
/*  Info Card                                                          */
/* ------------------------------------------------------------------ */

.pspm-info-card {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  z-index: 999999;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pspm-info-card--enter {
  opacity: 0;
  transform: translateY(20px);
}

.pspm-info-card--exit {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.pspm-info-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1e3a5f;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.pspm-info-card__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.pspm-info-card__close:hover {
  opacity: 1;
}

.pspm-info-card__body {
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #3C3950;
}

.pspm-info-card__body a {
  color: #00c9e3;
  text-decoration: none;
  font-weight: 500;
}

.pspm-info-card__body a:hover {
  text-decoration: underline;
}

/* Mobile: full-width card */
@media (max-width: 480px) {
  .pspm-info-card {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 90px;
  }
}

/* ------------------------------------------------------------------ */
/*  Section Highlight Pulse                                            */
/* ------------------------------------------------------------------ */

.pspm-highlight {
  animation: pspm-pulse 1.5s ease-in-out 2;
  outline: 3px solid #00c9e3;
  outline-offset: 4px;
  border-radius: 4px;
}

@keyframes pspm-pulse {
  0%   { outline-color: rgba(0, 201, 227, 0.2); box-shadow: 0 0 0 0 rgba(0, 201, 227, 0.4); }
  50%  { outline-color: rgba(0, 201, 227, 0.8); box-shadow: 0 0 20px 4px rgba(0, 201, 227, 0.25); }
  100% { outline-color: rgba(0, 201, 227, 0.2); box-shadow: 0 0 0 0 rgba(0, 201, 227, 0); }
}

/* ------------------------------------------------------------------ */
/*  Text Fallback Banner                                               */
/* ------------------------------------------------------------------ */

.pspm-text-fallback {
  position: fixed;
  bottom: 90px;
  right: 20px;
  max-width: 320px;
  background: #1e3a5f;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pspm-slide-in 0.3s ease;
}

.pspm-text-fallback p {
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.pspm-text-fallback a {
  color: #00c9e3;
  text-decoration: none;
  font-weight: 600;
}

.pspm-text-fallback a:hover {
  text-decoration: underline;
}

.pspm-text-fallback__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0 0 0 4px;
  opacity: 0.7;
  flex-shrink: 0;
}

.pspm-text-fallback__close:hover {
  opacity: 1;
}

@keyframes pspm-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 480px) {
  .pspm-text-fallback {
    right: 10px;
    left: 10px;
    max-width: none;
    bottom: 80px;
  }
}
