/*
 * Space Book Theme - Blue space exploration colors
 */

:root {
    /* Primary colors */
    --color-primary: #1b277b;
    --color-primary-light: #2f6f9e;
    --color-section-bg: #def1f3;

    /* Gradients */
    --gradient-primary: linear-gradient(90deg, #1b277b, #2f6f9e);
    --gradient-sidebar: linear-gradient(180deg, #1b277b 0%, #2f6f9e 100%);
    --gradient-button: linear-gradient(135deg, #1b277b, #2f6f9e);
    --gradient-welcome: linear-gradient(135deg, #def1f3 0%, #e8f4f8 100%);

    /* Tooltip */
    --color-tooltip-bg: rgba(27, 39, 123, 0.95);
}

/* Filter visibility rules */
.filter-container:has(#filter-missions:checked) ~ .content .section[data-tags*="missions"] {
    display: block;
}

.filter-container:has(#filter-rockets:checked) ~ .content .section[data-tags*="rockets"] {
    display: block;
}

.filter-container:has(#filter-spacecraft:checked) ~ .content .section[data-tags*="spacecraft"] {
    display: block;
}

.filter-container:has(#filter-science:checked) ~ .content .section[data-tags*="science"] {
    display: block;
}

/* Filter chip active states */
#filter-all:checked ~ .quick-filter-bar label[for="filter-all"],
#filter-missions:checked ~ .quick-filter-bar label[for="filter-missions"],
#filter-rockets:checked ~ .quick-filter-bar label[for="filter-rockets"],
#filter-spacecraft:checked ~ .quick-filter-bar label[for="filter-spacecraft"],
#filter-science:checked ~ .quick-filter-bar label[for="filter-science"] {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(27, 39, 123, 0.3);
}

#filter-all:checked ~ .quick-filter-bar label[for="filter-all"] .chip-count,
#filter-missions:checked ~ .quick-filter-bar label[for="filter-missions"] .chip-count,
#filter-rockets:checked ~ .quick-filter-bar label[for="filter-rockets"] .chip-count,
#filter-spacecraft:checked ~ .quick-filter-bar label[for="filter-spacecraft"] .chip-count,
#filter-science:checked ~ .quick-filter-bar label[for="filter-science"] .chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* TOC sync rules */
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#falcon9"],
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#starship"],
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#rocket-science"],
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#voyager"],
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#iss"],
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#exoplanets"],
body:has(#filter-missions:checked) .toc-sidebar .toc-link[href="#welcome"] {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}

body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#artemis"],
body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#apollo11"],
body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#viking"],
body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#voyager"],
body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#iss"],
body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#exoplanets"],
body:has(#filter-rockets:checked) .toc-sidebar .toc-link[href="#welcome"] {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}

body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#artemis"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#apollo11"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#viking"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#falcon9"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#starship"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#rocket-science"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#exoplanets"],
body:has(#filter-spacecraft:checked) .toc-sidebar .toc-link[href="#welcome"] {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}

body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#artemis"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#apollo11"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#viking"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#falcon9"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#starship"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#voyager"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#iss"],
body:has(#filter-science:checked) .toc-sidebar .toc-link[href="#welcome"] {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}
