@import "mixins.less";

// gdgt databox container
#gdgt-wrapper {

  display: block;
  min-width: 650px;
  max-width: 1000px;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: 0;
  margin-right: 0;
  background-color: #FFF;
  border-color: #CCC;
  border-style: solid;
  border-top-width: 1px;
  border-bottom-width: 0;
  border-left-width: 0;
  border-right-width: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: normal;
  text-align: left;
  line-height: 1em;
  vertical-align: baseline;

  &.mini {
    min-width: 550px;
    max-width: 1000px;

    .gdgt-product-head {
      // no lowest price section
      &.gdgt-no-price {
        .gdgt-product-name {
          width: 85% !important;
        }
      }

      // three digit price or fewer
      &.gdgt-price-1digits, &.gdgt-price-2digits, &.gdgt-price-3digits {
          .gdgt-product-name {
            width: 53% !important;
          }

          .gdgt-product-price {
            width: 32% !important;
          }
      }
    }

    .gdgt-product-name {
      width: 50% !important;

      h2 {
        font-size: 20px;
        line-height: 22px !important;
      }
    }

    .gdgt-product-price {
      width: 35% !important;
    }

    .gdgt-content-left {
      width: 70% !important;
    }

    .gdgt-content-right {
      width: 24% !important;
    }

    .gdgt-button {
      padding-left: 10px;
      padding-right: 10px;
    }

    .gdgt-price {
      font-size: 36px !important;
    }
  }

  // resets
  a {
    text-decoration: none;
  }

  ol, ul {
    list-style: none;
  }

  li {
    background: none;
    list-style: none;
  }

  abbr {
    border-bottom-width: 0;
    font-size: inherit;
    letter-spacing: 0;
    text-transform: none; // theme override
  }

  img {
    border: 0;
  }

  .gdgt-clear {
    .clearfix();
  }

  // product container
  .gdgt-product {
    &.expanded {
      display: block;
      padding: 15px;
      margin: 0;
      background: none;
      border-color: #CCC;
      border-top-width: 0;
      border-bottom-width: 1px;
      border-left-width: 1px;
      border-right-width: 1px;
      border-style: solid;
      min-height: 243px;
    }

    &.collapsed {
      position: relative;
      height: 39px;
      padding-top: 0;
      padding-bottom: 0;
      padding-left: 15px;
      padding-right: 15px;
      margin: 0;
      border-width: 1px;
      border-style: solid;
      border-color: #CCC;
      border-top-width: 0;
      cursor: pointer;
      .vertical-gradient( #fafafa, #ededed );
    }
  }

  .gdgt-product-collapsed-name {
    width: 95%;
    padding: 0;
    margin: 0;
    font-size: 18px;
    color: #333;
    line-height: 40px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    a {
      color: inherit;
    }

    strong {
      font-weight: bold;
    }
  }

  .gdgt-product-expand-icon {
    display: inline-block;
    position: absolute;
    top: 14px;
    right: 15px;
    content: "";
    width: 18px;
    height: 12px;
    padding: 0;
    margin: 0;
    border-width: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-image: url( "images/databox.png" );
    background-position: -1px -48px;
  }

  // above tabs
  .gdgt-product-head {
    position: relative;
    min-height: 50px;

    // no lowest price data
    &.gdgt-no-price {
      .gdgt-product-name {
        width: 87% !important;
      }
    }

    // three digit price or fewer
    &.gdgt-price-1digits, &.gdgt-price-2digits, &.gdgt-price-3digits {
        .gdgt-product-name {
          width: 60% !important;
        }

        .gdgt-product-price {
          width: 27% !important;
        }
    }
  }

  .gdgt-product-image {
    float: left;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 15px;
    width: 50px;
    height: 50px;
  }

  // product name, instance names
  .gdgt-product-name {
    float: left;
    width: 58%;

    h2, ul {
      clear: none;
      padding: 0;
      background: none;
      border: none;
    }

    // product name
    h2 {
      display: block;
      margin-top: 3px !important;
      margin-bottom: 10px !important;
      margin-left: 65px !important;
      margin-right: 0;
      font-size: 24px;
      font-weight: normal;
      line-height: 26px;
      text-transform: none;

      strong {
        font-weight: bold;
        color: #3399CC;
      }

      a {
        position: relative;
        left: -2px;
        padding-top: 0;
        padding-bottom: 0;
        padding-left: 1px;
        padding-right: 1px;
        color: #3399CC;
        text-decoration: none;

        &:hover {
          background-color: #3399CC;
          color: #FFF;
          text-decoration: none !important;

          strong {
            color: #FFF;
          }
        }
      }
    }

    // instances
    ul {
      margin-top: -7px !important;
      margin-bottom: 12px !important;
      margin-left: 65px !important;
      margin-right: 0;
      font-size: 12px;
      font-weight: normal;
      color: #888;
      line-height: 18px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;

      li {
        display: inline;

        &:before {
          content: ", ";
        }

        &:first-child:before {
          content: "";
        }

        a {
          color: #888;
          text-decoration: none;

          &.selected {
            font-weight: bold;
          }

          &:hover {
            text-decoration: underline;
          }
        }
      }
    }
  }

  .gdgt-product-price {
    cursor: pointer;
    float: right;
    width: 29%;
    height: 48px;
    padding-top: 2px;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 8px;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 66px;
    text-align: right;
    text-transform: uppercase;
    border-right-width: 1px;
    border-right-style: solid;
    border-right-color: #ddd;
  }

  .gdgt-price-label {
    display: inline-block;
    width: 46px;
    margin-top: 7px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 2px;
    color: #666;
    line-height: 16px;
    text-align: right;
    vertical-align: top;
  }

  .gdgt-price {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 3px;
    padding-right: 3px;
    font-size: 45px;
    color: #3399CC;
    line-height: 45px;

    &:hover {
      background-color: #3399CC;
      color: #FFF;
      text-decoration: none !important;
    }
  }

  // powered by gdgt
  .gdgt-branding {
    position: absolute;
    right: 0;
    width: 66px;
    padding-top: 2px;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
    font-size: 10px;
    text-align: right;

    // black logo flips to red on hover
    .gdgt-logo {
      display: block !important;
      width: 49px !important;
      height: 23px;
      padding: 0;
      margin-top: 5px;
      margin-bottom: 0;
      margin-left: 15px;
      margin-right: 0;
      background-color: #FFF;
      background-repeat: no-repeat;
      background-image: url( "images/databox.png" );
      background-position: 0 0;
      text-align: left;
      text-indent: -10000px;
      overflow: hidden;
      vertical-align: middle;

      &:hover {
        background-position: 0 -23px;
      }
    }

    p {
      padding: 0;
      margin: 0;
      font-size: 10px;
      color: #666;
      text-align: right;
      overflow: hidden;
    }

    .gdgt-product-collapse-icon {
      background-color: transparent;
      background-image: url( "images/databox.png" );
      background-position: -21px -47px;
      background-repeat: no-repeat;
      display: inline-block !important;
      height: 12px;
      width: 18px;
      margin: 0;
      cursor: pointer;
      vertical-align: middle;
      text-align: right;
      overflow: hidden;
    }
  }

  // action buttons inside tab content
  // write a review, etc.
  .gdgt-button {
    display: inline-block !important;
    cursor: pointer;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #EEE;
    border-color: #CCC;
    border-style: solid;
    border-width: 1px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    line-height: normal;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    text-transform: uppercase;
    .border-radius( 4px );

    &:hover {
      background-color: #DDD;
      border-color: #BBB;
    }

    &:active {
      background-color: #CCC;
      border-color: #BBB;
    }

    span {
      height: 16px;
      padding-right: 16px;
      border-right-width: 1px;
      border-right-style: solid;
      border-right-color: #999;
    }
  }

  .gdgt-tab-divider {
    display: block;
    float: right;
    width: 0 !important;
    height: 26px !important;
    margin-top: 2px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    border-right-width: 1px;
    border-right-style: solid;
    border-right-color: #ccc;
  }

  // tab navigation
  .gdgt-tabs {
    .clearfix();
    clear: both;
    padding: 0;
    width: auto;
    height: 30px;
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    margin-left: 0;
    margin-right: 0;

    li {
      list-style: none;
      float: left;
      height: 30px;
      padding: 0;
      margin: 0;
      background-color: #F4F4F4 !important;
      font-size: 13px;
      font-weight: bold;
      color: #333;
      text-align: center;
      text-transform: uppercase;
      line-height: 31px;
      cursor: pointer;

      &:hover {
        background-color: #E3E3E3 !important;
      }

      &.selected, &.selected:hover {
        background-color: #333 !important;
        color: #FFF !important;
        cursor: default;
      }

      &.disabled {
        cursor: default;
        font-weight: normal;
        color: #CCC;

        &:hover {
          background-color: #F4F4F4 !important;
        }
      }

      a {
        color: #333 !important;
      }

      abbr {
        text-transform: uppercase;
      }

      .dot {
        color: #CCC;
      }

      .count {
        padding: 0;
        margin-left: 2px;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 0;
        color: #3399CC;
      }
    }

    .selected {
      .gdgt-tab-divider {
        display: none;
      }
    }

    &.two li {
      width: 50% !important;
    }

    &.three li {
      width: 33% !important;

      &:last-child {
        width: 34% !important;
      }
    }

    &.four li {
      width: 25% !important;
    }
  }

  // tab content
  .gdgt-content {
    .clearfix();
    min-height: 135px;
    padding: 0;
    margin: 0;
    background-color: #FFF;
    color: #333 !important;
    overflow: hidden;
  }

  // main tab content display
  .gdgt-content-left {
    float: left;
    width: 75%;
    min-height: 135px;
    padding-right: 15px;
    padding-left: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0 !important;
    border-right-color: #EEE;
    border-right-width: 1px;
    border-right-style: solid;
  }

  // right sidebar inside tab content soliciting viewer action
  .gdgt-content-right {
    float: right;
    width: 20%;
    padding: 0;
    margin: 0;

    p {
      padding: 0;
      margin-top: 3px !important;
      margin-bottom: 12px !important;
      margin-left: 0;
      margin-right: 0;
      font-size: 12px;
      line-height: 16px;
      text-align: left !important;
    }

    .gdgt-button {
      margin-top: 0;
      margin-bottom: 15px;
      margin-left: 0;
      margin-right: 0;
      white-space: nowrap;
    }
  }

  // no reviews, disucssions, etc.
  .gdgt-no-content {
    min-height: 95px !important;
    padding-top: 40px !important;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    line-height: 20px;
    color: #333;
    text-align: center;
  }

  .gdgt-link-right {
    .clearfix();
    float: right;
    padding: 2px;
    margin-top: 3px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    font-size: 13px;
    font-weight: bold;
    color: #3399CC;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none !important;

    &:hover {
      background-color: #3399CC;
      color: #FFF;
    }
  }
}