@charset "utf-8"

// Mixins {{{
@mixin vertical-gradient($startColor: #555, $endColor: #333)
    background-color: $startColor
    background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
    background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */
    background-image:    -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */
    background-image:     -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
    background-image:      -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */
    background-image:         linear-gradient(to bottom, $startColor, $endColor)

@mixin radial-gradient($gradient)
    background-position: center center
    background-image: -webkit-radial-gradient(circle, $gradient)
    background-image: -moz-radial-gradient($gradient)
    background-image: -ms-radial-gradient($gradient)
    background-image: radial-gradient(circle, $gradient)

@mixin radius($radius: 5px)
    -moz-border-radius: $radius
    -webkit-border-radius: $radius
    border-radius: $radius

@mixin box-shadow($bsval: 0px 1px 4px #777)
    -moz-box-shadow: $bsval
    -webkit-box-shadow: $bsval
    -box-shadow: $bsval

@mixin box-sizing($sizing: border-box)
    -webkit-box-sizing: $sizing
    -moz-box-sizing: $sizing
    box-sizing: $sizing

@mixin transform($transform)
    -moz-transform: $transform
    -webkit-transform: $transform
    -o-transform: $transform
    -ms-transform: $transform

@mixin transition($transition: all 200ms linear)
    -webkit-transition: $transition
    -moz-transition: $transition
    -ms-transition: $transition
    -o-transition: $transition
    transition: $transition
// }}}

.openerp .oe_kanban_view
    // KanbanView {{{
    //background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==)
    background: white
    height: inherit
    &.oe_kanban_grouped .oe_kanban_dummy_cell
        background: url(/web/static/src/img/form_sheetbg.png)
        width: 100%
    .oe_kanban_group_length
        text-align: center
        display: none
        .oe_tag
            position: relative
            top: +8px
            font-weight: bold
    .oe_kanban_header:hover .oe_kanban_group_length
        display: none
    .ui-sortable-placeholder
        border: 1px solid rgba(0,0,0,0.1)
        visibility: visible !important
    .ui-sortable-helper
        @include box-shadow(0 1px 10px rgba(0, 0, 0, 0.3))
        @include transform(rotate(3deg))
        -webkit-transition: -webkit-transform 100ms linear
        -moz-transition: -moz-transform 100ms linear
        transition: transform 100ms linear
    .oe_kanban_left
        float: left
    .oe_kanban_right
        float: right
    .oe_kanban_clear
        clear: both
    .oe_kanban_content
        word-wrap: break-word
        .oe_star_on, .oe_star_off
            color: #ccc
            text-shadow: 0 0 2px black
            vertical-align: top
            position: relative
            top: -5px
            &:hover
                text-decoration: none
        .oe_star_on
            color: gold
        div:first-child
            margin-right: 16px
    .oe_kanban_button_new
        color: white
        background: #DC5F59
    // }}}
    // KanbanGroups {{{
    .oe_kanban_groups
        height: inherit
    &.oe_kanban_ungrouped .oe_kanban_groups
        width: 100%
    .oe_kanban_groups_records
        height: 100%
    &.oe_kanban_grouped_by_m2o .oe_kanban_group_title
        cursor: move
    .oe_kanban_header
        .oe_dropdown_kanban
            float: right
        .oe_dropdown_kanban > span
            visibility: hidden
        &:hover
            .oe_dropdown_kanban > span
                visibility: visible
        .oe_dropdown_menu
            font-weight: normal
            font-size: 13px
    .oe_kanban_group_title
        position: relative
        font-size: 16px
        font-weight: bold
        color: #333333
        text-shadow: 0 1px 0 white
        margin-right: 30px
        width: 200px
        .oe_kanban_group_title_text
            margin-right: 4px
            white-space: nowrap
            overflow: hidden
            text-overflow: ellipsis
    .oe_fold_column
        .oe_kanban_group_length
            position: absolute
            top: -1px
            right: -14px
            float: right
            display: block
    &.oe_kanban_grouped
        .oe_kanban_column, .oe_kanban_group_header
            width: 185px
            min-width: 185px
            &.oe_kanban_group_folded
                width: auto
                min-width: 30px

    .oe_kanban_column, .oe_kanban_group_header
        vertical-align: top
        padding: 5px 5px 5px 4px
        ul, li
            margin: 0
            padding: 0
            list-style-type: none
    .oe_kanban_group_header.oe_kanban_no_group
        padding: 0px

    &.oe_kanban_grouped .oe_kanban_column, .oe_kanban_group_header
        background: #f0eeee
        border-left: 1px solid #f0f8f8
        border-right: 1px solid #b9b9b9
    .oe_form
        .oe_kanban_column
            padding: 0px
            background: #ffffff
    &.oe_kanban_grouped
        .oe_kanban_column, .oe_kanban_column_cards
            height: 100%
    .oe_kanban_aggregates
        padding: 0
        margin: 0px
    .oe_kanban_group_folded
        .oe_kanban_group_title, &.oe_kanban_column *, .oe_kanban_aggregates, .oe_kanban_add
            display: none
        .oe_kanban_group_title_vertical, .oe_kanban_group_length
            display: block
        .oe_dropdown_kanban
            left: -5px
    .oe_kanban_group_title_undefined
        color: #666666
    .oe_kanban_group_title_vertical
        -webkit-transform: rotate(90deg)
        -moz-transform: rotate(90deg)
        -o-transform: rotate(90deg)
        -ms-transform: rotate(90deg)
        transform: rotate(90deg)
        width: 30px
        font-size: 24px
        white-space: nowrap
        display: none
        position: relative
        opacity: 0.75
        top: 26px
    // }}}
    // KanbanQuickCreate {{{
    .oe_kanban_add, .oe_kanban_header .oe_dropdown_toggle
        margin-left: 4px
        cursor: pointer
        position: relative
    .oe_kanban_add
        top: -8px
    .oe_kanban_header .oe_dropdown_toggle
        top: -2px
        height: 14px
    .oe_kanban_card, .oe_dropdown_toggle
        cursor: pointer
        display: inline-block
    .oe_kanban_add
        float: right

    .oe_kanban_quick_create_buttons
        margin: 4px 0
    .oe_kanban_no_group .oe_kanban_quick_create
        width: 185px
        padding: 10px
    .oe_kanban_quick_create input
        @include box-sizing(border-box)
        outline: none
        border: 1px solid transparent
        display: block
        margin-bottom: 8px
        font-size: 13px
        width: 100%
        @include box-shadow(none)
        &:focus
            border: 1px solid #A6A6FE
            @include box-shadow(0px 0px 7px rgba(0, 133, 255, 0.3) inset)
    // }}}
    // KanbanRecords {{{
    .oe_kanban_vignette
        padding: 8px
        min-height: 100px
    .oe_kanban_image
        display: inline-block
        vertical-align: top
        width: 64px
        height: 64px
        text-align: center
        overflow: hidden
        @include radius(3px)
        @include box-shadow(0 1px 4px rgba(0, 0, 0, 0.4))
    .oe_kanban_details
        display: inline-block
        vertical-align: top
        width: 240px
        font-size: 13px
        padding: 0 5px
        color: #4c4c4c
        h4
            margin: 0 0 4px 0
        .oe_tag
            display: inline-block
            margin: 0 2px 2px 0
    .oe_kanban_record
        position: relative
        display: block
        min-height: 20px
        margin: 0
        @include radius(4px)
        &:last-child
            margin-bottom: 0
        .oe_kanban_title
            font-weight: bold
            margin: 2px 4px
    &.oe_kanban_grouped
        .oe_kanban_record
            margin-bottom: 4px
    .oe_kanban_avatar_smallbox
        height: 40px
        width: 40px
        border: 1px solid
        border-color: #e5e5e5 #dbdbdb #d2d2d2
        @include radius(3px)
        @include box-shadow(0 1px 2px rgba(0,0,0,0.2))
    .oe_kanban_box
        background: #FFF
        border: 2px solid #CCC
        border-radius: 4px
        -moz-border-radius: 4px
        -webkit-border-radius: 4px
        margin-bottom: 5px
    .oe_kanban_box_header
        border-bottom: 1px solid #CCC
    .oe_kanban_title
        font-size: 95%
        font-weight: bold
        padding: 0 4px 0 4px
    .oe_kanban_small
        font-size: 80%
        font-weight: normal
    .oe_kanban_show_more
        clear: both
        text-align: center
    &.oe_kanban_grouped .oe_kanban_show_more .oe_button
        width: 100%
    &.oe_kanban_ungrouped .oe_kanban_column
        .oe_kanban_record
            display: inline-block
            padding: 2px
            vertical-align: top
            box-sizing: border-box
            -moz-box-sizing: border-box
            -webkit-box-sizing: border-box
    .oe_kanban_action_button
        height: 22px
        margin: 0
    .oe_kanban_action_a
        text-decoration: none
        &:hover
            text-decoration: none
    .oe_kanban_table
        width: 100%
        border: none
        border-collapse: collapse
        margin: 0
        padding: 0
    .oe_kanban_table tr td
        padding: 0
    .oe_kanban_table tr td.oe_kanban_title
        padding: 2px
    .oe_kanban_box_content
        padding: 4px
        font-size: 90%
    .oe_kanban_button
        border: 1px solid #8ec1da
        background-color: #ddeef6
        border-radius: 3px
        -moz-border-radius: 3px
        -webkit-border-radius: 3px
        color: #000000
        text-shadow: 0 1px #fff
        padding: 0 4px
        font-size: 85%
        margin: 1px
    a.oe_kanban_button:hover, .openerp button.oe_kanban_button:hover
        background-color: #eeddf6
    .oe_kanban_buttons_set
        border-top: 1px dotted
        white-space: nowrap
        padding-top: 2px
        position: relative
        clear: both
        a
            padding: 2px
    .oe_kanban_box_show_onclick
        display: none
    .oe_kanban_draghandle
        cursor: move
    .oe_kanban_color_border
        border-color: #CCCCCC
    .oe_kanban_color_border
        border-color: #CCCCCC
    .oe_kanban_tooltip ul, ul.oe_kanban_tooltip
        padding: 0 0 4px 0
        margin: 5px 0 0 15px
        list-style: circle
    .oe_kanban_highlight
        border-radius: 2px
        -moz-border-radius: 2px
        -webkit-border-radius: 2px
        padding: 1px 5px
        margin: 1px 4px
        white-space: nowrap
        display: inline-block
        line-height: 1em
    .oe_kanban_card, .oe_kanban_quick_create
        margin-bottom: 4px
        position: relative
        display: block
        background: white
        border: 1px solid rgba(0,0,0,0.16)
        border-bottom-color: rgba(0,0,0,0.3)
        padding: 5px
        display: block
        -webkit-transition: -webkit-transform, -webkit-box-shadow, border 200ms linear
        @include radius(4px)
        &:not(.ui-sortable-helper):hover
            border: 1px solid #7C7BAD
            @include box-shadow(0 0 4px #7C7BAD)
            .oe_dropdown_kanban > span
                visibility: visible
        h3
            margin: 0 16px 0 0
            color: #4c4c4c
            text-decoration: none
        h3:hover
            text-decoration: none
        .oe_dropdown_kanban
            .oe_kanban_project_times
                li
                    float: left
       
    .oe_kanban_star
        float: left
        position: inline-block
        margin: 0 4px 0 0
    .oe_kanban_avatar
        @include radius(3px)
        @include box-shadow(0 1px 2px rgba(0,0,0,0.2))
    .oe_kanban_footer_left
        margin-top: 2px
        > span
            margin-top: 2px
            display: inline-block
            background: #E6E6E6
            border: 1px solid #B9B9B9
            color: #666
            padding: 0 2px
            line-height: 16px
            @include radius(3px)
            .oe_e
                line-height: 12px
                font-size: 22px
        .oe_tags
            margin-right: 0
            .oe_tag
                display: inline-block
                padding: 0 2px
                line-height: 14px
        .oe_kanban_mail_new
            line-height: 18px
            background-color: #8a89ba
            color: white
            font-weight: bold
            position: relative
            top: -1px
    .oe_kanban_bottom_right
        float: right
        position: relative
        top: 2px

    .oe_kanban_status
        position: relative
        top: 4px
        display: inline-block
        height: 12px
        width: 12px
        @include radius(6px)
        @include radial-gradient((#eee 0%, #ccc 40%, #bbb 100%))
    .oe_kanban_status_green
        background: green
        @include radial-gradient((#55dd55 0%, #44aa44 40%, #339933 100%))
    .oe_kanban_status_red
        background: red
        @include radial-gradient((#ee7777 0%, #cc3333 40%, #bb0808 100%))
    .oe_kanban_text_red
        color: #A61300
        font-weight: bold
        @include radius(4px)
    .oe_kanban_ellipsis
        overflow: hidden
        text-overflow: ellipsis
        white-space: nowrap
    // }}}
    // KanbanDropDown {{{
    .oe_dropdown_kanban
        float: right
        cursor: pointer
        margin-top: -6px
        &:hover
            text-decoration: none
        .oe_dropdown_menu
            left: 0
            top: 28px
            min-width: 160px
            padding: 2px
            > li
                padding: 3px
    .oe_dropdown_kanban
        &.oe_opened > span
            visibility: visible
        > span
            visibility: hidden
    // }}}
    // KanbanColorPicker {{{
    .oe_kanban_colorpicker
        white-space: nowrap
    .oe_kanban_colorpicker li
        float: left
        margin: 0
        padding: 0
        a
            display: inline-block
            width: 16px
            height: 16px
            border: 1px solid white
        a:hover
            border: 1px solid gray !important
    .oe_kanban_colorpicker li:first-child a
        border: 1px solid #ccc
    // }}}
    // KanbanColors {{{
    .oe_kanban_color_0
        background-color: #FFFFFF
        color: #5a5a5a
    .oe_kanban_color_1
        background-color: #CCCCCC
        color: #424242
    .oe_kanban_color_2
        background-color: #FFC7C7
        color: #7a3737
    .oe_kanban_color_3
        background-color: #FFF1C7
        color: #756832
    .oe_kanban_color_4
        background-color: #E3FFC7
        color: #5d6937
    .oe_kanban_color_5
        background-color: #C7FFD5
        color: #1a7759
    .oe_kanban_color_6
        background-color: #C7FFFF
        color: #1a5d83
    .oe_kanban_color_7
        background-color: #C7D5FF
        color: #3b3e75
    .oe_kanban_color_8
        background-color: #E3C7FF
        color: #4c3668
    .oe_kanban_color_9
        background-color: #FFC7F1
        color: #6d2c70
    // }}}

.openerp .oe_form .oe_kanban_view
    .oe_kanban_column, .oe_kanban_group_header
        padding: 0px
        background: #ffffff

.openerp
    .oe_popup_form
        .oe_kanban_buttons
            .oe_highlight
                color: #404040
                background: none
            button.oe_highlight
                @include vertical-gradient(#efefef, #d8d8d8)
                @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))
            button.oe_highlight:active
                @include vertical-gradient(#e3e3e3, #f6f6f6)
                @include box-shadow(none)
            button.oe_highlight:hover
                @include vertical-gradient(#f6f6f6, #e3e3e3)
                @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))


// Internet Explorer 9+ specifics {{{
.openerp_ie .oe_kanban_view
    .oe_kanban_group_header .oe_kanban_group_title_vertical
        // TODO: check for IE10
        display: none !important
    .oe_kanban_group_header.oe_kanban_group_folded .oe_kanban_group_title_vertical
        display: inline-block !important
    .oe_kanban_group_title_vertical
        background: rgb(240, 238, 238)
    &.oe_kanban_grouped
        .oe_kanban_group_header
            height: 1%
// }}}

@media print
    .openerp
        .oe_kanban_groups
            button
                visibility: hidden
            a
                &[data-type=object], &[data-type=delete]
                    visibility: hidden
        .oe_kanban_view .oe_kanban_group_title
            text-shadow: none !important

// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:
