@import "variables.less";
@import "mixins.less";
@import "navbar.less";
@import "scaffolding.less";
@import "type.less";
@import "grid.less";
@import "breadcrumbs.less";
@import "forms.less";
@import "datepicker.less";
@import "modals.less";
@import "tables.less";
@import "tablesorter.less";
@import "wizard.less";
@import "bootstrap-editable.less";
@import "bootstrap-switch.less";
@import "bootstrap-select.less";
@import "jqplot.less";
@import "dropzone.less";
@import "logger.less";
@import "labels.less";
@import "fonts.less";
@import "toolbar.less";
@import "buttons.less";
@import "login-page.less";

// -- Base styling ------------------------------------------------------------

#wrapper {
	width: 100%;
}

#page-wrapper {
    padding: 0 15px 10px 15px;
    min-height: 568px;
    background-color: #f5f5f5;

    @media (min-width: @screen-lg){
        position: inherit;
        margin: 0 0 0 250px;
        padding: 0 30px 20px 30px;
        border-left: 1px solid @navbar-default-border;
    }
}

.navbar-top-links {
    margin-right: 0;
    position: relative;
    > li {
        display: inline-block;

        > a,
        > button {
            font-weight: normal;
            padding: 15px;
            min-height: 50px;
            color: #222;
            .transition(all 0.3s ease-in-out);
            background: none;
            border: none;

            &:hover,
            &:focus {
                background: whitesmoke;
                border: none;
                color: #444;
            }
        }
    }

    .dropdown-menu {
        padding-top: 0;
        padding-bottom: 0;
        border-radius: @border-radius-base;
        background: white;
        min-width: inherit;
        li  a {
          padding: 13px;
          text-align: center;
        }
    }

    .open {
        .caret {
            .rotate(-180deg);
        }
    }
}

.sidebar,
.navbar-top-links {
    .caret {
        .transition(transform 0.3s ease-in-out);
    }
}

// Bootstrap Adjustements ------------------------------------------------------

.footer {
    background: none repeat scroll 0 0 transparent;
    border: medium none;
    box-shadow: none;
    color: #7D756A;
    margin-bottom: 0;
    padding: 35px 15px 15px;
    text-align: left;
}

#wrapper {
    .footer {
        padding: 35px 30px 15px;
        text-align: left;
        margin-left: 251px;
        background-color: white;
        box-shadow: 1px 0 20px rgba(0,0,0,.1);
    }
}




// -- Top bar -----------------------------------------------------------------

.topbar {
    position: relative;
	background: #26272B;
	font-weight: bold;

	.version-info {
        line-height: @topBarHeight;
        height: @topBarHeight;
		background: url("@{imgDir}/logo.png") left no-repeat;
		padding-left: 120px;
        text-shadow: 0px 1px 1px black;
        color: #6d737b;
	}

    .form-search, .btn-group{
        margin-top: 10px;
    }
}

// -- Top bar -----------------------------------------------------------------

// display sub menu on hover
ul.navbar-top-menu li.dropdown:hover > ul.dropdown-menu {
  display: block;
}

// -- Brandbar ----------------------------------------------------------------

.login-page {
    background: #f5f5f5;

    .hero-unit {
    	background-color: transparent;

    	h1 {
    		margin-bottom: 25px;
    	}
	}

	.well {
  		background-color: #E4E3DE;
  		border: 1px solid rgba(0, 0, 0, 0.2);
  		box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.05) inset;
	}
}


// -- Feed list on home page --------------------------------------------------

.feed-list {
	h2 {
		font-size: 24px;
		line-height: 120%;
		color: #E9730F;

		a {
			&:hover {
				color: inherit;
				text-decoration: none;
			}
		}
	}

	h3 {
		margin-bottom: 0;
		padding-bottom: 0;
		font-size: 90%;
		line-height: 100%;
	}

	.feed-list-item{
		padding: 10px 20px;
	}
}

.brandbar {

    background: url("@{imgDir}/header.jpg") repeat-x;
    height: 90px;

    a.brand {
        text-indent: -133337px;
        display: block;
        float: left;
        margin-right: 20px;
        background: url("@{imgDir}/logo.png") 0px 12px no-repeat;
        width: 124px;
        height: 63px;
    }

    .breadcrumb {
        border-radius: @border-radius-base;
        padding: 25px 0px 25px 30px;
        background: url("@{imgDir}/logo-light.png") left center no-repeat;
        float: left;
        margin: 12px 0px 0px 0px;

        a {
            color: #949aa1;
            text-shadow: 0px 1px 0px rgba(0,0,0,0.8);
        }

        .active {
            color: #FFF;
            text-shadow: 0px 1px 0px rgba(0,0,0,0.8);
            border-bottom: 1px dotted white;
        }
    }

    dt {
        float: left;
        margin-right: 15px;
    }

    .deconnexion {
        float: right;
        margin: 0px;

        a {
            text-indent: -13337px;
            display: block;
            background: url("@{imgDir}/deconnexion.png") no-repeat;
            width: 23px;
            height: 24px;
        }
    }
}

.brandbar-wide {
        width: 100%;
}

// -- Login form --------------------------------------------------------------

.form-signin {
	max-width: 400px;
	padding: 19px 29px 29px;
	margin: 0 auto 20px;
	background-color: #fff;
	border: 1px solid #e5e5e5;
    border-radius: @border-radius-base;
	.box-shadow(none);
}

// -- General decoration of back-office boxes ---------------------------------

.general-block-decorator {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    .box-shadow(0 3px #eee);
    border: 1px solid #eee;

    .select-fixed-width {
      width: 120px;
    }


    // The block title
    .title,
    caption {
        text-align: left;
        font-size: 15px;
        font-weight: 600;
        text-transform: uppercase;
        line-height: 1.2;
        margin-bottom: 10px;
    }

    .title-without-tabs {
        margin-bottom: 0.5em;
    }

    // The action bar on the right
    .actions {
        text-align: right;
    }
}

.tab-pane{
    caption, .title{
        margin-top: 0.5em;

        .btn{
            text-transform: none;
        }
    }

    .inner-actions {
        margin-top: 0.5em;
    }
}

.tab-content {
    // Center loading indicator
    .loading {
        margin: 8em auto;
        text-align: center;
    }
}

// The overall form container
.form-container {

    // The inner toolbar (flags & save buttons)
    .inner-toolbar {

        line-height: 30px;
        margin-bottom: 1em;
        border-bottom: 1px dotted #A5CED8;
        padding-bottom: 0.5em;

        .inner-actions {
            text-align: right;
        }

        .nav-pills {
            margin-bottom: 0;

            li a {
                padding: 4px;
                opacity: 0.3;
            }

            li.active a {
                opacity: 1;
                background-color: #E7E7E7;
            }

            .language-change-button img {
                max-height: 13px;
            }
        }
    }

    .inner-toolbar-bottom {
        border-top: 1px dotted #A5CED8;
        margin-top: 1em;
        padding-top: 0.5em;
    }
}

// -- Home --
.dashboard hr{
    margin-bottom: 10px;
}

// -- Editable tweaks ---------------------------------------------------------

.editable-click, a.editable-click, a.editable-click:hover {
  border-bottom: 1px dotted #0088CC;
}

.ui-slider{
	margin-top: 23px;
}

.loading{
  background: url("@{imgDir}/ajax-loader.gif") no-repeat;
  height: 30px;
  display: inline-block;
  line-height: 30px;
  padding-left: 40px;
  width: auto;
}

.loading-block{
  background: url("@{imgDir}/ajax-loader.gif") no-repeat;
  margin: auto;
  height: 30px;
  width: 30px;
  display: none;
}

.modal-backdrop .loading {
  left: 50%;
  top: 50%;
  right: auto;
  position: absolute;
}


.existing-image .col-sm-6 {
    margin-bottom: 30px;

    .thumbnail-container{
        position: relative;

        .btn-group {
            position: absolute;
        }

        .container-btn-left{
            left: 10px;
            bottom: 1px;
        }

        .container-btn-right{
            right: 10px;
            bottom: -7px;
        }

        .loading {
            position: absolute;
            bottom: -7px;
            right: 10px;
            display: block;
            line-height: 1;
            padding: 0;
            margin: 0 auto;
            z-index: 2;
            width: 30px;
            height: 30px;
        }
    }
}

.existing-document {

    .loading{
        margin: 0;
    }
}

// -- Drag & drop --
.take{

    .draggable{
        border: 2px dashed @gray-light;
        margin-bottom: 10px;
        padding: 10px;

        &:last-child{
            margin-bottom: 0;
        }
    }

    .over{
        .drop-message{
            border-color: @brand-primary;
            color: @brand-primary;
        }
    }

}

.place{

    .over{
        .drop-message{
            border-color: @brand-primary;
            color: @brand-primary;
        }
    }

    .panel-body{

        .draggable, .drag{
            margin: 5px 0;
            padding: 10px;
            border: 1px dashed @gray-light;
        }

        .drop-group{
            padding: 10px;
            border: 2px dashed @gray-light;
            margin-bottom: 10px;

            &:last-child{
                margin-bottom: 0;
            }
        }

    }

}

.take, .place{

    .drop-message{
        width: 50%;
        margin: 10px auto;
        padding: 10px;
        color: @gray;
        border: 2px dashed @gray;
        text-align: center;
        .opacity(0.5);

        .glyphicon{
            display: block;
            font-size: @font-size-large;
            margin-bottom: 10px;
        }
    }

    .ui-draggable-dragging{
        z-index: 100;
    }
}

// -- File Upoload drop zone ---------------------------------------------------

.dropzone {
    border: 1px dashed #ddd;
    padding: 20px;
}

// No button wrap in button groups in td.action cells
table {
    td.actions {
        .btn-area-config {
            margin: 5px 0;
        }

        .btn-group {
            white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
            > .btn {
                float: inherit;
            }
            > .btn + .btn {
                margin-left: -4px;
            }
        }
    }
}

// document list style
ul.document-list {
    > li {
      padding: @table-condensed-cell-padding;
      line-height: @line-height-base;
      border-top: 1px solid @table-border-color;
      &:nth-child(odd) {
        background-color: @table-bg-accent;
      }
    }

}


// document / image visibility
.document-toggle-btn,
.image-toggle-btn {
  .glyphicon-eye-open{ display: none; }
  .glyphicon-eye-close{ display: inline-block; }
}
.document-toggle-btn.visibility-visible,
.image-toggle-btn.visibility-visible {
  .glyphicon-eye-open{ display: inline-block; }
  .glyphicon-eye-close{ display: none; }
}


// Loader (Overlay)
.loader {
  position: fixed;
  background: #fff url(../img/ajax-loader.gif) no-repeat center center;
  background-color: rgba(255,255,255,.5);
  display: none;
  left: 0; top: 0;
  width: 100%;height: 100%;
  z-index: 100;
}

// A vertical spacer between rows
.vertical-row-space {
  margin-bottom: 1em;
}

// Product image / document association

.product-pse-image-container  {
  position: relative;
  width: 100px;
  height: 75px;

  > .is-associated {
    box-shadow: 0px 0px 5px 0px @associated-color;
  }

  > img {
    cursor: pointer;
  }
}

.product-pse-image-join-glyphicon {
  position: absolute;
  right: 0px;
  color: @associated-color;
}


// help block
.alert-help {
  .alert-variant(@gray-lighter; darken(@gray-lighter, 20%); @gray);
}

.page-header {
    color: #545454;
    font-weight: 400;
    margin-top: 25px;
}

.install-module-col {
    .general-block-decorator {
        min-height: 150px;
    }
}

footer {
    position: relative;
}

.flags {
    height: 1em;
}

#follow-us {
    text-align: center;

    @media (min-width: @screen-sm-max) {
        position: absolute;
        right: 30px;
        top: 30px;
    }

    [class^="icon-"], [class*=" icon-"] {
        position: relative;
        top: 0;
    }

    a {
        font-size: 20px;

        &:hover,
        &:focus {
            color: @text-color;
        }
    }
}

// -- Make printed pages more readable
@media print {
    a,
    a:visited {
        text-decoration: none;
    }

    a[href]:after {
        content: "";
    }

    abbr[title]:after {
        content: "";
    }
}

// -- More compact order items table
.table-order-items{
    .dl-horizontal {
        margin-bottom: 5px;
    }
}

.img-flags {
    max-height: 13px;
}
