// Generic Internet Explorer
.ie {

  .lang-dropdown {
    position: relative;
    top: -20px;
  }

  .module-popup {
    border-bottom: none;
  }

  .banner {
    top: 0;
    right: 0;
    width: auto;
  }

  .group-listing {
    margin-left: -24px; // Include border around items.
  }

  .toolbar .breadcrumb {
    filter: none; // Remove filter set by the gradient mixin.
    li {
      float: left; // Fixes inline block display issues.
      &:after {
        margin: 0 0.2em;
      }
    }
  }

}

// Internet Explorer 9
.ie9 {
  .control-large input {
    height: 56px; // Fixes cropped text in IE9
  }
}

// Internet Explorer 8
.ie8 {
  .account-masthead {
    a.image,
    .username {
      white-space: nowrap;
    }
  }
}

// Internet Explorer 7, 8 & 9
.ie9,
.ie8,
.ie7 {
  .homepage .media.module-heading .media-image img {
    width: 85px !important;
  }
}

// Internet Explorer 7 & 8
.ie8,
.ie7 {
  .masthead  .nav-collapse {
    float:right;
  }
  [role=main], .main {
    padding-top: 10px;
    background: @layoutBackgroundColor url("@{bgPath}");
  }
  // Homepage
  .hero {
    background: url("@{imagePath}/background-tile.png");
    .hero-primary.module-popup .box {
      padding-bottom: 20px !important;
      margin-bottom: 0 !important;
    }
  }
  // Footer
  .lang-dropdown {
    position: relative !important;
    top: -90px !important;
  }
}

// Internet Explorer 7
.ie7 {

  // Generic fixes
  .alert {
  	position: relative;
    .close {
      position: absolute;
      top: 6px !important;
      right: @gutterSmallY;
    }
  }
  .media-item {
    width: 30%;
  }
  .tags {
    .tag-list {
      .clearfix;
      li {
        display: block;
        float: left;
      }
    }
    h3 {
      float: left;
    }
    .tag {
      display: block;
    }
  }

  // Form based fixes
  .search-giant input {
    width: 95%;
  }
  .control-full {
    input,
    select,
    textarea {
      width: 95%;
    }
    &.control-large .controls input {
      padding-bottom: 20px;
    }
  }
  .controls {
    position: relative;
    .info-block,
    .info-inline {
      position: absolute;
      top: 0;
      right: 0;
    }
  }
  .form-horizontal .controls {
    margin-left: 0;
  }
  .control-custom .checkbox {
    .ie7-inline-block;
  }
  .stages {
    overflow: hidden;
    background-color: @stagesBackground;
    li {
      height: 30px;
      width: 27.5%;
      button,
      span {
        display: block;
        height: 30px;
        padding-left: 20px;
      }
      button {
        height: 50px;
      }
      .highlight {
        width: auto;
      }
    }
  }

  // Header
  .account-masthead {
    .account a i {
      line-height: 31px;
    }
  }
  .masthead {
    position: relative;
    z-index: 1;
    .logo img,
    nav {
      .ie7-inline-block;
    }
    .header-image {
      display: block;
    }
    .account .dropdown-menu {
      z-index: 10000;
    }
  }

  // Navs
  .module-narrow .nav-item.image {
    .clearfix;
  }
  .nav-facet .nav-item.active a {
    content: 'x';
  }

  // Toolbar
  .toolbar .breadcrumb li {
    padding-right: 10px;
    margin-right: 5px;
    background: transparent url("@{imagePath}/breadcrumb-slash-ie7.png") 100% 50% no-repeat;
    &.active {
      background-image: none;
    }
  }

  // Modules
  .module-heading {
    .clearfix;
    position: relative;
    .media-content {
      position: relative;
    }
    .media-image img {
      float: left;
    }
  }
  .group-listing {
    position: relative;
    zoom: 1;
  }

  // Resource Item listing on dataset page
  .resource-item {
    position: static;
    padding-bottom: 1px;
    .heading {
      position: relative;
    }
    .format-label {
      left: -48px; 
    }
    .btn-group {
      position: relative;
      float: right;
      top: -35px;
      right: 0;
    }
  }

  // Adds proper BG color for IE7
  .media-overlay .media-heading {
    background-color: #000;
  }

}
