
$o-wo-tablet-padding: $o-horizontal-padding;
$o-wo-tablet-btn-margin: 2px;
$o-wo-tablet-bg: #404040; // emulate the pdf reader
$o-wo-tablet-btn-bg: #505050; // emulate the pdf reader
$o-wo-tablet-bg-dark: #333333;
$o-wo-tablet-border-bg: #c9ccd2;
$o-wo-tablet-text: color-contrast($o-wo-tablet-bg, $body-color, #FFF);

.o_tablet_client_action {
    display: flex;
    flex-flow: column;
    padding: 0;
    background-color: $o-wo-tablet-bg;
    color: $o-wo-tablet-text;
    height: 100%;
    ::-webkit-scrollbar {
        width: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: $o-wo-tablet-border-bg;
    }

    ::-webkit-scrollbar-track {
        background: gray;
    }

    // font-size: $o-navbar-entry-font-size;

    // Components
    h1,h2,h3,h4,h5,h6 {
        color: $o-wo-tablet-text;
    }
    .o_workorder_blocking_screen {
        height: 100%;
        width: 100%;
        position: fixed;
        background: rgba(0, 0, 0, 0.4);
        z-index: 50;
    }

    .o_view_controller.o_form_view {
        color: $o-wo-tablet-text;
        background-color: $o-wo-tablet-bg;
        background-repeat: repeat;
        // background-image: url(/web/static/lib/pdfjs/web/images/texture.png);
        border: $o-wo-tablet-bg;
        text-transform: capitalize;
        min-height: auto;
        height: auto!important;
        position: unset!important;
        .row {
            width: 100%;
        }
        .o_form_nosheet {
            padding: 0;
        }
        .o_workorder_tablet_form {
            display: flex;
            flex-flow: column;
            justify-content: flex-start;
            align-items: stretch;
            padding: 0 $o-wo-tablet-padding*0.5;
            margin-top: 0;
            font-size: 1.3em;
            &.form_top {
                min-height: 100px;
                border-bottom: 1px solid $o-wo-tablet-border-bg;
                background-color: $o-wo-tablet-bg-dark;
                padding-bottom: 0;
            }
            span.o_tag {
                background-color: $o-wo-tablet-bg-dark;
                box-shadow: none;
            }
            .o_unblock {
                z-index: 100;
                position: relative;
            }

            .o_workorder_bar_content{
                display: flex;
                flex-flow: row wrap;
                align-items: center;

                &.o_workorder_bar_left {
                    flex: 1 0;
                }

                &.o_workorder_bar_center {
                    flex: 0 0 auto;
                }

                @include media-breakpoint-down(sm) {
                    justify-content: flex-start;
                    &.workorder_bar_left {
                        flex-flow: wrap;
                    }
                }

                &.o_workorder_bar_right {
                    justify-content: flex-end;
                    flex: 1 0;
                    align-content: baseline;
                    @include media-breakpoint-down(sm) {
                        justify-content: flex-start;
                        .o_actions {
                            display: flex;
                            flex-flow: column;
                            width: 100%;
                        }
                    }
                }
                .o_workorder_lot {
                    display: flex;
                    flex-flow: row;
                    align-items: center;
                    margin-left: 1em;
                }
            }

            // First Top Block
            .o_workorder_bar {
                display: flex;
                justify-content: space_around;
                flex-flow: row nowrap;
                padding: $o-wo-tablet-padding*0.5 0;
                @include media-breakpoint-down(sm) {
                    flex-flow: column;
                }
                .o_workorder_field {
                    margin: 0 5px;
                }
            }

            // Last top Block
            .o_workorder_actions {
                display: flex;
                flex-flow: row nowrap;
                @include media-breakpoint-down(sm) {
                    flex-flow: column;
                }
                padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding - $o-wo-tablet-btn-margin $o-wo-tablet-padding;
                box-shadow: 0 1px 1px rgba(black, 0.3);
                font-size: 1.2em;
            }
            .o_workorder_left {
                display: flex;
                flex-flow: row;
                height:100%;
            }

            .btn {
                font-size: 1em;
                padding: 0.4em 1em;
                margin: $o-wo-tablet-btn-margin;

                &.btn-secondary {
                    color: $o-wo-tablet-text;
                    &:not(.btn-link) {
                        background-color: $o-wo-tablet-btn-bg;
                        border: $o-wo-tablet-bg;
                        text-transform: capitalize;
                    }
                }
            }

            .o_field_widget {
                margin-bottom: 0;
            }
        }
    }

    .o_tablet_bottom_content {
        display: flex;
        overflow: auto;
        overflow: hidden;
        height: 100%;
        .o_tablet_timeline {
            height: 100%;
            overflow: auto;
            flex-basis: 20%;
        }

        .o_tablet_instructions_content {
            flex-basis: 100%;
            flex-grow: 1;
            overflow: hidden;
            display: flex;
            flex-flow: column;
            padding-left: 0;
            &:first-child {
                margin-bottom: -24px;
            }
            .o_tablet_instruction_note {
                padding: $o-wo-tablet-padding*0.5;
                overflow: auto;
            }
            .o_tablet_document {
                width: 100%;
                height: 100%;
                overflow: auto;
                iframe {
                    border: none;
                    width: 100%;
                    height: 100%;
                }
                img {
                    max-width: 75%;
                }

            }
        }
    }


    .o_input {
        background-color: $o-wo-tablet-bg;
        color: $o-wo-tablet-text;
        padding: 0.4em 1em;
    }

    .o_form_label {
        color: $o-wo-tablet-text;
    }
}
