/** 
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github 
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org 
 *------------------------------------------------------------------------------
 */


// --------------------------------------------------
// MODULE STYLES
// --------------------------------------------------

// 
// GENECRIC MODULE
// --------------------------------------------------

// Section
// -------------
.section {

  .section-ct {
    padding: @grid-gutter-width 0;

    @media screen and (min-width: @screen-sm) {
      padding: @grid-gutter-width 0;
    }

    @media screen and (min-width: @screen-md) {
      padding: @grid-gutter-width*2 0;
    }

    @media screen and (min-width: @screen-lg) {
      padding: @grid-gutter-width*3 0;
    }
  }

  .section-title {
    margin-top: 0;
  }

  &.no-padding {
    .section-ct {
      padding: 0;
    }
  }

  .section-intro {
    position: relative;
    
    &:after {
      background: url("../images/ico/divide-side.png") no-repeat center bottom;
      height: 13px;
      position: absolute;
      left: 0;
      right: 0;
      bottom: -7px;
      content: "";
    }
  }
}


.t3-module {
  background: @t3-module-bg;
  color: @t3-module-color;
  margin-bottom: @line-height-computed;

  // Larger margin on Tablet / Desktop
  @media screen and (min-width: @screen-sm) {
    margin-bottom: @line-height-computed * 2;
  }

  // Module padding
  .module-inner {
    padding: @t3-module-padding;
  }
}

.t3-sidebar {
  .module-inner {
    border: 2px solid #eee;
  }

  .no-border .module-inner {
    border: 0;
  }

  .module-title {
    padding: 20px;
    margin-bottom: 0;
  }
}

// Module Title
// ------------
.module-title {
  background: @t3-module-title-bg;
  color: @brand-primary;
  font-size: 14px;
  margin: 0 0 20px 0;
  font-family: @headings-font-family;
}

// Module Content
// --------------
.module-ct {
  background: @t3-module-content-bg;
  color: @t3-module-content-color;
  padding: 0;
  .clearfix();
}

// Module List
// -----------
.module-ct,
.module-ct .custom {
  > ul,
  > ol {
    margin-left: 0;
    padding-left: 0;

    li {
      a {
      }
    }
  }
  
  > ul.unstyled,
  > ol.unstyled {
    padding-left: 0;
  }

  > ul.nav,
  > ol.nav {
    padding-left: 0;
    margin-left: 0;
  }

  a {
    color: @black;

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



//
// JOOMLA! MODULES
// --------------------------------------------------

// Menu
// ----
.module_menu {
  .nav {
  }
  
  .nav > li {
  }
  
  .nav > li > a,
  .nav > li > .separator {
    padding: @padding-base-vertical 5px;
    display: block;
    color: @black;
  }

  // Hover state
  .nav > li > a:hover {
    color: @link-color;
  }
  
  // Active state
  .nav > li.active > a {
  }
}


// Login Form
// ----------
#login-form {
  
  input[type="text"],
  input[type="password"] {
    width: 100%;
  }
  
  .btn-primary {
  }
  
  ul.unstyled {
    margin-top: @line-height-computed;
    padding-left: 20px;
  }

  #form-login-username {
  }
  
  #form-login-password {
  }
  
  #form-login-remember {
    label {
      font-weight: normal;
    }

    input {
      margin-top: @t3-global-margin/4;
    }
  }

  .login-greeting {
    display: inline-block;
    vertical-align: middle;
  }

  .logout-button {
    display: inline-block;

    .btn {
      padding: 0;
      background: none;
      border: 0;
      text-transform: none;
      text-decoration: underline;
    }
  }

}


// Advertisement
// -------------
.bannergroup {
}

.banneritem {
  a {
    font-weight: bold;
  }
}

.bannerfooter {
  border-top: 1px solid @t3-border-color;
  font-size: @t3-font-size-smaller;
  padding-top: @t3-global-padding / 2;
  text-align: right;
}


// Categories
// ----------
.categories-module, ul.categories-module,
.category-module, ul.category-module {
  margin: 0;

  li {
    list-style: none;
    padding: (@line-height-computed / 2);
    border-top: 1px solid @t3-border-color;
    // Remove border for first item
    &:first-child {
      border-top: 0;
    }

    &:before {
      border: 1px solid @brand-primary;
      color: @brand-primary;
      display: inline-block;
      line-height: 16px;
      border-radius: 50%;
      content: "+";
      margin-right: 5px;
      text-align: center;
      height: 16px;
      width: 16px;
    }

    a {
      color: #34383d;

      &:hover,&:focus,&:active {
        color: @brand-primary;
      }
    }
  }
  
  h4 {
    font-size: @font-size-base;
    font-weight: normal;
    margin: 0;
  }
}


// News Feed
// ----------
.feed {
  // Feed Title
  h4 {
    font-weight: bold;
  }
  // Feed list
  .newsfeed,
  ul.newsfeed {
    border-top: 1px solid @hr-border;
    li {}
    .feed-link, 
    h5.feed-link {
      font-size: @font-size-base;
      font-weight: normal;
      margin: 0;
    }
  }

}


// Latest Users 
// ------------
.latestusers,
ul.latestusers {
  margin-left: 0;
  li {
    background: @gray-lighter;
    display: inline-block;
    padding: 5px 10px;
    border-radius: @border-radius-base;
  }
}


.latestnews {
  .item-lead {
    img {
      max-width: 100%;
      margin-bottom: 10px;
    }

    .item-title {
      color: #34383d;
      font-size: 18px;
      display: block;
      margin-bottom: 15px;

      &:hover,&:focus,&:active {
        color: @brand-primary;
      }
    }

    .intro {
      display: block;
      color: #6b737d;
      margin-top: 20px;
    }
  }

  .item-more {
    a {
      display: block;
      color: #34383d;
      margin-bottom: 15px;

      &:hover,&:focus,&:active {
        color: @brand-primary;
      }
    }

    .published {
      color: #999;
      font-size: 12px;

      .fa {
        display: none;
      }
    }
  }
}

// Stats 
// -----
.stats-module {
  dt, dd {
    display: inline-block;
    margin: 0;
  }
  dt {
    font-weight: bold;
    width: 35%;
  }
  dd {
    width: 60%;
  }
}


// Popular Tags
//-------------
.tagspopular {
  ul {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
  }

  ul > li {
    color: @gray;
    display: inline-block;
    margin: 0 5px 5px 0;
  }

  ul > li > a {
    background: @gray-lighter;
    border-radius: 0;
    color: @gray;
    display: block;
    padding: 2px 5px;
    // Links states
    &:hover,
    &:focus,
    &:active {
      background: @link-color;
      color: @black;
      text-decoration: none;
    }
  }
}



// Similar tags
// ------------
.tagssimilar {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  ul > li {
    border-bottom: 1px solid @gray-lighter;
    padding: 8px 0;
  }

  ul > li > a {
    color: @gray;
    // Link states
    &:hover,
    &:focus,
    &:active {
      color: @link-hover-color;
    }
  }
}


// Breadcrums Module
// -----------------
.module-ct > ol.breadcrumb {
  padding: @padding-base-vertical @padding-base-horizontal;
  margin-left: 0;
}


// Custom Modules 
// -----------------
.custom {
  .clearfix();
}

.connect {
  float: left;
  padding: 0;
  margin: 0;
  list-style: none;

  li {
    float: left;
    display: block;
    margin-right: 20px;

    a {
      display: inline-block;
      padding: 15px 0px !important;
      margin-bottom: 0;
      font-size: 20px;
      text-align: center;
      white-space: nowrap;
      vertical-align: middle;
      cursor: pointer;
      border-radius: 100%;
      color: #545b6b!important;
      .transition(all .3s ease);

      &:hover,
      &:focus {
        color: #fff!important;
      }
    }

    &:first-child {
      @media screen and (min-width: @screen-lg) {
        margin-left: 0;
      }
    }
  }
}

.mod-title {
  text-transform: uppercase;
  font-weight: @font-weight-bold;
  font-family: @headings-font-family;
  margin-top: 0;

  .first-word {
    font-family: @font-family-base;
    display: block;
    font-weight: @font-weight-normal;
    line-height: @line-height-base;
  }
}


// JA Masthead
// --------------

.t3-masthead {
  padding: 0;
  text-align: center;
  color: @text-color;
  background: @gray-lightest;
  position: relative;
  z-index: 1;

  &:after {
    background: url("../images/ico/divide-side.png") no-repeat center bottom;
    height: 13px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    content: "";
  }

  .jamasshead {
    padding: @grid-gutter-width*2 0;
    background-size: cover;
    position: relative;
    background-position: center center;

    &:before {
      background: @gray-lightest;
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      .opacity(.8);
    }

    .jamasshead-title {
      text-transform: uppercase;
      font-size: @font-size-h1;
      position: relative;
      z-index: 2;
      margin-top: 0;
    }

    .jamasshead-description {
      font-size: @font-size-h4;
      position: relative;
      z-index: 2;
    }
  }

  
}


// JA Login
// ------------
.topbar-btn {
  float: right;

  .ja-login {
    height: 36px;
    text-align: left;

    > li { 
      height: 36px;
      float: right;
      margin: 0;
      z-index: 1;

      > a {
        padding: 0 @t3-global-padding/2;
        height: 36px;
        text-align: center;
        line-height: 36px;
        display: inline-block;
        overflow: hidden;
        background: transparent;
        color: @white;

        &:after {
          content: "\f007";
          display: inline-block;
          font-family: FontAwesome;
          font-weight: normal;
          font-size: inherit;
          text-rendering: auto;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
          transform: translate(0, 0);
        }

        &.show {
          background-color: @black;
        }

        span {
          padding-right: 5px;
        }

        &.register-switch {
          border-right: 1px solid rgba(0,0,0,0.2);

          &:after {
            content: "\f234";
          }
        }
      }

      form {
        padding-left: @t3-global-padding / 4;
      }

      #ja-user-login #form-login-username label:after,
      #ja-user-login #form-login-password label:after {
        content: "(*)";
        font-style: italic;
      }

      #ja-user-login,
      #ja-user-register {
        background: @white;
        border: 1px solid rgba(0, 0, 0, 0.15);
        color: @gray-darker;
        top: auto;
        left: auto;
        right: 0;
        .box-shadow(0 6px 12px rgba(0, 0, 0, 0.176));
      }

      .invalid {
        background: none;
      }

      #ja-user-register dd {
        margin-bottom: @t3-global-margin/2;
      }

      #login-form {
        li {
          margin-right: 0;
        }
  
        input[type="text"], 
        input[type="password"] {
          width: auto;
        }
      }

      #login-form #form-login-remember input {
        margin: 0;
        height: auto;
        display: inline-block;
      }

      .btn {
        .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
      }

      .logout-button {
        .btn {
          color: @btn-inverse-color;
        }
      }
    }
  }
}

// Ja Twitter
// ----------

.t3-footer {
  .ja-twitter {
    
    .ja-twitter-item {
      border: 0;
      padding-left: 0;
      padding-right: 0;

      font-weight: 400;
      color: @gray-lighter;

      a {
        color: @gray-lighter;
        font-weight: 400;
      }

      .ja-twitter-avatar {
        border: 0;
      }
    }

    .twitter-follow-button {
      display: none;
    }
  }
}

// Module Countdown

.new-count-wrap  {
  max-width: 620px;
  margin: 0 auto;

  // Tablet view
  @media (max-width: @screen-sm-max) {
    max-width: none;
  }
  
  .sch-content, 
  .sch-countdown {
    padding:@t3-global-padding;
    min-height: 116px;
    text-align: center;
    background: @brand-primary;

    @media screen and (max-width: @screen-xs-max) {
      min-height: 0;
    }

    .clearfix();
  }

  .sch-countdown {
    background: @gray-darker;
  }
  .sch-content {
    .sch-content-inner {
      display: block;
      padding: 0;
      .clearfix();

      .mod-title {
        font-size: @font-size-h3;
        font-family: @headings-font-family;
        text-transform: uppercase;
        padding: 0;
        float: left;
        text-align: right;
        line-height: 24px;
        font-weight: 400;
        color: @white;
        padding-right: 20px;
        margin: 5px 0 0 0;

        @media screen and (min-width: @screen-sm-min) {
          width: 50%;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        @media screen and (max-width: @screen-xs-max) {
          width: 47%;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;

          small {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }

        .first-word {
          line-height: 1;
        }

        small {
          color: @white;
          font-size: @font-size-base;
          font-family: @font-family-base;
          display: block;
          text-transform: uppercase;
          text-align: right;
          margin-bottom: 5px;
        }

        position: relative;

        
      }
    }

  

    .meta-date {
      position: relative;
      &:before {
        width: 2px;
        height: 50px;
        background: @white;
        margin: 0;
        right: 100%;
        top: 0;
        transform: rotate(10deg);
        content: "";
        position: absolute;
      }

      color: @white;
      font-size: @font-size-base;
      font-family: @font-family-base;
      text-transform: uppercase;
      padding: 0 0 0 20px;
      margin: 5px 0 0 0;
      float: left;
      font-weight: 700;
      line-height: 22px;
      text-align: left;
      width: 50%;

      @media screen and (max-width: @screen-xs-max) {
        width: 50%;
        white-space: nowrap;
      }
      span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
      }
    }
  }

  ul.countdown {
    display: inline-block;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    li {
      display: inline-block;
      text-align: center;

      span {
        font-size: 32px;
        color: @white;
        margin: 0;
        padding: 0;
        font-family: @font-family-base;
        font-weight: 300;
        line-height: 1;

        // Mobile view
        @media (max-width: @screen-xs) {
          font-size: 20px;
        }
      }

      p {
        color: @white;
        font-size: 12px;
        text-align: center;
        text-transform: uppercase;
        font-family: @font-family-base;
        margin: 0;
        padding: 0;
        line-height: 1;
      }

      &.seperator {
        font-size: 30px;
        vertical-align: top;
        font-family: @font-family-base;
        color: @white;
        font-weight: 300;
        width: 30px;
        line-height: 1;
      }
    }
  }
}

.view-article{
  // Mobile view
  @media (max-width: @screen-sm-max) {
    .event-item-media .item-image {
      margin-left: -15px;
      margin-right: -15px;
    }
  }
}

// Module Joomla 
.t3-module {
  .module-ct {

    .latestnews,
    .mostread {
      padding: 0;
      li {
        list-style: none;
        line-height: 1.2;
        padding: @t3-global-margin/3 0;

       .item-image {
          float: left;
          width: 35%;
          padding-right: @t3-global-padding;

          @media (max-width: @screen-xs-max) {
            float: left;
            padding: 0;
            margin-bottom: 10px;
            width: 100%;
          }

          img {
            width: 100%;
          }
        }

        .item-ct {
         
        }

        a {
          .clearfix();
          display: block;
          text-transform: none;
        }

        .item-title {
          text-transform: none;
        }

        dd {
          color: #6b737d;
          font-size: 12px;
        }
      }
    }
  }
}

.t3-sidebar {
  .t3-module {
    .module-ct {
      padding: 0 20px 20px 20px;
    }
    &.no-padding {
      .module-ct {
        padding: 0;
      }
    }
  }
}


// Acymailing

.acymailing_module {
  .form-inline {
    .acyfield_html.form-group {
      display: block;
      margin: 10px 0 !important;

      span,
      .controls {
        display: inline-block;
        margin-right: 5px;
        label {
          margin-right: 10px;
        }
        input[type=radio] {
          margin-right: 5px;
        }
      }
    }

    .form-group + .form-group {
      .acyfield_email {
        .form-control {
          width: auto !important;
        }
      }
    }
  }

  .form-group + .btn.button + .btn.button {
    margin-top: 10px;
  }

  .acyterms {
    display: block !important;
    margin: 10px 0 !important;

    input[type=checkbox] {
      margin-top: 7px;
    }
  }

  &.acymailing_tableless {
    .fieldacyhtml {
      display: inline-block;

      + .controls {
        display: inline-block;

        label {
          display: inline-block;
          margin-left: 10px;

          input[type=radio] {
            position: relative;
            margin-left: 0;
            margin-right: 5px;
          }
        }
      }
    }
  }

  &.acymailing_popup {
    .acymailing_mootoolsbutton p {
      text-align: left;
    }
    a.acymailing_togglemodule {
      position: relative;
      background: @brand-primary;
      display: inline-block;
      line-height: 1;
      padding: 10px;
    }
  }

  .form-group {
    @media screen and (max-width: @screen-xs-max) {
      display: inline-block;
      vertical-align: top;

      .form-control {
        width: auto !important;
      }
    }
  }
}

#sbox-window {
  width:  auto !important;
  height: auto !important; 
}