@import "../../../vendors/font-awesome-4.5.0/css/font-awesome.min.css";

// VARIABLES
// -------------------------
@global-padding: 20px;
@global-margin: 20px;


// Grays
// -------------------------
@black:                 #000;
@grayDarker:            #101010;
@grayDark:              #303030;
@gray:                  #606060;
@grayLight:             #909090;
@grayLighter:           #e0e0e0;
@grayLightest:          #f6f7f8;
@white:                 #fff;


// Accent colors
// -------------------------
@blue:                  #3498db;
@bluedark:              darken(@blue,10%);
@green:                 #008c31;
@cyan:                  #1abc9c;
@red:                   #c0392b;
@yellow:                #f1c40f;
@orange:                #f39c12;
@pink:                  #ca2c68;
@purple:                #8e44ad;


// Common
// -------------------------
@border-color: #e6e6e6;

body {
  background-color: #f9f9f9;
  box-sizing: border-box;
  line-height: 1.6;
}

div.container-main {
  padding: 0;
}

.container-main .form-inline-header {
  margin: 0 0 20px;
  padding: 0 @global-padding * 1.5;
}

.form-horizontal {

}

// Override Joomla tabs
// --------------------
#myTabTabs {
  margin-bottom: 0;
  padding: 0 @global-padding * 1.5;
}


div.tab-pane {
  // Reset Bootstrap style
  // ---------------------
  .btn {
    background: #f0f0f0;
    border-color: #ccc;
    border-radius: 0;
    font-weight: bold;
    height: 24px;
    line-height: 24px;
  }

  .btn-danger:hover, .btn-danger:focus, .btn-danger:active,
  .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] {
    background-color: #942a25;
    border-color: #71201c;
  }

  /* Button group */
  .btn-group.btn-group-yesno > .btn {
    border-radius: 0;
    box-shadow: none;
    height: 28px;
    font-size: 12px;
    font-weight: bold;
    line-height: 28px;
    min-width: 50px;
    text-transform: uppercase;
  }

  .btn-group {
    margin-bottom: 0;
    padding: 0;
  }

  .btn-success:hover, .btn-success:focus, .btn-success:active,
  .btn-success.active, .btn-success.disabled, .btn-success[disabled] {
    background-color: #096;
    border-color: #007e54;
  }

  .btn-primary:hover, .btn-primary:focus, .btn-primary:active,
  .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
    background-color: #07b;
    border-color: #00629a;
  }

  // Inputbox
  input[type="text"] {
    border-radius: 0;
    height: 24px;
    line-height: 24px;
  }

  input.minicolors {
    height: 20px;
    line-height: 20px;
  }

  input.inline {
    display: inline-block;
    max-width: 90px;
  }

  // input with pre & post append
  .input-append > input {
    width: 133px;
  }

  .input-prepend.input-append > input {
    width: 109px;
  }

  // Text area
  textarea {
    box-sizing: border-box;
    border-radius: 0;
    width: 90%;
  }

  .media-preview {
    height: 24px;
  }
}


// Custom preview
// ---------------------------
#custom-style-preview {
  box-sizing: border-box;
  position: absolute;
  top: 260px;
  left: 360px;
  right: 25px;
  bottom: 65px;
}

#custom-style-preview iframe {
  border: 2px solid #303030;
  width: 100%;
  height: 100%;
}


/* LAYOUT CONFIGURE
--------------------------- */
div.tab-pane {
  box-sizing: border-box;
  position: relative;
  overflow: hidden;

  .group-legends {
    background-color: @white;
    padding: @global-padding * 1.5;
    padding-bottom: 0;
    position: relative;
    overflow: hidden;

    &:empty {
      display: none;
    }

    .top-legend-group {
      margin-right: 10px;
      float: left;
      position: relative;
      min-width: 1px;

      .control-label {
        min-width: 1px;
      }

      @media (max-width: 991px) {
        margin-bottom: 10px;
      }
    }

    .control-group .control-label {
      position: relative;
      top: auto;
      left: auto;
    }
  }

  .control-group {
    margin-bottom: 0;
  }

  .group-collapse {
    margin-bottom: 0;
  }

  .control-label {
    display: inline-block;
    float: none;
    min-width: 200px;
    line-height: 55px;
    padding-right: 10px;
    text-align: right;
    vertical-align: middle;
  }

  .control-label label {
    color: #666;
    font-weight: bold;
  }

  .top-legend-group .control-label,
  .sub-legend-group .control-label {
    background: transparent;
    border: 0;
    display: block;
    height: auto;
    line-height: 1;
    padding: 0;
    text-align: left;
  }

  .top-legend-group > div:empty,
  .sub-legend-group  > div:empty {
    display: none;
  }

  .controls {
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;
  }

  h3.legend {
    background-color: @grayLightest;
    border: 1px solid @border-color;
    border-radius: 3px;
    color: @gray;
    display: block;
    font-weight: normal;
    font-size: 14px;
    margin: 0;
    padding: 6px 15px;
    position: relative;
    transition: all 0.35s;

    &:hover {
      cursor: pointer;
    }

    .fa {
      min-width: 12px;
      margin-right: 16px;
      text-align: center;
    }

    &:hover {
      background-color: @grayLighter;
      border-color: @grayLighter;
    }
  }

  .active h3.legend {
    background-color: @blue;
    border-color: @blue;
    color: @white;
    text-shadow: none;
  }


  /* Sub legend group */
  div.sub-legend-group {

    h3.sub-legend {
      background-color: transparent;
      border: 0;
      font-size: 15px;

      span {
        border-bottom: 2px solid @grayLighter;
        color: @grayDark;
        display: inline-block;
        padding: 0 0 3px 0;
      }
    }

    h3.sub-legend:hover {
      background-color: transparent;
    }

    .controls {
      display: block;
      padding: 10px 20px 10px 0;
      text-align: right;
    }
  }

  .sub-group-params {
    .control-group {
      border: 0;
    }

    &:last-child {
      margin-bottom: 10px;
    }
  }

  h3.sub-legend {
    background-color: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    text-transform: none;

    &:before {
      display: none;
    }
  }

  .group-expend h3.sub-legend {
    background-color: transparent;
    border: 0;
    padding-left: 0;
    text-align: left;
  }

  h3.sub-legend span {
    color: #666;
    display: inline-block;
    display: block;
    font-weight: 600;
    padding: 20px;
  }


  .control-group {
    position: relative;

    .control-label {
    }

    .controls {
      padding-top: 15px;
      padding-bottom: 15px;
    }

    &.group-collapse,
    &.group-expend {
      .control-label {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
      }
    }
  }
  
  // Expend all
  h3[data-expend="all"] {
    &:hover {
      cursor: default;
    }

    &:after {
      display: none;
    }
  }

  .group-expend h3.sub-legend span {
    border-color: #07b;
  }

  // Modified notice
  // ---------------
  .modified {
    h3.legend > span,
    h3.sub-legend > span {
      position: relative;

      &:before {
        background-color: #c00;
        border: 2px solid #fff;
        border-radius: 50%;
        content: "";
        color: #c00;
        display: block;
        font-size: 14px;
        line-height: 1;
        height: 8px;
        width: 8px;
        position: absolute;
        right: -11px;
        text-transform: none;
        top: -4px;
      }
    }

    h3.sub-legend > span {
      &:before {
        display: none;
      }
    }

    &.control-group {
      .control-label label {
        color: #c00;
      }
    }
  }


  // Custom colors 
  // -------------
  &#attrib-styles {
    padding-left: 65px;
    position: relative;
    overflow: visible;

    .group-legends {
      background: url(../images/dot-grey.gif) repeat-y right top #f0f0f0;
      border-right: 0;
      overflow: hidden;
      width: 48px;
      transition: all 0.35s;
      z-index: 1000;

      &:hover {
        width: 170px;
      }

      .control-label {
        width: 46px;

        h3.legend {
          border-right: 1px solid #ddd;
          padding-right: 0;
          width: 149px;
        }
      }

      .active {
        .control-label {
          background-color: #fff;
        }

      }
    }

    // Top group
    // ---------
    .top-group {
      margin-left: 0;
      margin-right: 0;
      width: 235px;
      position: absolute;
      top: 20px;
      left: 65px;
    }

    .sub-group {
      clear: bolth;
      padding: 0;
      width: 100%;

      .sub-group-inner {
        border: 0;
        padding: 0;
      }

      .control-group {
        .control-label {
          display: inline-block;
          position: relative;
          left: auto;
          line-height: 1;
          top: auto;
          min-width: 80px;
          text-align: left;
        }

        & > div:empty {
          display: none;
        }

        .controls {
          margin-left: 0;
          padding-top: 10px;
          padding-bottom: 10px;
        }
      }

      .sub-legend-group {
        background-color: transparent;
        min-height: 1px;
        margin-bottom: 10px;

        .control-label {
          min-height: 1px;
          min-width: 1px;
          text-align: left;

          h3.sub-legend {
            background-color: transparent;
            border: 0;
            margin-bottom: -1px;

            span {
              border-bottom: 2px solid @gray;
              padding: 0 0 5px;
            }
          }
        }
      }

    }

    /* Reset bootstrap elements */
    .minicolors-input {
      border-radius: 0;
      box-shadow: none;
    }

    .minicolors-theme-bootstrap .minicolors-swatch {
      border-radius: 0 !important;
    }

    .minicolors-theme-bootstrap .minicolors-swatch span {
      box-shadow: none;
    }

    .control-group .controls input.inline {
      border-radius: 0;
      box-shadow: none;
      max-width: 60px;
      vertical-align: middle;
    }

    // Modify
    // ------
    .modified h3.sub-legend > span::before {
      right: 18px;
      top: 47px;
    }
  }

}

/* Tablet and Mobile */
@media (max-width: 780px) {
  div.tab-pane {
    width: 100%;
  }
}


.top-group {
  background-color: @white;
  padding: 40px;
}

.sub-group {
  box-sizing: border-box;
  float: left;
  margin: 0;
  padding: 0;
  width: 50%;

  &.sub-group-direct {
    float: none;
    width: 100%;
  }

  &:nth-child(1) .sub-group-inner {
    border-right: 1px solid @border-color;
    margin-right: @global-margin * 2;
  }

  &:last-child .sub-group-inner {
    border-right: 0;
    margin-right: 0;
  }

  &:nth-child(2n + 1) {
    clear: left;
  }

  &.sub-group-direct + div + div {
    clear: none;
  }

  @media (max-width: 991px) {
    float: none;
    width: 100%;

    &:nth-child(1) .sub-group-inner {
      border-right: 0;
      margin-right: 0;
    }

    .sub-group-inner {
      .control-label {
        text-align: left;
        min-width: 0;
      }

      .controls {
        margin-left: 0;
        padding-top: 0;
      }
    }
  }
}


// 
// Assignment tab style
// --------------------
#assignment {
  box-sizing: border-box;
  padding: 40px;
  width: auto;

  #menu-assignment {
    ul {
      margin-left: -10px;
      margin-right: -10px;

      li {
        background-color: #f9f9f9;
        margin: 10px;
      }
    }

    .thumbnail {
      border-radius: 0;
      box-shadow: none;
      padding: 30px;
      height: 300px;
      max-height: 300px;
      overflow: auto;

      .small {
        font-size: 13px;
        padding-top: 2px;
        padding-bottom: 2px;
      }
    }
  }

  .btn {
    height: auto;
  }
}


//
// MISC
// ---------------------------

// Separator
// ---------
.legend-separator {
  height: 30px;
}

// Details
// -------
#details {
  padding: 30px;
  width: auto;
}

// Template information
// --------------------
div#details {
  .control-label {
    min-width: 1px;
  }

  .control-group .controls {
    margin-left: 0;
  }
}

.simpli-info {
  overflow: hidden;
  margin-right: 20px;

  h3 {
    background-color: #f0f0f0;
    margin: 0 0 20px;
    padding: 10px 20px;
  }

  .tpl-preview {
    background-color: #f0f0f0;
    display: inline-block;
    border: 1px solid #ddd;
    float: left;
    padding: 10px;
    margin-right: 20px;
    margin-bottom: 20px;
  }

  .quick-links {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;

    li {
      display: inline-block;
      padding: 0 10px 0 0;

      a {
        background-color: #f9f9f9;
        display: inline-block;
        border: 1px solid #ddd;
        border-radius: 2px;
        color: #333;
        padding: 5px 10px;
        transition: all 0.35s;

        i {
          margin-right: 10px;
        }

        &:hover, &:focus, &:active {
          background-color: #069;
          border-color: #069;
          color: #fff;
          text-decoration: none;
        }
      }
    }
  }

}