/*
 * Copyright (c) 2018 Eclipse Foundation, Inc.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * Contributors:
 *   Christopher Guindon <chris.guindon@eclipse-foundation.org>
 * 
 * SPDX-License-Identifier: EPL-2.0
*/

// Templates

@media print {
  .sideitem , #copyright {
    padding-left: 0;
    padding-right: 0;
  }

  main {
    padding-bottom: 0;
    padding-top: 0;
  }

  #solstice-footer , #copyright , #header-row {
    padding-top: 0;
  }
}

@media (min-width: @screen-sm-min) {
  #main-menu {
    li > a {
      padding:0 0 2px;
      margin:10px 15px;
      &:hover {
        text-decoration:underline;
      }
    }
    li .dropdown-menu {
      &:before {
        border-right: 1px solid @brand-primary;
        border-left: 1px solid @brand-primary;
        background-color: @brand-primary;
        display: block;
        content: "";
        height: 5px;
        width: 100%;
        position: relative;
        top: -4px;
      }
      p {
        color: @main-menu-dropdown-link-color;
      }

      a {
        color: darken(@main-menu-dropdown-link-color, 15%);
        &:hover {
          color: @main-menu-dropdown-link-color;
        }
      }

      .gsc-input-box {
        .textfield-underline !important;
        width: 95%;
        margin: 0 !important;
      }

      .gsc-input-box-focus , .gsc-input-box:hover {
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
      }
    }
    li > .dropdown-menu {
      >li.first {
        margin-top:20px;
      }
      >li.last {
        margin-bottom:20px;
      }
      >li {
        margin-right:30px;
        margin-left:30px;
      }
      a {
        margin:0;
      }
      .yamm-content {
        padding:20px 0;
      } 
    }
    li.dropdown.eclipse-more {
      &.open {
        > a {
          color: darken(@main-menu-link-color, 20%);
        }
      }

      .dropdown-menu {
        background-color: @main-menu-dropdown-menu-background;
        right: 15px;
        left: auto;
        border-radius: 0;
        box-shadow: none;
        border: none;
        background-clip: inherit;
        padding-top: 0;
        outline: 1px solid rgba(0, 0, 0, 0.15);
        outline-offset: -1px;
      }
    }
  }
  
  .toolbar-row {
    .toolbar-link {
      padding-bottom:1px;
      &:hover {
        border-bottom:1px solid @header-toolbar-color-hover;
      }
    }
  }
  .toolbar-dropdown-menu {
    left:inherit;
    right:0;
    margin-top:10px;
    border-top:5px solid @brand-primary;
    font-size:12px;
    font-weight:300;
    min-width:200px;
  }
}

#header-row {
  padding-bottom:@header-row-padding-bottom;
}

.header-wrapper {
  background: @header-background;
  background-size:cover;
  .featured-jumbotron {
    background-color:transparent;
  }
}

.header-default-bg-img {
  background-image:@header-default-bg-img;
}

.header-alternate-bg-img-1 {
  background-image:@header-alternate-bg-img-1;
}

.alternate-layout {
  header {
    background-color: @alternate-header-background;
  }

  #main-menu {
    li.dropdown.eclipse-more {
      &.open {
        > a {
          color: darken(@alternate-main-menu-link-color, 20%);
        }
      }
    }
  }
}

#back-to-top a {
  border-top: none;
  padding: 6px 15px;
  text-align: left;
  width: auto;
  float: left;
  margin-left:15px;
}

@media (max-width: @screen-xs-max) {
  #main-menu {
    &.navbar {
      border: 0;
      border-bottom: none;
    }
  }

  #btn-call-for-action {
    a {
      padding: 5px 10px;
      font-size: 12px;
      line-height: 1.5;
      border-radius: 0;
    }
  }
}

@media (max-width: @screen-sm-max) {
  #btn-call-for-action {
    margin-top:6px;
    .btn {
      padding: 5px 8px;
      font-size: 12px;
      line-height: 1.5;
      border-radius: 0;
    }
  }
}

.cse .gsc-control-cse, .gsc-control-cse, #adBlock {
  background-color:@body-bg !important;
  border:none !important;
}

.dropdown-menu {
  .gsc-input-box {
    .textfield-underline !important;
    width: 95%;
    margin: 0 !important;
  }

  .gsc-input-box-focus , .gsc-input-box:hover {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #D9D9D9 !important;
  }
}

.gsc-search-button-v2 {
  border: 1px solid @brand-primary !important;
  border-radius: 0px !important;
  -moz-border-radius: 0px !important;
  -webkit-border-radius: 0px !important;
  background-color: @brand-primary !important;
  background-image: -webkit-gradient(linear, left top, left bottom, from(@brand-primary), to(@brand-primary)) !important;
  background-image: -webkit-linear-gradient(to bottom, @brand-primary, @brand-primary) !important;
  background-image: -moz-linear-gradient(to bottom, @brand-primary, @brand-primary) !important;
  background-image: -ms-linear-gradient(to bottom, @brand-primary, @brand-primary) !important;
  background-image: -o-linear-gradient(to bottom, @brand-primary, @brand-primary) !important;
  background-image: linear-gradient(to bottom, @brand-primary, @brand-primary) !important;
}

.main-page-title {
  padding:20px 0 0;
  #main-sidebar {
    position:absolute;
    width: 100%;
    padding-left:15px;
    padding-right:15px;
  }
}

#main-sidebar {
  color:@main-sidebar-color;
  position:relative;
  .main-sidebar-html-block {
     background:@main-sidebar-bg;
     padding:20px;
     text-align:center;
  }
  .ul-left-nav {
    background:@main-sidebar-bg;
    padding:15px;
    position:relative;
    margin-bottom:0;
    >li.separator {
      border:none;
    }
  }
  .main-sidebar-children {
    padding-left:20px;
  }
  @media (min-width: @screen-md-min) {
    &:after {
      display:block;
      content:"";
      width:100%;
      height:40px;
      .clip-path-shape(@main-sidebar-shape);
      position:relative;
      bottom:0px;
      background:@main-sidebar-bg;
    }
  }
  a, a:hover {
    color:@main-sidebar-color;
  }
  .separator {
    font-size:@main-sidebar-heading-size;
    font-weight:@main-sidebar-heading-weight;
    &:hover {
      text-decoration:none;
    }
  }
  li {
    border-bottom:@main-sidebar-list-border;
    padding-bottom:10px;
    margin-bottom:10px;
    &:last-child {
      border-bottom:none;
    }
  }
}

.sideitem {
  h6 {
    border-bottom: 1px solid lighten(@sideitem-color, 30%);
  }
  ul {
    margin-left:10px;
  }
}

.main-sidebar-default-margin {
  @media (min-width: @screen-md-min) {
    margin-top:-20px;
  }
}