.collapse-inline {
    width: 78%;
}


// custom block heading pre gridstack
.column-layout {
    &:nth-child(3n+1) {
        .card.card-secondary,
        .blockinstance {
            &:nth-child(5n+1) > .card-header, .card-header-nested {
                background-color: scale-color($theme-primary-color, $lightness: 10%);
            }
            &:nth-child(5n+2) > .card-header, .card-header-nested {
                background-color: $theme-accent-color;
            }
            &:nth-child(5n+3) > .card-header, .card-header-nested {
                background-color: $theme-accent-color-two;
            }
            &:nth-child(5n+4) > .card-header, .card-header-nested {
                background-color: $theme-secondary-color;
            }
            &:nth-child(5n+5) > .card-header, .card-header-nested {
                background-color: $theme-accent-color-three;
            }
        }
    }
    &:nth-child(3n+2) {
        .card.card-secondary,
        .blockinstance {
            &:nth-child(5n+1) > .card-header, .card-header-nested {
                background-color: $theme-accent-color-two;
            }
            &:nth-child(5n+2) > .card-header, .card-header-nested {
                background-color: $theme-secondary-color;
            }
            &:nth-child(5n+3) > .card-header, .card-header-nested {
                background-color: $theme-accent-color-three;
            }
            &:nth-child(5n+4) > .card-header, .card-header-nested {
                background-color: scale-color($theme-primary-color, $lightness: 10%);
            }
            &:nth-child(5n+5) > .card-header, .card-header-nested {
                background-color: $theme-accent-color;
            }
        }
    }
    &:nth-child(3n+3) {
        .card.card-secondary,
        .blockinstance {
            &:nth-child(5n+1) > .card-header, .card-header-nested {
                background-color: $theme-accent-color-three;
            }
            &:nth-child(5n+2) > .card-header, .card-header-nested {
                background-color: scale-color($theme-primary-color, $lightness: 10%);
            }
            &:nth-child(5n+3) > .card-header, .card-header-nested {
                background-color: $theme-accent-color;
            }
            &:nth-child(5n+4) > .card-header, .card-header-nested {
                background-color: $theme-accent-color-two;
            }
            &:nth-child(5n+5) > .card-header, .card-header-nested {
                background-color: $theme-secondary-color;
            }
        }
    }
}

// gridstack card-header colors
.grid-stack .grid-stack-item {
    &:nth-child(5n+1) .card-header,
    &:nth-child(5n+1) .card.card-secondary.blockinstance.card .card-header {
        background-color: scale-color($theme-primary-color, $lightness: 10%);
        color: $card-secondary-header-color;
    }
    &:nth-child(5n+2) .card-header,
    &:nth-child(5n+2) .card.card-secondary.blockinstance.card .card-header  {
        background-color: $theme-accent-color;
        color: $card-secondary-header-color;
    }
    &:nth-child(5n+3) .card-header,
    &:nth-child(5n+3) .card.card-secondary.blockinstance.card .card-header  {
        background-color: $theme-accent-color-two;
        color: $card-secondary-header-color;
    }
    &:nth-child(5n+4) .card-header,
    &:nth-child(5n+4) .card.card-secondary.blockinstance.card .card-header  {
        background-color: $theme-secondary-color;
        color: $card-secondary-header-color;
    }
    &:nth-child(5n+5) .card-header,
    &:nth-child(5n+5) .card.card-secondary.blockinstance.card .card-header  {
        background-color: $theme-accent-color-three;
        color: $card-secondary-header-color;
    }
    .has-attachment .card-header,
    .card.card-secondary.blockinstance.card .has-attachment .card-header {
        background-color: $card-header-bg;
        color: $card-header-color;
        &:hover,
        &:focus {
          background-color: $card-bg;
        }
        .collapse-indicator {
          color: $theme-primary-color;
          line-height: 1;
        }
    }
}

.card {
    .card-header:before {
        @include fonttype(solid);
        color: rgba(255, 255, 255, 0.6);
        padding-right: $spacing-sm;
        vertical-align: top;
    }
    // custom icons to some blocks, they do not appear on the edit page
    &.bt-newviews .card-header:before {
        content: fa-content($fa-var-bullhorn);
    }
    &.bt-inbox .card-header:before{
        content: fa-content($fa-var-inbox);
    }
    &.bt-myviews .card-header:before {
        content: fa-content($fa-var-file);
    }
    &.bt-filedownload .card-header:before {
        content: fa-content($fa-var-download);
    }
    &.bt-folder .card-header:before {
        content: fa-content($fa-var-folder);
    }
    &.bt-gallery .card-header:before {
        content: fa-content($fa-var-images);
    }
    &.bt-internalmedia .card-header:before {
        content: fa-content($fa-var-video);
    }
    &.bt-pdf .card-header:before {
        content: fa-content($fa-var-file-pdf);
    }
    &.bt-html .card-header:before {
        content: fa-content($fa-var-code);
    }
    &.bt-blog .card-header:before {
        content: fa-content($fa-var-pen);
    }
    &.bt-blogpost .card-header:before {
        content: fa-content($fa-var-file-alt);
    }
    &.bt-recentposts .card-header:before {
        content: fa-content($fa-var-clock);
    }
    &.bt-taggedposts .card-header:before {
        content: fa-content($fa-var-tags);
    }
    &.bt-comment .card-header:before {
        content: fa-content($fa-var-comment);
    }
    &.bt-annotation .card-header:before {
        content: fa-content($fa-var-sticky-note);
    }
    &.bt-creativecommons .card-header:before {
        content: fa-content($fa-var-creative-commons);
    }
    &.bt-navigation .card-header:before {
        content: fa-content($fa-var-location-arrow);
    }
    &.bt-plans .card-header:before {
        content: fa-content($fa-var-tasks);
    }
    &.bt-recentforumposts .card-header:before {
        content: fa-content($fa-var-comments);
    }
    &.bt-textbox .card-header:before {
        content: fa-content($fa-var-edit);
    }
    &.bt-profileinfo .card-header:before {
        content: fa-content($fa-var-address-card);
    }
    &.bt-socialprofile .card-header:before {
        content: fa-content($fa-var-thumbs-up);
    }
    &.bt-entireresume .card-header:before {
        content: fa-content($fa-var-star);
    }
    &.bt-resumefield .card-header:before {
        content: fa-content($fa-var-star);
    }
    &.bt-externalfeed .card-header:before {
        content: fa-content($fa-var-rss);
    }
    &.bt-externalvideo .card-header:before {
        content: fa-content($fa-var-youtube);
    }
    &.bt-googleapps .card-header:before {
        content: fa-content($fa-var-google);
    }
    &.bt-wall .card-header:before {
        content: fa-content($fa-var-quote-left);
    }
    &.bt-myfriends .card-header:before {
        content: fa-content($fa-var-user-friends);
    }
    &.bt-mygroups .card-header:before {
        content: fa-content($fa-var-users);
    }
    &.bt-image .card-header:before {
        content: fa-content($fa-var-image);
    }
    &.bt-text .card-header:before {
        content: fa-content($fa-var-font);
    }
    &.bt-watchlist .card-header:before {
        content: fa-content($fa-var-eye);
    }
    &.bt-peerassessment .card-header:before {
        content: fa-content($fa-var-list);
    }
    &.bt-signoff .card-header:before {
        content: fa-content($fa-var-signature);
    }
    &.bt-openbadgedisplayer .card-header:before {
        content: fa-content($fa-var-shield-alt);
    }
}
.card.card-regular .card-header:before {
    @include fonttype(regular);
}
.card.card-brand .card-header:before {
    @include fonttype(brands);
}

// remove the empty icon in attached files header
.has-attachment .card-header::before {
    display: none;
}

// outcomes block at the top outside of columns
.bt-activitysupport.card.card-secondary {
    > .card-header, .card-header-nested {
        background-color: scale-color($theme-primary-color, $lightness: -10%);
    }
}