/*****************************************************************************
  S I D E B A R
*****************************************************************************/
.pp-sidebar {
    width: auto;
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 0.85rem;
    color: var(--colour-more-subdued-fg);
}

.pp-sidebar-box {
    padding: 2px;
}

.pp-sidebar a {
    color: var(--colour-subdued-secondary-fg);
}

.pp-sidebar a:hover, .pp-sidebar a:active {
    color: var(--colour-secondary-fg);
}

#pp-ink-stat {
    grid-area: inkStat;
}

#pp-currently-inked {
    grid-area: currentlyInked;
}

#pp-tags {
    grid-area: tags;
}

#pp-categories {
    grid-area: categories;
}

#pp-theme {
    grid-area: theme;
}

.pp-sidebar-widget {
    border: 1px solid var(--colour-secondary-bg);
    border-radius: var(--border-radius-s);
    background-color: var(--colour-secondary-bg);
    margin-bottom: 0.5em;
    /* border: 3px solid blue; */
}

.pp-sidebar-widget > * {
    margin: 0.5em;
}

@container pp-site-container (min-width: 946px) {
    .pp-sidebar {
        width: 26ch;
        margin-top: 1rem;
    }
}

@container pp-site-container (min-width: 700px) {

    .pp-home-sidebar > .pp-sidebar {
        width: auto;
        margin-top: 2rem;
    }

    .pp-home-sidebar .pp-sidebar-box {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 6em auto 4.5em;
        grid-template-areas:
      'inkStat tags categories'
      'currentlyInked tags categories'
      'theme tags categories';
        gap: 0 0.5em;
        margin: 0 2em 2em 2em;
        min-width: 26ch;
    }

}


/*
 * TAG CLOUD and CATEGORY LIST
 */
.pp-tags-sidebar {
    list-style: none;
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 0.85rem;
    padding: 0;
    margin: 0.5em;
}

.pp-category-list-sidebar {
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 0.85rem;
    padding-left: 1.4em;
    margin-bottom: 0.4em;
}

.pp-category-list-sidebar > li {
    margin-bottom: 0.1em;
}

.pp-tag-item-sidebar > a, .pp-category-list-sidebar a {
    color: var(--colour-more-subdued-fg);
    transition: all 0.3s ease;
}


/*
 * THEME SELECTOR BOX (dark|auto|light)
 */
.pp-sidebar-theme-box {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5em;
}

.pp-sidebar-theme-switch {
    display: flex;
    padding: 1px;
    border: 1px solid var(--colour-subdued-fg);
    border-radius: var(--border-radius-m);
    background-color: var(--colour-primary-bg);
    margin: 2px 2px 2px 1em;
    height: 2rem;
    width: 5rem;
    justify-content: space-evenly;
    align-items: center;
}

.pp-sidebar-theme-switch > input[type="radio"] {
    flex-grow: 0;
    opacity: 0;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.pp-sidebar-theme-switch > label {
    flex-grow: 0;
    flex-shrink: 0;
    background-color: var(--colour-more-subdued-fg);
    background-repeat: no-repeat;
    background-size: cover;
    transition: all 0.3s ease;
    width: 1.3rem;
    height: 1.3rem;
    padding: 2px;
    cursor: pointer;
}

.pp-sidebar-theme-switch > label[for^="pp-theme-radio-dark"] {
    -webkit-mask-image: url('/assets/icons/moon-and-star.svg');
    mask-image: url('/assets/icons/moon-and-star.svg');
}

.pp-sidebar-theme-switch > label[for^="pp-theme-radio-auto"] {
    -webkit-mask-image: url('/assets/icons/cogwheel.svg');
    mask-image: url('/assets/icons/cogwheel.svg');
}

.pp-sidebar-theme-switch > label[for^="pp-theme-radio-light"] {
    -webkit-mask-image: url('/assets/icons/sun.svg');
    mask-image: url('/assets/icons/sun.svg');
}


.pp-sidebar-theme-switch > input[type="radio"]:hover + label {
    background-color: var(--colour-subdued-fg);
}

.pp-sidebar-theme-switch > input[type="radio"]:checked + label {
    background-color: var(--colour-subdued-secondary-fg);
}

.pp-sidebar-theme-switch > input[type="radio"]:checked:hover + label {
    background-color: var(--colour-secondary-fg);
}


/* End of SIDEBAR ***********************************************************/
