/* ==========================================================================
   Roadmap Page Styles
   ========================================================================== */

/* Future / Planned items */
.roadmap-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.roadmap-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--border);
    background: var(--surface-alt);
    transition: background var(--duration-fast);
}

.roadmap-item:hover {
    background: var(--hover);
}

.roadmap-item.priority-high {
    border-left-color: #f87171;
}

.roadmap-content {
    flex: 1;
}

.roadmap-content strong {
    display: block;
    color: var(--text);
    font-size: var(--font-base);
}

.roadmap-desc {
    display: block;
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-top: 2px;
}

.roadmap-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}

.tag-data      { background: #dbeafe; color: #1e40af; }
.tag-ai        { background: #fae8ff; color: #86198f; }
.tag-analytics { background: #fef3c7; color: #92400e; }
.tag-ux        { background: #e0e7ff; color: #3730a3; }
.tag-infra     { background: var(--hover); color: var(--text-strong); }
.tag-feature   { background: #dcfce7; color: #166534; }
.tag-fix       { background: #fef9c3; color: #854d0e; }
.tag-ui        { background: #e0e7ff; color: #4338ca; }
.tag-docs      { background: #eff6ff; color: #1e40af; }
.tag-tech      { background: #e0f2fe; color: #075985; }
.tag-perf      { background: #fef3c7; color: #b45309; }
.tag-booking   { background: #fdf2f8; color: #9d174d; }
.tag-change    { background: #fef2f2; color: #991b1b; }

/* Changelog tag filter bar */
.changelog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    background: var(--surface-alt);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.changelog-filter-bar .filter-label {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 6px;
}
.changelog-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: var(--font-xs);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    background: var(--hover);
    color: var(--text-muted);
    transition: all var(--duration-normal) ease;
    text-decoration: line-through;
}
.changelog-filter-btn.active {
    text-decoration: none;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}
.changelog-filter-btn.active.tag-feature { background: #dcfce7; color: #166534; }
.changelog-filter-btn.active.tag-fix     { background: #fef9c3; color: #854d0e; }
.changelog-filter-btn.active.tag-ui      { background: #e0e7ff; color: #4338ca; }
.changelog-filter-btn.active.tag-data    { background: #dbeafe; color: #1e40af; }
.changelog-filter-btn.active.tag-perf    { background: #fef3c7; color: #b45309; }
.changelog-filter-btn.active.tag-ai      { background: #fae8ff; color: #86198f; }
.changelog-filter-btn.active.tag-tech    { background: #e0f2fe; color: #075985; }
.changelog-filter-btn.active.tag-booking { background: #fdf2f8; color: #9d174d; }
.changelog-filter-btn .filter-count {
    font-size: 0.72rem;
    font-weight: 400; /* quieter through weight: opacity .7 measured 3.36:1 */
}
.changelog-card.hidden-by-filter {
    display: none;
}

/* Changelog / Finished items */
.changelog-header h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.changelog-date-badge {
    display: inline-block;
    background: rgba(0,0,0,0.08);
    padding: 3px 10px;
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.changelog-entry {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--border);
    transition: background var(--duration-fast);
}

.changelog-entry:hover {
    background: var(--hover);
}

.changelog-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
    min-width: 52px;
    text-align: center;
}

.changelog-time {
    display: inline-block;
    font-size: 0.68rem;
    color: var(--text-muted);
    min-width: 58px;
    margin-top: 3px;
    flex-shrink: 0;
}

.changelog-text {
    flex: 1;
    font-size: var(--font-base);
    color: var(--text);
    line-height: 1.45;
}

.changelog-text strong {
    color: var(--text);
}


/* ==========================================================================
   Changelog v2 — reader-value categories, highlights-first, deep-links.
   Data: utils/changelog_data.py. Rendered by templates/novinky.html +
   templates/partials/_changelog_item.html. Driven by an Alpine (CSP build)
   component registered in novinky.html.
   ========================================================================== */

/* Keep Alpine-managed regions hidden until Alpine boots (no flash of drawers). */
[x-cloak] { display: none !important; }

/* Highlights / Everything segmented toggle */
.changelog-viewbar {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: var(--space-md);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}
.changelog-viewbtn {
    padding: 5px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}
.changelog-viewbtn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* Reader-value category colours (chips + active filter buttons) */
.cat-federation  { background: #dcfce7; color: #166534; }
.cat-feature     { background: #e0e7ff; color: #4338ca; }
.cat-prediction  { background: #fae8ff; color: #86198f; }
.cat-history     { background: #fef3c7; color: #92400e; }
.cat-club        { background: #fdf2f8; color: #9d174d; }
.cat-improvement { background: var(--hover); color: var(--text-strong); }

.changelog-filter-btn.active.cat-federation  { background: #dcfce7; color: #166534; }
.changelog-filter-btn.active.cat-feature     { background: #e0e7ff; color: #4338ca; }
.changelog-filter-btn.active.cat-prediction  { background: #fae8ff; color: #86198f; }
.changelog-filter-btn.active.cat-history     { background: #fef3c7; color: #92400e; }
.changelog-filter-btn.active.cat-club        { background: #fdf2f8; color: #9d174d; }
.changelog-filter-btn.active.cat-improvement { background: var(--hover); color: var(--text-strong); }

/* Highlight emphasis (prominent rows shown in both views) */
.changelog-entry.is-highlight {
    border-left-width: 4px;
    border-left-color: var(--primary);
    background: var(--surface-alt);
    padding: var(--space-md);
}
.changelog-entry.is-highlight .changelog-text strong { font-size: 1.04rem; }
.changelog-entry.cat-federation.is-highlight { border-left-color: #16a34a; }
.changelog-entry.cat-history.is-highlight    { border-left-color: #d97706; }
.changelog-entry.cat-prediction.is-highlight { border-left-color: #a21caf; }

/* Country flag(s) inline in an item */
.changelog-flag { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.changelog-flag img { width: 26px; height: auto; border-radius: 3px; border: 1px solid var(--border); }

/* "Find out more" deep-link */
.changelog-cta {
    display: inline-block;
    margin-top: 4px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.changelog-cta:hover { text-decoration: underline; }
/* The highlighted entry sits on --surface-alt; dark --primary is 4.07:1 there. */
[data-theme="dark"] .changelog-cta { color: #93c5fd; }

/* Collapsed "more updates" drawer (the routine improvements) */
.changelog-minorwrap { margin-top: var(--space-sm); }
.changelog-drawer-toggle {
    background: none;
    border: none;
    padding: 6px 2px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}
.changelog-drawer-toggle:hover { color: var(--text); }
.changelog-minor {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
    padding-left: var(--space-sm);
    border-left: 2px solid var(--border);
    /* Replaces Alpine's x-collapse (its plugin is not in the CSP build), so the
       drawer still eases open instead of snapping. */
    animation: changelog-drawer-in 180ms ease-out;
}
@keyframes changelog-drawer-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .changelog-minor { animation: none; }
}

/* Dark overrides, moved here from themes/dark.css when this file left the
   main bundle (2026-10). They must FOLLOW the light rules above: several tie
   on specificity (.roadmap-item.priority-high, .roadmap-item:hover), and
   inside main.bundled.css the dark theme came after this file. */
[data-theme="dark"] .roadmap-item {
    background: var(--surface);
    border-left-color: var(--border);
}

[data-theme="dark"] .changelog-entry:hover {
    background: var(--surface);
}

[data-theme="dark"] .changelog-text {
    color: var(--text-secondary);
}
