.pvsp-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility 0s linear .22s;
}

.pvsp-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .22s ease, visibility 0s linear 0s;
}

.pvsp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  opacity: 0;
  transition: opacity .3s ease;
}

.pvsp-modal[aria-hidden="false"] .pvsp-backdrop { opacity: 1; }

.pvsp-dialog {
  position: relative;
  width: min(920px, 94vw);
  max-height: 88vh;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.12), 0 0 1px rgba(0,0,0,.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(18px) scale(.97);
  opacity: 0;
  filter: blur(4px);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1),
              opacity .22s ease,
              filter .3s ease;
}

.pvsp-modal[aria-hidden="false"] .pvsp-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
  filter: blur(0);
}

.pvsp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}

.pvsp-titlewrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.pvsp-header h3 {
  margin: 0;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 74vw;
}

.pvsp-subtitle {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #64748b;
}

.pvsp-modal button {
  -webkit-appearance: none;
  appearance: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

.pvsp-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #64748b !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease, background .3s ease, color .3s ease;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: 23px;
  font-family: sans-serif;
  line-height: 0;
}

.pvsp-close:hover {
  background: #fef2f2 !important;
  color: #ef4444 !important;
  transform: rotate(90deg) !important;
}

.pvsp-close:focus-visible,
.pvsp-copy:focus-visible {
  outline: 2px solid rgba(15, 23, 42, .45) !important;
  outline-offset: 2px !important;
}

.pvsp-body {
  padding: 24px;
  overflow: auto;
  flex: 1;
  scrollbar-gutter: stable;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
}

.pvsp-section { margin-bottom: 32px; }
.pvsp-section:last-of-type { margin-bottom: 8px; }

.pvsp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pvsp-section-head h4 {
  margin: 0;
  font-family: 'Familjen Grotesk', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 800;
}

.pvsp-copy {
  border: 1px solid #0f172a;
  background: #0f172a !important;
  padding: 8px 25px;
  border-radius: 14px;
  font-family: 'Familjen Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff !important;
  cursor: pointer;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
}

.pvsp-copy .pvsp-copy-done { display: none; }
.pvsp-copy .pvsp-copy-label { display: inline-block; }

.pvsp-copy.is-copied {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

.pvsp-copy.is-copied .pvsp-copy-label { display: none; }
.pvsp-copy.is-copied .pvsp-copy-done { display: inline-block; }

.pvsp-copy:hover {
  background: #1e293b !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.30);
}

.pvsp-copy.is-copied:hover { background: #059669 !important; }

.pvsp-rich {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #1e293b;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  word-break: break-word;
  overflow-wrap: anywhere;
  /* Added smoother transition for when animation ends */
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* --- ADDED ANIMATION START --- */
@keyframes flashBorder {
  0% { 
    box-shadow: 0 0 0 0 rgba(37,99,235,0); 
    border-color: #e2e8f0;
  }
  40% { 
    /* Blue Flash (#60a5fa) & Glow */
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12); 
    border-color: #60a5fa;
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(37,99,235,0); 
    border-color: #e2e8f0;
  }
}

.pvsp-section:has(.pvsp-copy.is-copied) .pvsp-rich {
  animation: flashBorder 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* --- ADDED ANIMATION END --- */

.pvsp-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.pvsp-blank { height: 10px; }

.pvsp-section-label { font-weight: 700; letter-spacing: .2px; color: #0f172a; }

.pvsp-pill {
  background: #f1f5f9;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Inter', ui-monospace, monospace;
  font-size: 0.92em;
  border: 1px solid rgba(37, 99, 235, 0.10);
}

.pvsp-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.pvsp-link:hover { opacity: .85; }

.pvsp-md-bold { font-weight: 700; }
.pvsp-md-italic { font-style: italic; }

.pvsp-inline-code {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.10);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
}

.pvsp-list { margin: 10px 0; padding-left: 22px; }
.pvsp-list li { margin: 6px 0; }
.pvsp-list .pvsp-list { margin: 6px 0 6px 14px; padding-left: 18px; }

.pvsp-ul { list-style: disc; }
.pvsp-ul .pvsp-ul { list-style: circle; }
.pvsp-ul .pvsp-ul .pvsp-ul { list-style: square; }

.pvsp-ol { list-style: decimal; }
.pvsp-ol .pvsp-ol { list-style: lower-alpha; }
.pvsp-ol .pvsp-ol .pvsp-ol { list-style: lower-roman; }

.pvsp-list li::marker { font-weight: 800; color: #70767b; }

.pvsp-skel-line {
  height: 14px;
  border-radius: 10px;
  margin: 12px 0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: pvspShimmer 1.5s infinite linear;
}

@keyframes pvspShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 640px) {
  .pvsp-dialog { width: 96vw; max-height: 94vh; border-radius: 24px; }
  .pvsp-header { padding: 16px 16px; }
  .pvsp-header h3 { font-size: 1.1rem; max-width: 70vw; }
  .pvsp-body { padding: 16px; }
  .pvsp-rich { padding: 18px; border-radius: 18px; }
  .pvsp-copy { padding: 8px 18px !important; border-radius: 12px !important; }
}