/* ═══════════════════════════════════════════════
   Game Article Tracker — Sticky Sidebar
   Light theme · position:fixed · JS-driven
   ═══════════════════════════════════════════════ */

:root {
    --gat-bg:             #ffffff;
    --gat-border:         #e4e6eb;
    --gat-text:           #1c1e27;
    --gat-text-muted:     #858a9b;
    --gat-accent-game:    #5b3dc9;
    --gat-accent-series:  #099470;
    --gat-game-bg:        #f1edfc;
    --gat-game-bg-hover:  #e7e0fa;
    --gat-game-border:    #cfc3f0;
    --gat-series-bg:      #e8f7f2;
    --gat-series-bg-hover:#d8f0e8;
    --gat-series-border:  #afe0cd;
    --gat-shadow:         0 1px 3px rgba(0,0,0,0.04),
                          0 4px 16px rgba(0,0,0,0.06);
    --gat-radius:         10px;
    --gat-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gat-width:          172px;
}

/* ─── Fixed wrapper — JS sets top + left ─── */
.gat-sidebar {
    position: fixed;
    z-index: 1000;
    font-family: var(--gat-font);
    pointer-events: none;
    opacity: 0;                       /* hidden until JS positions it */
    transition: opacity 0.3s ease;
}
.gat-sidebar.gat-ready {
    opacity: 1;
}
.gat-sidebar.gat-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ─── Card ─── */
.gat-sidebar__inner {
    pointer-events: auto;
    width: var(--gat-width);
    background: var(--gat-bg);
    border: 1px solid var(--gat-border);
    border-radius: var(--gat-radius);
    padding: 14px;
    box-shadow: var(--gat-shadow);
}

/* ─── Header ─── */
.gat-sidebar__header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gat-border);
}

.gat-sidebar__icon {
    width: 14px;
    height: 14px;
    color: var(--gat-text-muted);
    flex-shrink: 0;
}

.gat-sidebar__title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--gat-text-muted);
    line-height: 1;
}

/* ─── Block (Game / Series) ─── */
.gat-sidebar__block {
    margin-bottom: 12px;
}
.gat-sidebar__block:last-child {
    margin-bottom: 0;
}

.gat-sidebar__label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin-bottom: 2px;
}
.gat-sidebar__block--game .gat-sidebar__label   { color: var(--gat-accent-game); }
.gat-sidebar__block--series .gat-sidebar__label { color: var(--gat-accent-series); }

.gat-sidebar__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gat-text);
    line-height: 1.3;
    margin-bottom: 6px;
    text-transform: capitalize;
}

/* ─── Count link ─── */
.gat-sidebar__count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    text-decoration: none !important;
    padding: 6px 9px;
    border-radius: 7px;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.gat-sidebar__block--game .gat-sidebar__count {
    background: var(--gat-game-bg);
    border: 1px solid var(--gat-game-border);
}
.gat-sidebar__block--series .gat-sidebar__count {
    background: var(--gat-series-bg);
    border: 1px solid var(--gat-series-border);
}

.gat-sidebar__count:hover { transform: translateY(-1px); }

.gat-sidebar__block--game .gat-sidebar__count:hover {
    background: var(--gat-game-bg-hover);
    box-shadow: 0 3px 10px rgba(91, 61, 201, 0.13);
}
.gat-sidebar__block--series .gat-sidebar__count:hover {
    background: var(--gat-series-bg-hover);
    box-shadow: 0 3px 10px rgba(9, 148, 112, 0.13);
}

.gat-sidebar__number {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}
.gat-sidebar__block--game .gat-sidebar__number   { color: var(--gat-accent-game); }
.gat-sidebar__block--series .gat-sidebar__number { color: var(--gat-accent-series); }

.gat-sidebar__unit {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--gat-text-muted);
}

/* ─── Separator ─── */
.gat-sidebar__block--game + .gat-sidebar__block--series {
    padding-top: 12px;
    border-top: 1px solid var(--gat-border);
}


/* ═══════════════════════════════════════════════
   BOTTOM BAR — JS adds .gat-bottom when no room
   ═══════════════════════════════════════════════ */
.gat-sidebar.gat-bottom {
    top: auto !important;
    left: 0 !important;
    bottom: 0;
    width: 100%;
    pointer-events: auto;
}

.gat-sidebar.gat-bottom .gat-sidebar__inner {
    width: 100%;
    max-width: none;
    border-radius: var(--gat-radius) var(--gat-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.gat-sidebar.gat-bottom .gat-sidebar__header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex-shrink: 0;
}

.gat-sidebar.gat-bottom .gat-sidebar__block {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gat-sidebar.gat-bottom .gat-sidebar__block--game + .gat-sidebar__block--series {
    padding-top: 0;
    border-top: none;
    padding-left: 14px;
    border-left: 1px solid var(--gat-border);
}

.gat-sidebar.gat-bottom .gat-sidebar__label  { margin-bottom: 0; }
.gat-sidebar.gat-bottom .gat-sidebar__name   { margin-bottom: 0; }
.gat-sidebar.gat-bottom .gat-sidebar__count  { padding: 4px 8px; }
.gat-sidebar.gat-bottom .gat-sidebar__number { font-size: 15px; }
