/*
 * ChangeLogs — public timeline styles (Cobalt, futuristic redesign).
 *
 * All selectors are prefixed with .clg- so they never clash with
 * template styles. Keep visual rules here — the Smarty template
 * should carry structure only.
 */

/* -------- Bootstrap card override -------- */
/* Required so absolute-positioned background layers clip to the card. */
.clg-card {
    overflow: hidden;
    position: relative;
}

/* Ensure all card-body children render above the background layers. */
.clg-card .card-body > *:not(.clg-bg-layer):not(.clg-scanlines) {
    position: relative;
    z-index: 2;
}

/* -------- Background layer: drifting hex grid + glow orbs -------- */
.clg-bg-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Drifting isometric line grid — three overlapping gradients simulate
   a hex/isometric pattern. Moves by one tile repeat per 30 s loop. */
.clg-bg-layer::before {
    content: '';
    position: absolute;
    inset: -40px;
    background-image:
        linear-gradient(60deg,  rgba(212, 175, 55, 0.04) 1px, transparent 1px),
        linear-gradient(-60deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px),
        linear-gradient(0deg,   rgba(212, 175, 55, 0.025) 1px, transparent 1px);
    background-size: 28px 48px, 28px 48px, 28px 48px;
    animation: clg-grid-drift 30s linear infinite;
}

@keyframes clg-grid-drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(28px, 48px); }
}

/* Ambient glow orbs — two radial ellipses that breathe on an 8 s loop. */
.clg-bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 280px 220px at 85% 15%, rgba(212, 175, 55, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 200px 160px at 10% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    animation: clg-orb-breathe 8s ease-in-out infinite alternate;
}

@keyframes clg-orb-breathe {
    from { opacity: 0.6; }
    to   { opacity: 1; }
}

/* -------- Scan-line texture -------- */
.clg-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.06) 3px,
        rgba(0, 0, 0, 0.06) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* -------- Page header -------- */
.clg-page-header {
    margin-bottom: 2rem;
    text-align: left;
}
.clg-page-header h1 {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.95);
}
.clg-page-header p {
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    font-size: 0.95rem;
}

/* -------- Timeline rail (animated shimmer + lateral glow) -------- */
.clg-timeline {
    position: relative;
    padding-left: 1.75rem;
    margin: 1.5rem 0 2rem;
}

.clg-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, #d4af37 0%, rgba(212, 175, 55, 0.15) 100%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.45), 0 0 24px rgba(212, 175, 55, 0.15);
}

/* -------- Entry card (glassmorphism + top-edge strip) -------- */
.clg-entry {
    position: relative;
    padding: 1.1rem 1.25rem 1rem;
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 10px;
    background: rgba(15, 12, 30, 0.92);
    margin-bottom: 1.5rem;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
    animation: clg-entry-in 0.45s ease both;
}

@supports (backdrop-filter: blur(1px)) {
    .clg-entry {
        background: rgba(15, 12, 30, 0.72);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

.clg-entry:last-child {
    margin-bottom: 0;
}

.clg-entry:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow:
        0 8px 32px rgba(212, 175, 55, 0.14),
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(212, 175, 55, 0.06);
}

/* Left accent bar */
.clg-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: linear-gradient(180deg, #d4af37, rgba(212, 175, 55, 0.1));
}

/* Top-edge gold highlight strip — intensifies on hover */
.clg-entry::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
    opacity: 0.6;
    transition: opacity 0.25s ease;
}

.clg-entry:hover::after {
    opacity: 1;
}

@keyframes clg-entry-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -------- Timeline dot -------- */
.clg-dot {
    position: absolute;
    left: -1.75rem;
    top: 1.25rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    background: #12122a;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.08), 0 0 8px rgba(212, 175, 55, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Latest entry — slightly bigger dot with pulsing ring */
.clg-dot--latest {
    width: 20px;
    height: 20px;
    left: calc(-1.75rem - 3px);
    top: calc(1.25rem - 3px);
    animation: clg-dot-pulse 2.5s ease-in-out infinite;
}

@keyframes clg-dot-pulse {
    0%,  100% { box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.08), 0 0 8px  rgba(212, 175, 55, 0.25); }
    50%        { box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.15), 0 0 18px rgba(212, 175, 55, 0.5);  }
}

.clg-entry:hover .clg-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.18), 0 0 16px rgba(212, 175, 55, 0.65);
}

/* -------- Date stamp (inline label — replaces tilted corner stamp) -------- */
.clg-date-stamp {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.6);
    margin-bottom: 0.3rem;
}

/* -------- "LATEST" badge (Approach B — rounded pill, strong double-layer pulse) -------- */
.clg-badge-latest {
    position: absolute;
    top: -8px;
    left: 1rem;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #0f0c1f;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 50px;
    animation: clg-pulse-badge 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes clg-pulse-badge {
    0%,  100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.45), 0 0 2px rgba(212, 175, 55, 0.3); }
    50%        { box-shadow: 0 0 22px rgba(212, 175, 55, 0.9),  0 0 8px rgba(212, 175, 55, 0.5); }
}

/* -------- Entry header (tags row) -------- */
.clg-entry-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0.45rem;
    min-height: 1.6rem;
}

.clg-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    vertical-align: middle;
}

.clg-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #fff;
    text-transform: uppercase;
}

/* -------- Entry body -------- */
.clg-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 0.5rem;
}

.clg-body {
    font-size: 0.9rem;
    color: rgba(232, 213, 183, 0.75);
    line-height: 1.65;
}
.clg-body p:last-child {
    margin-bottom: 0;
}

/* Subtle #N counter tucked in the bottom-right. */
.clg-entry-num {
    position: absolute;
    bottom: 0.6rem;
    right: 0.9rem;
    color: rgba(212, 175, 55, 0.5);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* -------- Filter pills -------- */
.clg-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    transition: opacity 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    opacity: 0.45;
}
.clg-filter-tag:hover { opacity: 0.8; }
.clg-filter-tag.is-active {
    opacity: 1;
    font-weight: 700;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3), 0 2px 10px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}
.clg-filter-tag:focus-visible,
.clg-clear-filter:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

.clg-clear-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    background: transparent;
}
.clg-clear-filter:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

/* -------- Empty state -------- */
.clg-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    border: 1px dashed rgba(212, 175, 55, 0.2);
    border-radius: 12px;
}
.clg-empty-icon {
    font-size: 2rem;
    color: rgba(212, 175, 55, 0.3);
    display: block;
    margin-bottom: 0.75rem;
}
.clg-empty-title {
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    margin: 0;
}

/* -------- Custom scrollbar (Cobalt only) -------- */
:root {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #0f0c1f;
}
::-webkit-scrollbar        { width: 6px; }
::-webkit-scrollbar-track  { background: #0f0c1f; }
::-webkit-scrollbar-thumb  { background: #d4af37; border-radius: 3px; }

/* -------- Reduced-motion accessibility -------- */
@media (prefers-reduced-motion: reduce) {
    .clg-bg-layer::before,
    .clg-bg-layer::after,
    .clg-dot--latest,
    .clg-badge-latest,
    .clg-entry {
        animation: none;
    }
    .clg-entry,
    .clg-entry:hover,
    .clg-dot,
    .clg-filter-tag,
    .clg-clear-filter {
        transition: none;
    }
}
