/* ── Word-limit banner — soft nudge with CTA ── */

.demo-limit-banner {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin: 0 12px 10px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(234, 84, 85, 0.18);
  background: linear-gradient(135deg, rgba(234, 84, 85, 0.06) 0%, rgba(234, 84, 85, 0.02) 100%);
  font-family: "Nunito Sans", sans-serif;
  animation: demoLimitFadeIn 0.3s ease-out;
}

.demo-limit-banner.visible {
  display: flex;
}

/* Word count header: dot + "252 / 200 ord" */
.demo-limit-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #ea5455;
  letter-spacing: -0.01em;
}

.demo-limit-count::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ea5455;
  flex-shrink: 0;
  animation: limitDotPulse 2s ease-in-out infinite;
}

/* Explanation text */
.demo-limit-text {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary, #646e78);
  margin: 2px 0 0;
}

/* CTA button */
.demo-limit-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--color-primary, #696cff);
  color: #fff;
  font-family: "Nunito Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

a.demo-limit-cta,
a.demo-limit-cta:hover,
a.demo-limit-cta:visited,
a.demo-limit-cta:focus {
  color: #fff;
  text-decoration: none;
}
.demo-limit-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.demo-limit-cta:active {
  transform: translateY(0);
}

/* Over-limit state for action buttons */
.demo-over-limit {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* ── Dark mode ── */
[data-theme="dark"] .demo-limit-banner {
  background: linear-gradient(135deg, rgba(234, 84, 85, 0.1) 0%, rgba(234, 84, 85, 0.04) 100%);
  border-color: rgba(234, 84, 85, 0.25);
}

[data-theme="dark"] .demo-limit-text {
  color: #a0a0b8;
}

/* ── Animations ── */
@keyframes demoLimitFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes limitDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Fix Bedre tab: remove extra margin above Undersøg teksten button */
#analyzeRequestBtn {
  margin-top: 0;
}
