
// colour strip

@colorBlue:     #2A8BCB;
@colorBrown:    #B14F28;
@colorMagenta:  #95006A; //#950169;
@colorLime:     #8DC63F;
@colorPurple:   #5C2D91; //#8d188f
@colorOrange:   #F37021;

@lbt-color:     @colorBlue;
@lba-color:     @colorBrown;
@lbem-color:    @colorOrange;
@lbe-color:     @colorLime;
@lbf-color:     @colorPurple;
@lbw-color:     @colorMagenta;


/* temporarily duplicated from juta-core init.less - can not use juta core variables at this point */

@baseFontColor: #4d4d4d; // dark grey

//grey shades
@grey0: @baseFontColor;
@grey1: lighten(@grey0, 27%);
@grey2: lighten(@grey0, 38%);
@grey3: lighten(@grey0, 47%);
@grey4: lighten(@grey0, 57%);
@grey5: lighten(@grey0, 64%);

.transition (@spec) {
  transition: @spec;
  -webkit-transition: @spec;
  -moz-transition: @spec;
  -ms-transition: @spec;
  -o-transition: @spec;
}

.border-radius (@radius) {
  border-radius: @radius;
  -webkit-border-radius: @radius;
  -moz-border-radius: @radius;
  -ms-border-radius: @radius;
  -o-border-radius: @radius;
}

.border-box {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

.strip-ol {
  margin: 0;
  padding:0;
  li {
    margin: 0;
    padding:0;
    list-style:none;
    display:block;
    a {display: block;}
  }
}

.clear-after {
  &:after {
    display: block;
    content: '';
    clear: both;
  }
}

// =================================================================================================== //

html {
  background: @grey4;
  @media (max-width: 767px) {
    height: auto;
  }
}
body {
  @media (min-width:980px) {
    background: none;
  }
}

.body_bg {
  @media (min-width:980px) and (max-width: 995px){
    background-size: 965px auto;
    background-position: left;
  }
  @media (min-width:768px) and (max-width:979px) {
    background: url(../img/structure/mid-bg-tile-mobile.png) center repeat-y;
    background-size: 100% auto;
  }
}

@media (min-width: 980px){
  .header_bg {
    height:0px;
  }
}

.header_right {
  width: 55%;
  background: @grey1;
  height: 132px;
  float: right;
  text-align: right;
  .slogan {
    color: white;
    font-size: 32px;
    font-style: italic;
    font-weight: 300;
    font-family: 'Arial';
    display: inline-block;
    margin: 73px 30px 0 0;
  }
  @media (max-width:767px){
    height:57px;
    img {
      margin-top: 18px;
      margin-right: 15px;
      height:24px;
    }
  }
  @media (max-width:479px){
    display: none;
  }
}

header{
  height:172px;
  @media (max-width:767px){
    height:60px;
  }
}

.section-logo {
  margin-left:30px;
  img {
    height:80px;
    margin:30px 0 0 0;
  }
  @media (max-width:767px){
    img {
      height:45px;
      margin:8px 0 0 0px;
    }
  }
}

.colour-bar {
  background-color: @colorOrange;
  ul {
    li {
      &.one {background-color: @colorBlue;}
      &.two {background-color: @colorBrown;}
      &.three {background-color: @colorMagenta;}
      &.four {background-color: @colorLime;}
      &.five {background-color: @colorPurple;}
      &.six {background-color: @colorOrange;}
    }
  }
}

.main_wrap {
  background: transparent;
}

.main_content {
  @media (min-width:768px) and (max-width:979px){
    width:69.3%;
  }
}

input[pattern]:required:focus:invalid ~ #search {
  border: 1px solid red !important;
}
input[pattern]:required:focus:invalid ~ .error-search {
  display: block;
}

.error-search {
  display: none;
  font: italic medium sans-serif;
  color: red;
  top: -19px;
  width: 210px;
  position: absolute;
}

.right_panel {
  border-right: 4px solid white;
  background-color: @grey5;
  padding-top: 90px;
  margin-top:0;
  >.padding {
    padding: 15px 10px 10px 10px;
  }
  @media (min-width:768px) and (max-width:979px){
    width:30.7%;
    padding-top: 0px;
  }
  @media (max-width:767px) {
    padding-top: 0px;
    border-right: none;
  }
}

//compensate for page scrollbar
.no-touch .main_wrap {
  @media (min-width:980px) and (max-width: 995px){
    width:735px;
    .main_content {width: 69.3%;}
    .right_panel {width: 30.7%;}
  }
}

.bg-gradient {
  display: none;
}

/*============================= Slider ===============================*/

.bx-wrapper { margin: 0; }

.slider_wrap {
  position: relative;
  border: 5px solid white;
  margin: 0 auto;
  background: @grey5;
  .feature_slider {
    li {
      .slide_head {
        background: @grey0;
        a {
          color: white !important;
          font-family: Verdana, Arial, sans-serif;
          font-weight: normal;
          width: 100%;
        }
      }
    }
    .slide_body {
      padding:0;
      background: @grey5;
      .slide_content {
        padding: 15px 40px;
        h1 {
          margin-top:0;
          color: @colorBlue;
          font-weight: bold;
        }
        p {
          font-size: 14px !important;
          line-height: 20px !important;
        }
      }
    }
  }
}
.bx-controls-direction {
  top:50%;
  right:0;
  height:45px;
  width: 100%;
  background: none !important;
  margin-top: -10px;
  a.bx-next {
    right:5px;
    span {
      background: url(../img/icons_logos/arrows/arrow_grey_2x.png) center center no-repeat;
      &:active {background-image: url(../img/icons_logos/arrows/arrow_blk_2x.png);}
    }
  }
  a.bx-prev {
    left:5px;
    span {
      background: url(../img/icons_logos/arrows/arrow_grey_left_2x.png) center center no-repeat;
      &:active {background-image: url(../img/icons_logos/arrows/arrow_blk_left_2x.png);}
    }
  }
  a.bx-next, a.bx-prev {
    background: @grey5;
    border: none;
    box-shadow: none !important;
    &:hover { background: @grey5;}
    width:30px;
    height:35px;
    span {
      width: 30px;
      height: 35px;
      background-size: 100% 100%;
    }
  }
  @media (max-width: 767px) {
    top:50%;
  }
}

// only if no touch device
body.no-touch {
  a.bx-next span {
    &:hover {background-image: url(../img/icons_logos/arrows/arrow_blk_2x.png);}
  }
  a.bx-prev span {
    &:hover {background-image: url(../img/icons_logos/arrows/arrow_blk_left_2x.png);}
  }
}

/* Slider corner shadows */

.banshad_r, .banshad_l{
  bottom:-5px;
}
.banshad_r {right:-16px; }
.banshad_l {left:-16px; }

.banshad_br, .banshad_bl {
  bottom:-22px;
}
.banshad_br { right: -15px}
.banshad_bl { left: -15px}

/*============================= CONTENT ===============================*/

//TOPNAV - DESKTOP
@media (min-width: 768px) {
  nav.dl-menuwrapper {
    margin:0;
    top: 137px;
    width: 100%;
    ul {
      margin: 0;
      background: @grey0;
      height: 30px;
      &:after {
        content: '';
        display: block;
        clear: both;
      }
      li {
        margin-top:0;
        line-height: 30px;
        &:last-child {margin-right:0;}
        &:first-child {margin-left:15px;}
        @media (min-width: 1024px) {
          margin-right:17px;

        }
        a {
          color: @grey4;
          text-shadow: none;
          &:hover,
          &:active,
          &.active {
            color: white;
            text-shadow: 1px 1px 1px #000000;
          }
        }
      }
    }
  }
}

@media (max-width: 767px) {
  .mobile-navbar {
    background: @grey0 !important;
  }
  .mobile-button {
    span.mobile-icon {
      &.login, &.logout {
        color: white;
        &:hover, &:active {
          color: @grey4;
        }
      }
    }
  }
}

body.no-touch {
  .mobile-button:hover,
  .mobile-button.menutrigger:hover {
    background: lighten(@grey0, 10%) !important;
  }
  .log-buttons {
    .mobile-button:hover,
    .mobile-button.menutrigger:hover {
      background: none !important;
    }
  }
}

h1, h2 {
  font-weight: bold;
}

h1 {
  font-size: 18px;
}
h2 {
  font-size: 16px;
}

h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

p.block {
  background-color: @grey4;
  padding: 5px 10px;
}

.search_bar {
  @media (min-width: 980px) {
    width: 192px;
    margin: 0 20px;
    input[type="text"] { width: 163px; }
  }
  .advanced_filter_link {
    position: absolute;
    top: 40px;
    right:3px;
    left: 0px;
    margin:0;
    padding-right: 29px;
    box-sizing: border-box;
    width: 100%;
    color: @baseFontColor;
    text-align: right;
    &:hover {
      color: #000000;
    }
    .arrow {
      position: absolute;
      right: 5px;
      top: 0px;
      width: 14px;
      height: 14px;
      display: block;
      background: url(/static/img/icons_logos/search_grey_2x.png) no-repeat;
      background-size: 11px 11px;
    }
  }
}

@media (min-width: 767px) {
  .search_bar {
    top: 200px;
  }
}
@media (min-width: 768px) and (max-width: 979px) {
  .search_bar {
    top: 183px;
  }
}
@media (max-width: 979px) {
  height: 71px;

}


#login_widget ul li a.subscriptions,
#login_widget ul li a.trials {
  background-image: url(../img/icons_logos/profile/subscriptions_2x.png);
  background-size: auto 17px;
  background-position: 4px 5px;
}

.box-wrap {
  .box-header {
    background-color: @grey0;
    color: white;
  }
  .duo-buttons {
    .button {
      padding-left: 10px;
      padding-right: 10px;
      margin: 0;
      float: left;
      box-sizing: border-box;
      width: 52%;
      text-align: center;
      white-space: nowrap;
      &:first-child {
        margin-right: 3%;
        width: 45%
      }
    }
  }
  ul {
    margin-bottom: 15px;
    max-height: 242px;
    overflow-y: auto;
  }
  li:last-child {border-bottom: none;}
  ul li a strong { font-weight: bold !important; }
  .nowrap {
    width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  p a:hover { background-color: transparent;}
}

.accordion-box {
  .toggle-external-link a {
    color: @baseFontColor;
  }
  .toggle-box {
    position: relative;
    .button.fixed {
      position: absolute;
      right:15px;
      bottom:10px;
      @media (max-width: 479px) {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top:0;
        margin-bottom:15px;
      }
    }
  }
}

.fancybox-inner .pop-up-box-wrap {
  h1,
  h2,
  .box-header {
    background-color: @grey0;
    color: white;
  }
  .clear-after;
}

.social_icons {
  width: 150px;
  margin: auto;
  margin-bottom: 15px;
  .icon {
    display: block;
    font-size: 1px;
    text-indent: 1000px;
    overflow: hidden;
    width: 34px;
    height: 35px;
    margin: auto;
    background-size: 96% auto;
    background-repeat: no-repeat;
    opacity: 0.8;
    background-position: center;
    .transition(all 0.2s);
    &.tw {background-image: url('../img/icons_logos/icon_tw_2x.png'); }
    &.fb {background-image: url('../img/icons_logos/icon_fb_2x.png'); }
    &.in {background-image: url('../img/icons_logos/icon_in_2x.png'); }
    &:hover {
      opacity:1;
      background-size: 100% auto;
    }
  }
  @media (max-width: 767px) {
    margin-top: 10px;
  }
}

.font-size-select {
  float: right;
  width: 50px;
  margin-left: 15px;
  a {
    color:@grey1;
    font-weight: bold;
    &:hover {
      color:@baseFontColor;
    }
  }
}

// Jquery UI datepicker styling
#datepicker { margin-bottom: 10px; }
div.ui-datepicker {
  .border-radius(0);
  border: none !important;
  padding:0;
  background:  #f0f0f0;
  width:inherit;
  .ui-datepicker-header {
    .border-radius(0);
    border: none;
    background: @grey1;
    a {
      .transition(none);
    }
  }
  table.ui-datepicker-calendar {
    font-size: 11px;
    thead {
      th {
        padding: .4em .3em !important;
        font-size: 10px;
      }
    }
    tbody {
      tr {
        td {
          padding: 2px !important;
          font-size: 11px;
          background: none !important;
          border: none;
          //background-color: green !important;
          .ui-state-highlight {
            border: 1px solid @grey0;
            background: @grey0;
            color: white;
          }
        }
        &:nth-child(even) {
          td {
            background: none !important;
            border: none;
            //background-color: green !important;
          }
        }
      }
    }
  }
}



/*================== Home ===================*/

// diary logos background mixins
.lbt-logo  {background-image: url('../img/icons_logos/logo_lbt_2x.png');}
.lba-logo  {background-image: url('../img/icons_logos/logo_lba_2x.png');}
.lbem-logo {background-image: url('../img/icons_logos/logo_lbem_2x.png');}
.lbe-logo  {background-image: url('../img/icons_logos/logo_lbe_2x.png');}
.lbf-logo  {background-image: url('../img/icons_logos/logo_lbf_2x.png');}
.lbw-logo  {background-image: url('../img/icons_logos/logo_lbw_2x.png');}

// locked icon mixin
.inline-lock-icon {
  &:after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 14px;
    background: url('../img/icons_logos/lock_2x.png') bottom no-repeat;
    background-size: auto 14px;
    margin-left: 6px;
  }
}

.diary-blocks {
  .block {
    display: block;
    border: 1px solid @grey2;
    width: 98%;
    margin: 5px auto 10px auto;
    height: 102px;
    font-size: 0px;
    background-size: auto 46px;
    background-position: 10px center;
    background-repeat: no-repeat;
    .transition(background-color 0.2s);
    &.lbt  {.lbt-logo;}
    &.lba  {.lba-logo;}
    &.lbem {.lbem-logo;}
    &.lbe  {.lbe-logo;}
    &.lbf  {.lbf-logo;}
    &.lbw  {.lbw-logo;}
    &:hover {
      background-color: @grey5;
    }
  }
  @media (min-width: 560px) and (max-width: 767px) {
    .half-block {
      width: 50%;
      float: left;
      .block {
        width: 94%;
      }
    }
  }
  @media (max-width: 559px) {
    .half-block {
      float: none;
      width: 100%;
      .block {
        height: 70px;
        border-bottom: none;
        border-left: none;
        border-right: none;
        margin: 0 auto;
        max-width: 350px;
        background-position-x: 20px;
        &.lbt {
          border-top: none;
        }
      }
    }
  }
}

.diary-head {
  .border-box;
  height: 88px;
  margin-bottom: 15px;
  .logo {
    height: 65px;
    border: 1px solid @grey3;
    border-bottom: none;
    background-color: white;
    background-size: auto 43px;
    background-position: 20px center;
    background-repeat: no-repeat;
    @media (max-width: 559px) {
      background-position-x: center;
    }
  }
  .bar {
    height: 23px;
    line-height: 23px;
    color: white;
    padding: 0 20px;
    .date {
      float: left;
    }
    .slogan {
      float: right;
      font-style: italic;
    }
  }
}
.diary-content {
  h1 {
    display: inline-block;
    color: white;
    font-size: 14px;
    margin: 10px 0 5px 0;
    padding: 0 5px;
    font-weight: normal;
  }
  hr {
    margin: 0px 0 15px 0;
    height: 2px;
  }
  h2 {
    font-size: 14px;
    margin-bottom:0;
  }
  article.locked {
    h2 { .inline-lock-icon; }
  }
  a.locked { .inline-lock-icon; }
  p {
    text-align: justify;
    a {
      &:hover { text-decoration: underline}
      @media (max-width: 559px) {
        display: block;
        text-align: right;
      }
    }
  }
  .highlight {
    font-style: italic;
  }
}

.story {
  p {
    margin: 0;
    text-align: justify;
  }
  .story_content {
    margin-bottom: 10px
  ;
  }
}
h1.story-head {
  margin: 10px 0 5px 0;
}

tr.locked {
  a { .inline-lock-icon; }
}

/*
======================== events =================================
*/
.events{
  .event-item, .event-header, .event-footer, .event-body {
    padding: 5px;
  }
  .even, .event-header, .event-footer {
    background-color: #dedede;
  }
  .event-body {
    background-color: #f0f0f0;
  }
}

/*
======================== Archived newsletters =================================
*/
.year {
  margin-left: 5px;

  h3 {
    cursor: pointer;
    color: #929292;
    background-repeat: no-repeat;
    background-size: 3%;
    background-color: #f0f0f0;
    background-position-x: 10px;
    background-position-y: 8.5px;
    text-indent: 30px;
    font-weight:normal;
    height: 30px;
    line-height: 30px;
    width: 98%;
    margin-bottom: 0;
  }
}
.month {
  margin-left: 30px;

  h3 {
    background-color: #dedede;
  }

  .column{
    margin-top: 1px;
    margin-left:30px;
    display: inline-block;
    width: 30% !important;
  }

  .column tr, .column-extra tr {
    height: 30px;
  }

  .column th, .column-extra th {
    width: 10%;
    text-transform: none;
  }

  .column-extra {
    margin-top: 1px;
    display: inline-block;
    width: 30% !important;
  }

  .no-content {
    margin-top: 2px;
    margin-left: 32px;
    width: 91% !important;
    text-transform: none;
    line-height: 20px;
    background-color: #dedede;
  }
}
