$navbarCollapseWidth: 767px; // Overide width that the menu collapses at
$aoi_lightblue: #58B0E2; // Light blue from Logo
$aoi_blue: #367BBE;      // Blue from Logo
$aoi_alt-bg: #eeeeee;

@import "bootstrap/bootstrap";

// Include responsive Bootstrap styles
@import "bootstrap/responsive";

/*!
 * All Our Ideas - Responsive CSS
 * Extends Twitter Bootstrap
 *
 * http://allourideas.org
 *
 * Generated by aoi-responsive.less
 * DO NOT DIRECTLY EDIT aoi-responsive.css
 * as your changes will be overwritten.
 *
 *
 */

.container-fluid {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

/*!
 * AOI CSS
 */


// -------------------------------
//  All pages
// -------------------------------

html{
  -webkit-overflow-scrolling: touch; // Use momentum based scrolling for the main page
}

body{
  &.modal-open {
    overflow: hidden;  // Stops Android scrolling the main page rather than the modal
  }
}

.logo{
  margin-top: 1em;
}

h2{
  @media (max-width: 767px) {
    font-size: 21px; // Reduce the size of the header on mobile
    line-height: 30px;
  }
}

.pagination {
  @media (max-width: 767px) {
    ul li.current {
      display: none;
    }
  }
}


// -------------------------------
//  Menu
// -------------------------------

.navbar-static-top{
  width: auto; // Make the menu stretch to the sides
  min-width: 100%;
}
.navbar .btn-navbar{
  @extend .pull-left; // Move the button that show/hides the menu to the left
}



// -------------------------------
//  'Create New' Section 
// -------------------------------

form#new_question_form{
  fieldset{
    legend{
      padding-top: 1em;
    }
  }
}

// -------------------------------
//  Vote Section
// -------------------------------

.vote-tabs {
  margin-bottom: 0;
  border-bottom: none;
  padding-right: 2em;
}
.vote-tabs > li.active > a, .vote-tabs > li.active a:hover {
  background-color: #F2F2F2;
}
.tab-content{
  //background-color: @aoi_alt-bg;
  //@include gradient-vertical(#fff, $aoi_alt-bg);
  background-color: #F2F2F2;
  padding: 2em 0;
  border-radius: 7px;
  -moz-border-radius: 7px;
  -webkit-border-radius: 7px;
  position: relative;
}
#cookies-failed {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0, 0.8);
  border-radius: 7px;
  -moz-border-radius: 7px;
  -webkit-border-radius: 7px;

  >div {
    margin: 4em 4em;
    padding: 1em;
    background-color: #ffffff;
    border-radius: 7px;
    -moz-border-radius: 7px;
    -webkit-border-radius: 7px;
  }
  h2 {
    padding-left: 25px;
    background: url(../images/blocked_cookies.png) no-repeat left center;
  }
}
.interior-content {
  background-color: white;
  margin: 0 2em;
  padding: 0 2em;
  border-radius: 7px;
  -moz-border-radius: 7px;
  -webkit-border-radius: 7px;
}
.welcome-message .alert {
  @media (max-width: 767px) {
    margin-left: 5%;
    margin-right: 5%;
  }
}

.vote-question{
  text-align: center;
  @media (max-width: 480px) {
    font-size: 18px;
    line-height: 24px;
  }
  @media (max-width: 767px) {
    margin: 0 5%;
  }
}

.answers{
  @media (max-width: 767px) {
    margin: 0;
    padding: 0 5%;
    width: 100%;
    @include box-sizing(border-box);
    
    li{
      width: 100%;
      @include box-sizing(border-box);
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 1em;
    }
  }
}

.vote_stats{
  text-align: center;
  color: #666666;   // Deemphasise from other options
  font-size: 12px;  // ? Discuss hiding on mobile to bring 'Add Idea' further up screen.
  clear: both;
}

.btn-vote{  // The main left/right vote buttons
  @extend .btn-primary;  // Extend Primary Button from Bootstrap
  @extend .btn-large;  // Extend Large Button from Bootstrap
  
  display: table-cell;  // Allows us to use vertical-align to centre the text
  vertical-align: middle;
  min-height: 8em;  // This should be the maximun height (number of lines) 140 chars will wrap to in our sizes
  width:100%;
  
  @media (max-width: 480px) {
    font-size: 16px;
  }
  
}


// -------------------------------
//  'Cant decide' button and modal
// -------------------------------
.cant_decide{
  text-align: center;
}
@media (max-width: 767px) {
  #cant_decide_btn{
    width: intrinsic;  // Tell the button to be it's natural width if it
    min-width: 50%;    // is greater than 50% or stop at 50% if it is less
    @include center-block;  // Centre the button horizontally
  }
}

#cant_decide_options{
  button.btn-primary{
    width: 100%;  // Make the buttons the full width of their column
    min-height: 3.6em; // Set a min-height so buttons in each column line up.
  }
  
  @media (min-width: 1200px){ // large screen
    width: 600px; // Give it a bit more space if it is a huge screen
  }
    
  @media (max-width: 979px) and (min-width: 768px){ // desktop
    width: 500px;
    .span6{
      width: 100%;
      margin-left: 0;
    }
  }
  
  @media (max-width: 767px) {  // small screen / mobile
    position: fixed;
    top: 10px;      // Position the modal "full screen" on mobile
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    
    h2{
      font-size: 14px;
      line-height: 21px
    }
    button.btn-primary{
      min-height: auto; // Remove the min height when the buttons are shown in a single column to save vertical space and hopefully fit all of the options in on one screen.
    }
    .modal-body{  // Allow the body to fill the container space now we are "full screen"
      bottom: 0px;
      top:60px;
      position: absolute;
      max-height: 100%;
      height: auto;
      -webkit-overflow-scrolling: touch;
    }
    
    .close{  // Make the close button a bigger target on small screens
      font-size: 40px;
      line-height: 30px;
    }
  }
  
} 




//  ----------------------------------------------------
//  New Idea Box
//  ----------------------------------------------------

#the_add_box{
  
  h3{
    color: $aoi_blue;
  }
  
  #new_idea_field{
    width: 100%;
    @include box-sizing(border-box);
    min-height: 4em;
  }
}







.choice-progress{
  .progress{
    width: 85%;
    float: left;
    margin-right: 1em;
  }
}
@media (max-width: 767px) {
  #data-vis{
    display: none;
    visibility: hidden;
  }
}

//  ----------------------------------------------------
//  Grid tweaks from the default Bootstrap responsive grid
//  ----------------------------------------------------

@media (max-width: 767px) {

  // Remove offset since Bootstrap resets all span widths to 100% but doesn't reset the Offset
  body{
    .row-fluid {
      @for $i from 1 through $gridColumns {
        .offset#{$i} { margin-left: 0; }
        .offset#{$i}:first-child { margin-left: 0; }
      }
    }
  }
  
  body.container-fluid{
    padding-left: 1em;
    padding-right: 1em;
  }

}

ul.footer-social-icons {
    list-style: none;
    margin-left: 0;
    overflow: hidden;
    width: 128px;
    li a {
        display: block;
        text-indent: -9999px;
        background: url(../images/social_icons.png) no-repeat;
        background-size: 152px 64px;
        float: left;
        width: 32px;
        height: 32px;
        white-space: nowrap;
    }
    li.fb a:hover {
        background-position: 0 -32px;
    }
    li.twitter a {
        background-position: -40px 0;
    }
    li.twitter a:hover {
        background-position: -40px -32px;
    }
    li.github a {
        background-position: -80px 0;
    }
    li.github a:hover {
        background-position: -80px -32px;
    }
    li.blog a {
        background-position: -120px 0;
    }
    li.blog a:hover {
        background-position: -120px -32px;
    }
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
    only screen and (-o-min-device-pixel-ratio: 3/2),
    only screen and (min--moz-device-pixel-ratio: 1.5),
    only screen and (min-device-pixel-ratio: 1.5) {
        li a {
            background-image: url(../images/social_icons@2x.png);
        }
    }
}
.navbar .brand {
    padding-top: 1px;
    padding-bottom: 1px;
}
.powered-by {
    text-indent: -9999px;
    display: block;
    width: 139px;
    height: 29px;
    background: url(../images/powered-by-aoi.gif) no-repeat;
    font-size: 0;
}
.powered-by:hover {
    background-position: 0 -29px;
}
.footer {
    @media (max-width: 767px) {
        margin-left: -20px;
        margin-right: -20px;
        text-align: center;

        .powered-by {
            margin: 0 auto;
        }
        .footer-right {
            float: none;
        }
        .footer-social-icons {
            margin: 0 auto;
        }
        .generous-grantees {
            margin-bottom: 40px;
        }
    }
}
.tooltip {
    font-size: 14px;
}
a.glyphicon {
    color: black;
    &:hover {
        text-decoration: none;
    }
}
a i.glyphicon {
    color: black;
    &:hover {
        text-decoration: none;
    }
}
.download-data {
    .row-fluid {
        margin-bottom: 0.5em;
    }
    .title {
        text-align: right;
    }
}
