.ms-parent {
  display: inline-block;
  position: relative;
  vertical-align: middle;
}

.ms-choice {
  display: block;
  height: 26px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  line-height: 26px;
  color: #444;
  text-decoration: none;
  background-color: #fff;
}

.ms-choice.disabled {
  background-color: #f4f4f4;
  background-image: none;
  cursor: default;
}

.ms-choice > span {
  position: absolute;
  top: 0;
  left: 0;
  right: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  padding-left: 8px;
  padding-top: 4px;
}

.ms-choice > span.placeholder {
  color: #999;
}

.ms-choice > div {
  position: absolute;
  top: 4px;
  right: 0;
  width: 20px;
  height: 25px;
  background: url('../img/multiple-select.png') right top no-repeat;
}

.ms-choice > div.open {
  background: url('../img/multiple-select.png') left top no-repeat;
}

.ms-drop {
  overflow: hidden;
  display: none;
  margin-top: -1px;
  padding: 0;
  position: absolute;
  z-index: 1000;
  top: 100%;
  background: #fff;
  color: #000;
  -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
  box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
}


.ms-search {
  display: inline-block;
  margin: 0;
  min-height: 26px;
  padding: 4px;
  position: relative;
  white-space: nowrap;
  width: 100%;
  z-index: 10000;
}

.ms-search input {
  width: 100%;
  height: auto !important;
  min-height: 24px;
  padding: 0 20px 0 5px;
  margin: 0;
  outline: 0;
  font-family: sans-serif;
  font-size: 1em;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  background: #fff url('../img/multiple-select.png') no-repeat 100% -22px;
  background: url('../img/multiple-select.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
  background: url('../img/multiple-select.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  background: url('../img/multiple-select.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
  background: url('../img/multiple-select.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
  background: url('../img/multiple-select.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
  background: url('../img/multiple-select.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
}

.ms-search, .ms-search input {
  -webkit-box-sizing: borderX-box;
  -khtml-box-sizing: borderX-box;
  -moz-box-sizing: borderX-box;
  -ms-box-sizing: borderX-box;
  box-sizing: borderX-box;
}

.ms-drop ul {
  overflow: auto;
  margin: 0;
  padding: 5px 8px;
}

.ms-drop ul > li {
  list-style: none;
  display: list-item;
  background-image: none;
  position: static;
}

.ms-drop ul > li .disabled {
  opacity: .35;
  filter: Alpha(Opacity=35);
}

.ms-drop ul > li.multiple {
  display: block;
  float: left;
}

.ms-drop ul > li.group {
    clear: both;
}

.ms-drop ul > li.multiple label {
  width: 100%;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-drop ul > li label.optgroup {
  font-weight: bold;
}

.ms-drop input[type="checkbox"] {
  vertical-align: middle;
}

form.searchresultsoptimizer {
  padding-bottom: 20px;
  
  div.searchresultsoptimizer_advanced_search {
    width: 100%;
    padding-top: 4px;
    clear: both;
    position: relative;
    z-index: 2;

    div.searchresultsoptimizer_advanced_option {
      width: 100%;

      &.searchresultsoptimizer_advanced_search_types, &.searchresultsoptimizer_advanced_search_terms {
        /*margin-bottom: 4px;*/
      }
      
      sup {
        position: relative;
        bottom: 2px;
      }

      select {
        float: right;
        width: 80%;
      }
      
      input.sro-search-field {
        width: 56%;
      }

      div.ms-parent {
        float: right;
        width: 80%;

        div.ms-choice {
          width: auto;
          border: 1px solid rgba(0, 0, 0, 0.1);
          border-radius: 2px;
          color: #2b2b2b;
          padding: 3px 0px;

          &:hover {
            border: 1px solid rgba(0, 0, 0, 0.3);
          }
        }

        div.ms-drop {
          width: 100%;
        }
      }

      div.restrictor {
        margin-left: 20%;
      }

      .searchresultsoptimizer_advanced_search_label {
        float: left;
        width: 20%;
        padding: 8px 0;
      }
    }
    
    div.srocf:last-child {
      padding-bottom: 10px;
    }
  }
  
  input.search-submit {
    display: inline-block;
    float: right;
    width: 23%;
  }
}

.srocf {
  *zoom: 1;
    
  &:before, &:after {
    content: " ";
    display: table;
  }
  
  &:after {
    clear: both;
  }
}

.sro-logo {
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 5px;
  
  > div {
    height: 20%;
    width: 100%;
  }
}

body.sro-advanced-search {
  &.search-results {
    header.page-header {
      margin-bottom: 10px;
    }
  }
  
  &.search-no-results {
    form.searchresultsoptimizer.search-form {
      padding: 0;
    }
  }
}

.sro-logo {
  float: left;
  margin-top: 10px;
}

div.sro-dashboard {

  div.dashboard-header {
    float: left;
    padding: 17px 12px;
    min-height: 90px;

    h2 {
      padding-bottom: 0;
    }

    h3 {
      font-size: 1em;
      margin: 0;

      &.attrib {
        font-style: italic;
        font-weight: normal;

        a {
          color: #666;
          text-decoration: none;
        }
      }
    }
  }
  
  div#poststuff {
    > div {
      width: 47%;
      
      &.left {
        float: left;
      }
      
      &.right {
        float: right;
      }
      
      div.tablenav.top {
        display: none;
      }
    }
  }
}

.sro-report {
  > div {
    width: 47%;
    
    &.chart {
      float: left;
      padding: 20px 20px 40px;
    }
    
    &.table {
      float: right;
      
      div.tablenav.top {
        display: none;
      }
    }
  }
}

div.sro-searches, div.sro-report {
  padding: 5px;
  
  &.pinning1 {
    div.sro-result {
      &:nth-child(1) {
        &.pinned {
          background: rgba(236, 208, 120, 0.3);
        }
        
        div {
          &.left {
            div.sro-pin {
              display: inline-block;
              font-size: 1.1em;
              width: auto;
              text-align: left;
              padding: 0 10px 0 7px;
              margin: 1px 0 5px 12px;

              &:before {
                padding-right: 3px;
              }
            }
          }
        }
      }
    }
  }
  
  div.sro-result {
    margin: 5px;
    cursor: move;
    
    &:nth-child(1) {
      background: rgba(236, 208, 120, 0.1);
    }
    
    &:nth-child(2) {
      background: rgba(217,91,67,0.1)
    }
    
    &:nth-child(3) {
      background: rgba(192,41,66,0.1)
    }
    
    &:nth-child(4) {
      background: rgba(84,36,55,0.1)
    }
    
    &:nth-child(5) {
      background: rgba(83,119,122,0.1)
    }
    
    h3 {
      span {
        &.timestamp {
          color: grey;
          font-style: italic;
          font-size: 0.8em;
          float: right;
        }
      }
    }
    
    div {
      &.left {
        float: left;
        width: 70%;
        
        div.sro-pin {
          display: none;
          cursor: pointer;
        }
      }
      
      &.right {
        float: right;
        width: 28%;
        text-align: right;
      }
      
      div {
        padding: 0px 12px 8px;
      }
    }
  }
}

.sro-colour-one {
  background: rgba(236, 208, 120,0.6);
}

.sro-colour-two {
  background: rgba(217,91,67,0.6);
}

.sro-colour-three {
  background: rgba(192,41,66,0.6);
}

.sro-colour-four {
  background: rgba(84,36,55,0.6);
}

.sro-colour-five {
  background: rgba(83,119,122,0.6);
}

span.sro-highlight {
  border-radius: 2px;
}

div.sro-searches-edit {
  div#poststuff {
    div.postbox-container {
      div#minor-publishing {
        div.ajaxtag {
          margin: 0 10px;
          
          input#new-theme {
            width: 200px;
          }
          
          input.themeadd {
            float: right;
          }
        }
      }
    }
  }
}

a.add-theme {
  cursor: pointer;
}

div.sro-nosearches {
  height: 50px;
  
  > div {
    float: left;
    
    &.left {
      width: 50px;
      height: 50px;
      border-radius: 5px;
      overflow: hidden;
      
      > div {
        height: 10px;
        width: 100%;
      }
    }
  
    &.right {
      padding: 2px 0 0 18px; 
      min-width: 400px;
    }
  }
}

body {
  &.version-3-6, &.version-3-7 {
    a.toplevel_page_searchresultsoptimizer {
      div.wp-menu-image {
        img {
          display: none;
        }
      }
    }
  }  
}