// General block styles.
.block {
    .well;
    padding: 8px 0;

    .header {
        h2 {
            .nav-header;
            font-size: 1.1em;
            word-wrap: break-word;
            margin: 0;
        }
        .block_action {
            padding: 3px 15px;
            float: right;
            > * {
                margin-left: 3px;
            }
            .block-hider-show,
            .block-hider-hide {
                cursor: pointer;
            }
            .block-hider-show {
                display: none;
            }
        }
    }
    .content {
        padding: 4px 14px;
        word-wrap: break-word;

        h3 {
            .nav-header;
            font-size: 1.1em;
        }
        hr {
            margin: 5px 0;
        }
        .userpicture {
            width: 16px;
            height: 16px;
            margin-right: 6px;
        }
        .list {
            li.listentry {
                clear: both;
            }
            .c0 {
                display: inline;
            }
            .c1 {
                margin-left: 5px;
                display: inline;
            }
        }
    }
    .footer {
        margin-bottom: 4px;
        display: block;
        padding: 3px 5px;
    }
    &.beingmoved {
        border-width: 2px;
        border-style: dashed;
    }
    &.invisible {
        .header h2 {
            .opacity(50);
        }
    }

    &.hidden .header .block_action {
        .block-hider-hide {
            display: none;
        }
        .block-hider-show {
            display: inline;
        }
    }
    &.list_block .unlist > li > .column {
        display: inline-block;
        .ie7-inline-block();
    }
}
.editing {
    .block {
        .header {
            .commands {
                clear: both;
                text-align: right;
                display: block;
                padding: 3px 15px;

                > a {
                    margin: 0 3px;
                }
                .icon img {
                    width: 12px;
                    height: 12px;
                }
                img.actionmenu {
                    width: auto;
                }
            }
        }
    }
}

// Hide the block content when the block has been minimised.
.jsenabled .block.hidden .content {
    display: none;
}

// Style the div used as a move target for non-drag+drop block moves.
.blockmovetarget {
    border-width: 2px;
    border-style: dashed;
    display: block;
    height: 1em;
    margin-bottom: 20px;
}

// Style the div that contains the cancel link for moving a block with JS disabled.
.blockannotation {
    // Blocks have a bottom margin of 20px, to associate this link with the block being moved
    // we move it up 10px, and then give it a bottom margin of 10px giving it a better visual association
    position: relative;
    top: -10px;
    margin-bottom: 10px;
}

// Styles for the blog menu block.
.block_blog_menu #blogsearchquery {
    max-width: 92%;
}

// Styles for the admin block.
.block_settings {
    #adminsearchquery {
        max-width: 92%;
    }
}

// Styles for the search forums block.
.block_search_forums {
    #searchform_search {
        width: auto;
        max-width: 92%;
    }
}

// Styles for the Calendar Upcoming block.
.block_calendar_upcoming {
    .content {
        .date {
            padding-left: 22px;
        }
        .footer {
            margin-top: .5em;
            padding-top: 10px;
            padding-left: 0;
        }
    }
}

// Styles for the RSS client block.
.block_rss_client {
    .content li {
        margin-bottom: 10px;
        padding: 5px;
        border: 1px solid @tableBorder;
        .border-radius(@baseBorderRadius);
        .link {
            font-weight: inherit;
        }
    }
    .list li:first-child {
        border-top-width: 1px; // undo the style provided by the block's styles.css
    }
}

// Styles for the news items block.
.block_news_items .content {
    .newlink {
        padding-bottom: 10px;
    }
    ul li {
        border-top: 1px rgba(0, 0, 0, 0.05) solid;
        padding: 2px;
        display: table;
        width: 100%;
        .info {
            display: table-header-group;
        }
        .date {
            font-size: @fontSizeSmall;
            display: inline;
        }
        .name {
            font-size: @fontSizeSmall;
            padding-left: 1ex;
            display: inline;
        }
    }
    .footer {
        padding-top: 10px;
        padding-left: 0;
    }
}

// Overide for login block.
.block_login {
    input#login_username,
    input#login_password {
        width: 95%;
    }
    .content {
        margin-left: auto;
        margin-right: auto;
        max-width: 280px;
    }
    input[type="submit"] {
        margin: 10px 0;
    }
}

// Styles for the special "Add block" block shown while editing.
.block_adminblock {
    .content {
        display: block;
        margin: 0 10px;
        padding: 3px 5px;
        width: auto;
    }
    .singleselect {
        display: block;
        select.singleselect {
            display: block;
            width: 100%;
        }
    }
}
