/* Radio
--------*/
/* Radio Button Groups ---*/

fieldset.t3onoff {
  width: 90px;
  height: 30px;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  padding: 0 !important;
  position: relative;
  border: 1px solid #aaa;
  border-radius: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;


  input[type=radio] {
    display: none;
  }

  label {
    width: 90px;
    height: 30px;
    overflow: hidden;
    display: block;
    border-radius: 0;
    position: absolute;
    top: -1px;
    left: -1px;
    z-index: 1;
    text-transform: uppercase;
    background: url(../imgs/blank.gif) no-repeat transparent;
    text-indent: -999em;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }

  /* use before as background */
  label:before,
  label:after {
    display: block;
    position: absolute;
    top: 0;
    border-radius: 0;
    border: 1px solid #aaa;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;

    -webkit-transition: all 250ms;
    transition: all 250ms;
  }

  label:before {
    content: "ON";
    width: 100%;
    height: 100%;
    
    text-indent: 0;
    color: white;
    padding: 4px 18px;
    font-weight: normal;
  }

  /* use after as switch */
  label:after {
    content: "";
    
    width: 40%;
    height: 100%;
    background: #fff;
  }

  label.off:before {
    content: "OFF";
    text-align: right;
    color: #555;
  }

  /* active label should be under => so inactive can be clickable */
  label.active {
    z-index: 0;
  }

  /* off background */
  label.off:before {
    background: #eee;
    left: 100%;
  }

  label.off.active:before {
    left: 0%;
  }

  label.on:before {
    background: #690;
    left: -100%;
  }

  label.on.active:before {
    left: -0%;
  }

  /* off switch */
  label.off:after {
    left: 60%;
  }

  label.off.active:after {
    left: 0%;
  }

  label.on:after {
    left: 0%;
  }

  label.on.active:after {
    left: 60%;
  }
}

/* radio btn group */
fieldset.radio.btn-group {
  padding: 0;

  input {
    display: none;
  }

  label {
    display: inline-block;
    min-width: 54px;
    padding: 0 12px;
    border: 1px solid #aaa;
    line-height: 28px;
    background: #eee;
    color: #555;
    border-radius: 0;
    text-align: center;
    border-right-width: 0px;
    text-transform: uppercase;

    &:last-child {
      border-right-width: 1px;
      border-radius: 0 4px 4px 0;
    }

    &.active {
      background: #690;
      border-color: #5c8b00;
      color: #fff;
    }
  }
}

//
// ARTICLE FORM
// ---------------------------------------------------------
#adminForm {
  .clearfix {
    overflow: visible;
  }

  .chzn-container .chzn-results {
    clear: both;
  }
}


//
// MODULES OPTIONS FORM
// ---------------------------------------------------------
.com_config #modules-form {
  .input-append,
  .input-prepend {
    .add-on {
      width: 35px;
    }

    input {
      display: inline-block;
    }

    .btn {
      border: 1px solid #aaa;
    }
  }

  // Accordion group
  // ---------------
  .accordion-group {
    margin-bottom: 20px;

    .accordion-heading {
      .accordion-toggle {
        color: #428bca;
        display: block;
        padding: 10px;
        outline: none;

        &.collapsed {
          border-radius: 5px;
          color: #666;
        }
      }
    }

    .accordion-body {
      .nav-tabs {
        border-bottom: 0;
      }
    }

  }
}

.controls select {
  vertical-align: middle;
  width: 220px;
}

// View history
// ------------
[class^="icon-"], [class*=" icon-"] {
  font-family: FontAwesome !important;
}

.view-history .btn-group {
  margin-bottom: 10px;
}

.btn [class^="icon-"],
.btn [class*=" icon-"] {
  margin-right: 5px;
}

.btn span.icon-delete {
  &:before {
    content: "\f057";
    display: inline-block;
    height: 16px;
    width: 16px;
    color: #333;
  }
}

.icon-eye-open:before,
.icon-eye:before {
  content:"\f06e";
  font-family: "FontAwesome";
}

.icon-file-add:before {
  content:"\f0f6";
  font-family: "FontAwesome";
}

.icon-cancel:before {
  content:"\f00d";
  font-family: "FontAwesome";
}

.icon-publish {
  &:before {
    content: "\f00c";
  }
}

.icon-unpublish {
  &:before {
    content: "\f00d";
  }
}

.icon-featured {
  &:before {
    content: "\f005";
  }
}

.icon-unfeatured {
  &:before {
    content: "\f005";
  }
}

// Frontend Edit Elements
// ---------------------------------------
.window {
  &.view-modules {

    .well {
      .control-label {
        display: inline-block;
      }

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

    .control-group:after {
      content: "";
      clear: both;
      display: table;
    }

    #filter-bar {
      margin-bottom: 10px;

      .btn-group button {
        margin-top: 0;
      }
    }
  }
}

// Frontend Edit Insert module
// ---------------------------------------
.view-modules,
.view-articles,
.view-contacts,
.view-fields,
.view-items {
  .js-stools {
    margin-bottom: 20px;

    .btn {
      border: 1px solid #ccc;
      margin-top: 0;
    }

    .input-append .btn {
      border-left: 0;
    }

    input {
      display: inline-block;
    }
  }

  .js-stools-container-filters {
    .chzn-container-single {
      width: 220px !important;
    }

    .chzn-drop {
      box-sizing: border-box !important;
    }
  }

  table#moduleList {
    td .label {
      background-color: #999;
      box-sizing: border-box;
      border-radius: 3px;
      display: inline-block;
      font-weight: normal;
      font-size: 100%;
      padding: 10px;
      width: 100%;
    }
  }

  table#moduleList td:nth-child(1) {
    vertical-align: middle;
  }

  .icon-publish {
    &:before {
      content: "\f00c";
      font-size: 16px;
    }
  }

  #extra_class.span12 {
    box-sizing: border-box;
    height: 40px;
    line-height: 40px;
    width: 100%;
  }
}

.mce-container-body {
  .icon-file-add {
    &:before {
      content: "\f067";
    }
  }

  .icon-pictures {
    &:before {
      content: "\f03e";
    }
  }
}

// Extrafield
// -----------------------
.edit.item-page,
.profile-edit {
  #jform_com_fields_checkboxs {
    label.checkbox {
      display: inline-block;
      margin-right: 10px;
    }

    input[type="checkbox"] {
      margin-left: 0;
      margin-top: -2px;
      position: relative;
      vertical-align: middle;
      width: auto;
    }
  }

  .minicolors-input {
    height: 28px;
    width: auto;
  }
}

// Edit profile
// -----------------------
.profile-edit {
  #jform_com_fields_user_checkbox {
    label.checkbox {
      display: inline-block;
      margin-right: 10px;
    }

    input {
      position: relative;
      margin-left: 0;
      margin-right: 5px;
      width: auto;
    }
  }

  .minicolors-input {
    height: 28px;
    width: auto;
  }

  #jform_com_fields_user_image_chzn {
    .chzn-search {
      box-sizing: border-box;
    }

    ul.chzn-results {
      box-sizing: border-box;
      padding: 0;
      margin: 0;
      width: 100%;
    }
  }

  #jform_com_fields_user_calendar {
    float: left;
  }

  .chzn-container-single,
  .chzn-container {
    float: left;
    margin-right: 10px;

    @media screen and (max-width: 360px) {
      width: 100% !important;
    }

    .chzn-drop {
      box-sizing: border-box !important;
    }
  }
}


// User profile
// ----------------------
.profile {
  #users-profile-core {
    width: 100%;
  }

  .dl-horizontal {
    dd {
      margin-bottom: 10px;
      border-bottom: 1px dashed #ddd;
      padding-bottom: 10px;

      img {
        max-width: 100%;
      }
    }
  }
}

// Media Folder List
.thumbnails-media .imgFolder span {
  line-height: 70px;
}