/* 

Built on Rock Hammer by Stuff and Nonsense
URL: http://stuffandnonsense.co.uk/projects/rock-hammer/ 

*/

$media-queries-supported : true;
$fullwidth               : 46em;
$navwidth                : 52px;

// Import all SASS imports
@import 'imports';

.dim {
    color: $lightneutralcolor;    

    a {
    color: $lightneutralcolor;    
    
    &:visited {
    color : $lightneutralcolor; }
    
    &:hover {
    color : $linkcolorhover; }
    
    &:focus {
    color : $linkcolorfocus; }
    }    
}


.meta {
    @include font-size(14);
    .actions {
        .fa { cursor: pointer; }
    }

    .icon-saved {
        color: #ebcd0c; 
    }
}             

.expanded {
    .meta {
        .feed {
            text-transform: uppercase;
            @extend .spaced;
        }        
        .actions {
            float: right;
        }
    }
}


.help-text {
    //@extend abbr[title];
}

.tooltip {
    white-space: nowrap;           
    &.bottom { margin-bottom: 7px; }
}

.popover-content {
    .btn { display: block; margin: 0 0 $baselineheight / 3 0; }
    .btn:last-child { margin-bottom: 0; }
}

.module {
    max-width: $fullwidth; 
    margin: 0 auto $baselineheight auto;
    h2 { margin-top: 0; } // Title
}

.panel  {
    box-sizing: border-box;
    margin: $baselineheight/2 $gutterwidth/2 0 $navwidth + $gutterwidth/2; // Make room for left nav
}

.panel-content {

    // Common styles

    ul.view {
        list-style: none;
        @include zero;
        max-width: $fullwidth;
        margin: 0 auto;
        
        > li {
            @include zero;

            &.heading {
                @include clearfix;
                padding: $baselineheight/2 $gutterwidth*1.5;
                background: $lightestneutralcolor;

                &:first-child {
                    border-top-left-radius: $borderradius;
                    border-top-right-radius: $borderradius;
                }

                h2 {
                    @extend .h4;                    
                    text-transform: uppercase;
                    color: $lightneutralcolor;
                    letter-spacing: 1px;
                    span { display: none; }
                }                

                // Show feed name on first heading only
                &:first-child h2 span {
                    display: inline; 
                }
                
                .toolbar {
                    float: right;
                    display: none;
                }
                
                // Show on first heading only
                &:first-child .toolbar {
                    display: block; 
                }
            }
            
            .item-inner {
                background: $white;
                //@include transition(background .1s ease-out);
                padding: $baselineheight/2 $gutterwidth*1.5; 

                // Title
        
                > h3 {
                    a { display: block; }
                }
    
                .favicon {
                    float: left;
                    margin: 4px 0 0 (-$gutterwidth);
                }
            }        

            // Feeds
            
            &.status-disabled {

                .item-inner {
                    background-color: lighten($secondarycolor, 57%);
                    h3 {
                        text-decoration: line-through;
                    }
                }                                
            }

            &.status-sick {

                .item-inner {
                    background-color: $warningcolor;
                }                                
            }


        }

        .more {
            clear:both;
            text-align: center;
            padding: $baselineheight/2 0;                           
            a {
                width: 100%;
                display: inline-block;
            }
        }        

    }

    // List view

    ul.list-view {

        @include box-shadow(0 0 4px $lightneutralcolor);                        

                
        > li {  
        
            &:not(.expanded) .actions {
                opacity: 0;
                @include visuallyhidden;                
                @include transition(opacity .15s ease-out);
            }

            &:hover {
                .actions {
                    opacity: 1;
                    @include visible;
                }            
                &:not(.expanded) .feed {
                    @include hidden;              
                }
            }    
            
            .item-inner {
                border-bottom: 1px solid $lightestneutralcolor;                       
            }

            &.expanded .item-inner {
                padding: $baselineheight $gutterwidth*1.5;    
                border-bottom: none;                       
            }
                        
            &:first-child .item-inner {
                border-top-left-radius: $borderradius;
                border-top-right-radius: $borderradius;
            }

            &:last-child .item-inner {
                border-bottom-left-radius: $borderradius;
                border-bottom-right-radius: $borderradius;
            }
            
            // Read, unread, etc.
            
            .meta .icon-read {
                display: none;
                @extend .fa-circle-o;
                margin-left: $gutterwidth/2;   
            }

            .meta .icon-unread {
                @extend .fa-circle;
                margin-left: $gutterwidth/2;   
            }

            .meta .icon-saved {
                display: none;
                @extend .fa-star;
            }

            .meta .icon-unsaved {
                @extend .fa-star-o;
            }
            
            &.status-read {
                h3 {
                    a:link {
                        color: rgba($linkcolor, .7);
                    }
                    a:hover {
                        color: $linkcolorhover;
                    }
                }                    
                .meta .icon-read {
                    display: inline-block;
                }
                .meta .icon-unread {
                    display: none;
                }
            }

            &.status-saved {
                .meta .icon-saved {
                    display: inline-block;
                    @include transform(scale(1.3,1.3));
                }
                .meta .icon-unsaved {
                    display: none;
                }
            }

/*
            &.current {
                .item-inner {                    
                    //background: #e1eef5 url(../images/rarr.png) left 14px  no-repeat;
                    background: #e1eef5;
                }
                h3 {
                    a {
                        color: $secondarycolor;
                    }
                }
            }
*/


        }

        .more {
            background: $lightestneutralcolor;            
            border-bottom-left-radius: $borderradius;
            border-bottom-right-radius: $borderradius;
        }        

    }

    // Grid view

    ul.grid-view {
        @include clearfix;

        //margin: 0 $gutterwidth 0 $gutterwidth*1.5;            
    
        > li.entry, 
        > li.feed  {
            @include box-sizing(border-box);
            padding-left: $gutterwidth/2;            
            padding-right: $gutterwidth/2;            

            float: left;
            width: 50%;
            margin-bottom: $baselineheight;
            
            .item-inner {
                position: relative;                    
                @include box-shadow(0 0 4px $lightneutralcolor);                
                min-height: 96px; // Three rows
                border-radius: $borderradius;

                .meta {
                    opacity: 0;
                    @include visuallyhidden;                
                    @include transition(opacity .15s ease-out);

                    bottom: 0;
                    left: 0;
                    right: 0;
                    position: absolute;
                    background: rgba($lightestneutralcolor, .8);                    
                    padding: $baselineheight/4 0 $baselineheight/4 $gutterwidth*1.5;
                    border-bottom-right-radius: $borderradius;
                    border-bottom-left-radius: $borderradius;
                    
                }
            }
            
            .item-inner:hover {
                .meta {
                    opacity: 1;
                    @include visible;                                        
                    position: absolute;
                }
            }
        }

        

    }


}




  
footer[role="contentinfo"] {
    @include zero;
    margin: $baselineheight*3 0 $baselineheight 0; 
    text-align: center;    
    .fa-heart {
        cursor: help;
    }
}

.page {    
    max-width: $fullwidth;
    margin: $baselineheight/2 auto 0 auto;
    background: $white;
    padding: $baselineheight $gutterwidth*1.5;   
    @include box-shadow(0 0 4px $lightneutralcolor);    
    border-radius: $borderradius;            
}

dl.shortcuts {
    @include zero;
    @include font-size(14);

    dt {
        margin: $baselineheight 0 $baselineheight/2 0;
        text-transform: uppercase;            
        letter-spacing: 2px;
        color: $lightneutralcolor;
        font-weight: bold;
    }
    
    dd {
        margin-bottom: $baselineheight/2 !important;
    }
}
    
// A keyboard shortcut

kbd {
    //@include font-size(13);
    padding: 2px 0;
    width: 2em;
    display: inline-block;
    background: $lightestneutralcolor; 
    text-align: center;                            
    border-radius: $borderradius;
    color: $neutralcolor;
    text-transform: uppercase;
    box-shadow: 0 1px 0 $lightneutralcolor;
}


pre {
    background: $lightestneutralcolor;    
    border-radius: $borderradius;
    padding: 8px 4px;
}


// Colored one-liner messages on forms or sitting on top of the page
.alert {
    text-align: center;
    margin: 0;
}

// Messages taking all panel height
.notice {
    text-align: center;
    margin: 25% 0 20% 0;    
    @extend .dim;    
    i {
        display: block;
        opacity: .6;
        margin: $baselineheight 0 0;        
    }
    
}


// =flash ================================

.flash {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: -3em;    
    margin-top: -3em;    
    z-index: 3;
    width: 6em;
    padding: $baselineheight*2 $gutterwidth*2;

    border-radius: $borderradius;    
    background: rgba($lightestneutralcolor, .85);        
    text-align: center;    
}

.loading {
    text-align: center;    
    color: $neutralcolor;
    //margin: $baselineheight/2 0;
}

// =entry ================================

article {
    @include clearfix;
    .content {        

    
        // Headings

        h1 { border: none; }
        
        // Other block-level elements 
        
        p, blockquote, figure, table, ul, ol, dl {
            @include zero;
            margin: $baselineheight/2 0;        
            &:first-child {
                margin-top: 0;
            }
        }
        
        blockquote { 
            color: $secondarycolor;        
            padding: 0 $gutterwidth;
            p:last-child {
                margin-bottom: 0;
            }
        }
    
        // List items 
        
        li, dd {
            @include zero;
            margin: 0 0 $baselineheight/4 $gutterwidth;                
        }
    
        // Images
        
        img {
        }
        
        // Misc. 
        
        hr {
            margin: $baselineheight 0;        
        }
        
        .continue {
            text-align: center;
            clear: both;
            margin: $baselineheight 0 0 0;
        }
        
    }
    
}
        
 
// Forms

#modal-feed-edit {

    table {
        margin-top: $baselineheight;
    }


    th, td {
        border-top-color: $lighterneutralcolor; 
    }

    .enabled { color: $successcolor; }
    .disabled { color: $errorcolor; }

    code {
        background: $lightestneutralcolor;    
        border-radius: $borderradius;
        padding: 2px 4px;        
    }    
    
    .favicon {
        vertical-align: baseline;
    }
}


nav { 
    
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 3;
    
    background: $navigationbackgroundcolor;

     a {
        color : $navigationlinkcolor;    
        
        &:visited {
        color : $navigationlinkcolor; }
        
        &:hover {
        text-decoration : none;
        color : $navigationlinkcolorhover; 
        background: darken($navigationbackgroundcolor, 15%); }
        
        &:focus {
        color : $navigationlinkcolorhover; }
    }

    ul {

        @include zero;
        list-style: none;
                
        > li {
            position: relative;

            &.sep {
                margin-top: $baselineheight/2;
            }

            &.branding {
                color: $white;
                background: darken($primarycolor, 10%);                        
                padding: $baselineheight/4 $baselineheight/1.5;   
                @include font-size(16);
                text-transform: uppercase;
                letter-spacing: 2px;                
            }
    
            > a {
                display: block;
                @include font-size(16);
                padding: $baselineheight/4 $baselineheight/1.5;
                text-transform: capitalize;
            }

        }

        &.unread li.filter-unread,
        &.saved li.filter-saved,
        &.feeds li.filter-feeds,
        &.groups li.filter-group,        
        &.all li.filter-all {
            > a {
                color: $white;
                background: $neutralcolor;                  
            }
        }
    }
  
} // nav


// Customized Bootstrap dropdown menu

.dropdown {
.dropdown-menu {
    @include zero;
    min-width: 12em;
    position: absolute;
    z-index: 4;
    top: -3px;
    left: 2.6em;
    display: none;
    background: $white;
    border: 1px solid $bordercolor;
    border-radius: $borderradius;
    @include box-shadow(0 0 4px rgba($neutralcolor, .5));                        

    a {
        @include font-size(14);   
        white-space: nowrap;                 
        border-bottom: 1px solid $bordercolor;
        
        &:hover {
        color : $navigationlinkcolor; 
        background: $lightestneutralcolor }
    }

    li:last-child a { border-bottom: none; }
}
&.open {
    background: darken($navigationbackgroundcolor, 15%); // Like hover
    // Show 
    .dropdown-menu { display: block; }
}
} // dropdown




