/* css/changelog.css — ADIP RMX Smart GitHub-Powered Changelog Engine
   ============================================================================
   ADDITIF MURNI. File CSS baru, tidak menimpa/mengubah style file lain.
   Mengikuti token warna Luxury Monochrome yang sudah ada di
   css/thor-monochrome.css (--thor-black, --thor-gold, --thor-spring, dst).
   Kalau token itu belum ter-load di suatu halaman, fallback value di bawah
   tetap membuat komponen ini terlihat konsisten (hitam/abu/putih premium).
   ============================================================================ */

:root {
  --clg-black: var(--thor-black, #000000);
  --clg-black-2: var(--thor-black-2, #0A0A0C);
  --clg-gray-900: var(--thor-gray-900, #1F1F24);
  --clg-gray-800: var(--thor-gray-800, #2A2A30);
  --clg-gray-500: var(--thor-gray-500, #8E8E93);
  --clg-gray-300: var(--thor-gray-300, #A1A1AA);
  --clg-white: var(--thor-white, #FFFFFF);
  --clg-gold: var(--thor-gold, #F59E0B);
  --clg-gold-2: var(--thor-gold-2, #FBBF24);
  --clg-spring: var(--thor-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

/* ---------- Pill Badge (footer trigger) ---------- */
.clg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-top: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: var(--clg-gray-300);
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.25s var(--clg-spring), border-color 0.25s ease, color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.2;
}

.clg-pill:hover,
.clg-pill:focus-visible {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--clg-white);
  transform: translateY(-1px);
}

.clg-pill:active {
  transform: scale(0.96);
}

.clg-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clg-gold);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
  flex-shrink: 0;
}

.clg-pill__dot.is-new {
  animation: clgPulse 1.8s ease-in-out infinite;
}

@keyframes clgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.35); }
}

/* ---------- Overlay ---------- */
.clg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.clg-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- Modal ---------- */
.clg-modal {
  width: 100%;
  max-width: 460px;
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--clg-black-2) 0%, var(--clg-black) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: scale(0.86) translateY(24px);
  opacity: 0;
  transition: transform 0.45s var(--clg-spring), opacity 0.3s ease;
  overflow: hidden;
}

.clg-overlay.is-open .clg-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.clg-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.clg-modal__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.clg-modal__title h3 {
  margin: 0;
  color: var(--clg-white);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.clg-modal__title span {
  color: var(--clg-gray-500);
  font-size: 11px;
}

.clg-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--clg-gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--clg-spring);
  flex-shrink: 0;
}

.clg-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--clg-white);
}

.clg-modal__close:active {
  transform: scale(0.9);
}

/* ---------- Body / Timeline ---------- */
.clg-modal__body {
  overflow-y: auto;
  padding: 16px 20px 22px;
  flex: 1;
}

.clg-modal__body::-webkit-scrollbar {
  width: 4px;
}

.clg-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.clg-modal__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.clg-modal__body {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.clg-release {
  position: relative;
  padding-left: 22px;
  padding-bottom: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.clg-release:last-child {
  border-left-color: transparent;
  padding-bottom: 2px;
}

.clg-release::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clg-gold);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.clg-release__date {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.clg-release__date strong {
  color: var(--clg-white);
  font-size: 13px;
  font-weight: 700;
}

.clg-release__badge {
  font-size: 10px;
  color: var(--clg-black);
  background: linear-gradient(135deg, var(--clg-gold-2), var(--clg-gold));
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.clg-release__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.clg-release__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--clg-gray-300);
  font-size: 12.5px;
  line-height: 1.5;
}

.clg-release__item i {
  color: var(--clg-gray-500);
  font-size: 9px;
  margin-top: 5px;
  flex-shrink: 0;
}

/* ---------- Skeleton Loader ---------- */
.clg-skel-release {
  padding-left: 22px;
  padding-bottom: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.clg-skel-line {
  height: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 37%, rgba(255,255,255,0.05) 63%);
  background-size: 400% 100%;
  animation: clgShimmer 1.4s ease infinite;
}

@keyframes clgShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.clg-empty,
.clg-error {
  text-align: center;
  color: var(--clg-gray-500);
  font-size: 12.5px;
  padding: 30px 10px;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .clg-modal {
    max-height: 82vh;
    border-radius: 18px;
  }
  .clg-modal__header {
    padding: 16px 16px 12px;
  }
  .clg-modal__body {
    padding: 14px 16px 18px;
  }
}
