/* codetube
 *  Copyright (C) 2011 payload payload@lavabit.com
 *  Copyright (C) 2011 dodo dodo.the.last@gmail.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>
 */

@import config
@import utils
@import head
@import images
@import user-item
@import project-item
@import tree
@import biglist
@import spinner
@import progressbar
@import selectbranch
@import welcome
@import about

html
    height 100%

body
    background  color-darkest
    color       color-darkest
    font-family font-family
    font-size   font-size
    margin      0
    width       100%
    height      100%
    min-width 1.5pt*head-title-w

a
    text-decoration none
    color color-dark
    &:visited
        color color-dark
    &:hover
        color color-marking
    &:focus
        outline none
        color color-marking

h1
    margin 0

ul
    padding 0
    margin  0

table
    border-spacing 0
    width 100%
    .headline th
        &:last-child
            text-align right
        font-weight normal
        small-headline()
    .spaceline
        height page-gap
        line-height 0

fieldset
    display  inline !important
    border   none   !important
    margin-start    0
    margin-end      0
    padding-start   0
    padding-end     0
    padding-before  0
    padding-after   0


page()
    margin        page-gap
    padding       page-gap
    background    color-light
    border-radius small-border-radius
    min-width     small-page-w


#body-content
    min-height     100%
    margin-bottom  footer-height*-1
    position       relative

body > footer
    position   relative
    height     footer-height
    padding    0 page-gap 0 page-gap
    text-align right

#clear-footer
    clear  both
    height footer-height


.page
    page()

.small-page
    page()
    margin page-gap auto
    width small-page-w
    // TODO table layout, investigate form view
    div // XXX causes trouble
        //overflow auto
        label
            display inline
            float   right
        input
            width head-title-w - 6.1pt*font-size
    .submit
        overflow auto
        input
            min-width 5.2pt*font-size
            float right
            width auto

.login-alternatives
  display inline
  float left
  label
    padding 0

.small-headline
    text-align    right
    margin-bottom 1pt*font-size
    small-headline()

column-gap(x)
    -webkit-column-gap x
    -moz-column-gap x
    column-gap x
    -moz-column-rule-width x
    column-rule-width x

.columns
    column-width biglist-column-width
    column-gap   0px

.header
    height header-height
    display table
    width 100%
    > div
        display table-cell
    > .left
        vertical-align top
    > .right
        text-align right

.page .right-side
    float   right
    display inline-block
    width   head-title-w

.small-page .header
    text-align center

.headerbtns li.item
    display       inline-block
    width         auto
    height        auto
    float         right
    margin-right  some-small
    &:first-child
        margin-right 0

.headerbtn
    display       inline-block
    height        header-height
    width         header-height
    background    color-med
    color         color-dark
    border-radius some-small
    text-align    center
    span
        display     block
    .symbol
        margin      0
        padding     some-small 0 0 0
        font-size   symbol-font-size
    .text
        font-size   small-font-size
    &:hover
        color       color-marking
        background  color-lighty

.form
    .content
        margin-top page-gap

.commits
    .commit
        zebra()
        pad = some-small
        td
            padding     pad 0 pad pad
            margin      0
            width       1px
            line-height 1em
        td.last
            padding pad
        .avatar a img
            border-radius small-border-radius
        //.name
        .time
            white-space nowrap
            font-size small-font-size
        .message
            width auto
        .sha
            font-size small-font-size

.diff
    .head
        color color-marking
    .code
        .del
            background-color #FDD
            .specific
                background-color #FAA

        .add
            background-color #DFD
            .specific
                background-color #AFA

.sides
    display table
    .left-side
        display        table-cell
        min-width      head-title-w
        max-width      head-title-w
        vertical-align top
        width          100%
        padding-right  some-small
    .right-side
        display        table-cell
        min-width      head-title-w
        vertical-align top

.by
    font-size small-font-size
    color color-dark

.image_corners
    border-radius 3pt

.empty-info
    margin-left 250px
    min-height  200px

.blob > pre
    white-space pre
    &> code
        padding 0
        border-radius small-border-radius
        .text-blob
            word-wrap normal
            .numbers
                background-color color-darker
                border-radius small-border-radius
                float left
                padding small-border-radius*0.5
                .number
                    text-align    right
                    display block
            .content
                padding small-border-radius*0.5
                padding-left small-border-radius
                vertical-align top
                overflow-x scroll
                .line
                    padding 0
                    margin  0
            .selected
                background-color rgba(255, 255, 255, 0.1)

.diff > .files
    overflow-x    scroll

