/* ================================================================== *
 * What's New — modal & bell button
 * ================================================================== */

/* ── Bell (reopen) button ──────────────────────────────────────────── */

#cl-reopen {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(30, 30, 30, 0.82);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: background 0.18s, transform 0.15s;
}

#cl-reopen:hover {
  background: rgba(50, 50, 50, 0.95);
  transform: scale(1.08);
}

#cl-reopen:focus-visible {
  outline: 2px solid #6ab0f5;
  outline-offset: 3px;
}

#cl-bell-icon {
  width: 20px;
  height: 20px;
  fill: #e0e0e0;
  display: block;
}

/* Unread dot */
#cl-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  background: #e53e3e;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
}

#cl-badge[hidden] {
  display: none;
}

/* ── Overlay ───────────────────────────────────────────────────────── */

#cl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* Fade-in when visible */
  animation: cl-fade-in 0.18s ease;
}

#cl-overlay[hidden] {
  display: none !important;
}

@keyframes cl-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal container ───────────────────────────────────────────────── */

#cl-modal {
  position: relative;
  background: #ffffff;
  color: #2d2d2d;
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 36px 32px 28px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  animation: cl-slide-up 0.2s ease;
}

@keyframes cl-slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close × (top-right of modal) ─────────────────────────────────── */

#cl-close-x {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

#cl-close-x:hover {
  color: #333;
  background: #f2f2f2;
}

#cl-close-x:focus-visible {
  outline: 2px solid #6ab0f5;
}

/* ── Title ─────────────────────────────────────────────────────────── */

#cl-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 2px solid #ececec;
  padding-bottom: 14px;
}

/* ── Changelog entries ─────────────────────────────────────────────── */

#cl-body {
  font-size: 14px;
}

.cl-entry + .cl-entry {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.cl-entry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cl-version {
  display: inline-block;
  background: #2c3e50;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
}

.cl-date {
  font-size: 12px;
  color: #aaa;
}

.cl-items {
  margin: 0;
  padding-left: 20px;
}

.cl-items li {
  margin: 7px 0;
  line-height: 1.65;
  color: #444;
}

.cl-items li code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 92%;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  color: #c7254e;
}

/* ── Footer (close button) ─────────────────────────────────────────── */

#cl-footer {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #eeeeee;
}

#cl-close-btn {
  background: #2c3e50;
  color: #fff;
  border: none;
  padding: 10px 36px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s;
}

#cl-close-btn:hover {
  background: #1a252f;
}

#cl-close-btn:focus-visible {
  outline: 2px solid #6ab0f5;
  outline-offset: 3px;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  #cl-modal {
    padding: 28px 20px 22px;
  }

  #cl-title {
    font-size: 18px;
  }

  #cl-close-btn {
    width: 100%;
  }
}
