/* ============================================================
   bot-changelog.css — URBot "What's New" badge + panel styles
   ============================================================ */

/* ---- Badge (inserted near bot header) ---- */
.changelog-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 20px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  position: relative;
  vertical-align: middle;
  margin-left: 10px;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.changelog-badge:hover,
.changelog-badge:focus {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.6);
  outline: none;
}

/* Green pulse dot */
.changelog-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  animation: changelog-pulse 2s ease-in-out infinite;
}

@keyframes changelog-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}

.changelog-badge-text {
  line-height: 1;
}

/* "NEW" red overlay badge */
.changelog-new-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  line-height: 1.4;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(239,68,68,0.5);
  animation: changelog-new-flash 1.5s ease-in-out 3;
}

@keyframes changelog-new-flash {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ---- Slide-down panel ---- */
.changelog-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 9995;
  width: 340px;
  max-height: 0;
  overflow: hidden;
  background: #16162a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.changelog-panel--visible {
  max-height: 480px;
  opacity: 1;
  pointer-events: auto;
}

/* Panel header row */
.changelog-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.changelog-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.changelog-panel-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s;
}

.changelog-panel-close:hover { color: #e2e8f0; }

/* Entry list */
.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Individual entry row */
.changelog-entry {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.changelog-entry:hover { background: rgba(255,255,255,0.03); }

.changelog-entry--major {
  border-left: 3px solid #f59e0b;
}

.changelog-entry-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.6;
}

.changelog-entry-body {
  flex: 1;
  min-width: 0;
}

.changelog-entry-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.changelog-entry-title {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
}

.changelog-major-badge {
  font-size: 9px;
  font-weight: 700;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.changelog-entry-desc {
  font-size: 11px;
  color: #94a3b8;
  margin: 3px 0 0;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.changelog-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.changelog-type-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.changelog-date {
  font-size: 10px;
  color: #475569;
}

/* Panel footer */
.changelog-panel-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.changelog-all-link {
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  transition: color 0.15s;
}

.changelog-all-link:hover { color: #60a5fa; text-decoration: underline; }

/* ============================================================
   What's New page — platform changelog (httpdocs/whats-new/)
   ============================================================ */
.wn-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #e2e8f0;
}

.wn-header {
  margin-bottom: 2rem;
}

.wn-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 0.4rem;
}

.wn-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0 0 1.2rem;
}

/* Filter chips */
.wn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.8rem;
}

.wn-filter-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-transform: capitalize;
}

.wn-filter-chip:hover,
.wn-filter-chip.active {
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.5);
  color: #93c5fd;
}

/* Date group */
.wn-group {
  margin-bottom: 2.2rem;
}

.wn-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Entry card */
.wn-entry {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.12s;
}

.wn-entry:last-child { border-bottom: none; }

.wn-entry-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}

.wn-entry-body { flex: 1; min-width: 0; }

.wn-entry-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.wn-bot-name {
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  text-transform: capitalize;
}

.wn-type-icon { font-size: 14px; }

.wn-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
}

.wn-entry-title {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.4;
  margin-bottom: 4px;
}

.wn-entry-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.wn-entry-date {
  font-size: 11px;
  color: #475569;
}

.wn-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  font-size: 14px;
}

.wn-subscribe-banner {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wn-subscribe-text {
  flex: 1;
  font-size: 13px;
  color: #cbd5e1;
}

.wn-subscribe-btn {
  padding: 8px 18px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.wn-subscribe-btn:hover { background: #2563eb; }

/* Responsive */
@media (max-width: 540px) {
  .changelog-panel { width: calc(100vw - 32px); left: 0; }
  .changelog-badge { margin-left: 6px; padding: 3px 8px 3px 5px; }
  .wn-entry-avatar { width: 32px; height: 32px; }
  .wn-title { font-size: 1.5rem; }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .changelog-badge-dot { animation: none; }
  .changelog-new-badge { animation: none; }
  .changelog-panel { transition: none; }
}
