
// Responsive.less
// For phone and tablet devices
// -------------------------------------------------------------


// REPEAT VARIABLES & MIXINS
// -------------------------
// Required since we compile the responsive stuff separately

// RESPONSIVE CLASSES
// ------------------

// Hide from screenreaders and browsers
// Credit: HTML5 Boilerplate
.hidden {
  display: none;
  visibility: hidden;
}

// Visibility utilities

// For desktops
.visible-phone     { display: none; }
.visible-tablet    { display: none; }
.visible-desktop   { display: block; }
.hidden-phone      { display: block; }
.hidden-tablet     { display: block; }
.hidden-desktop    { display: none; }

// Phones only
@media (max-width: 767px) {
  // Show
  .visible-phone     { display: block; }
  // Hide
  .hidden-phone      { display: none; }
  // Hide everything else
  .hidden-desktop    { display: block; }
  .visible-desktop   { display: none; }
}

// Tablets & small desktops only
@media (min-width: 768px) and (max-width: 979px) {
  // Show
  .visible-tablet    { display: block; }
  // Hide
  .hidden-tablet     { display: none; }
  // Hide everything else
  .hidden-desktop    { display: block; }
  .visible-desktop   { display: none; }
}


// UP TO LANDSCAPE PHONE
// ---------------------

@media (max-width: 480px) {

  // Smooth out the collapsing/expanding nav
  .nav-collapse {
    -webkit-transform: translate3d(0, 0, 0); // activate the GPU
  }

  // Block level the page header small tag for readability
  .page-header h1 small {
    display: block;
    line-height: @baseLineHeight;
  }

  // Update checkboxes for iOS
  input[type="checkbox"],
  input[type="radio"] {
    border: 1px solid #ccc;
  }

  // Remove the horizontal form styles
  .form-horizontal .control-group > label {
    float: none;
    width: auto;
    padding-top: 0;
    text-align: left;
  }
  // Move over all input controls and content
  .form-horizontal .controls {
    margin-left: 0;
  }
  // Move the options list down to align with labels
  .form-horizontal .control-list {
    padding-top: 0; // has to be padding because margin collaspes
  }
  // Move over buttons in .form-actions to align with .controls
  .form-horizontal .form-actions {
    padding-left: 10px;
    padding-right: 10px;
  }
// Modals
  .modal {
	top:   50px;
    left:  10px;
    right: 10px;
  }
  .modal-header .close {
    padding: 10px;
    margin: -10px;
  }

  // Carousel
  .carousel-caption {
    position: static;
  }

}



// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
// --------------------------------------------------

@media (max-width: 767px) {

  // Padding to set content in a bit

  .navbar-fixed-top {
    margin-left: -20px;
    margin-right: -20px;
  }

  // GRID & CONTAINERS
  // -----------------
  // Remove width from containers
 /* .container {
     width: auto;
   }*/
  // Fluid rows
  .row-grid {
    width: 100%;
  }
  // Undo negative margin on rows
  .row {
    margin-left: 0;
  }
	// Make all columns even
	.row > [class*="span"],
	.row-grid > [class*="span"],
	.editor-row > [class*="span"],
	.row > [class*="offset"],
	.row-grid > [class*="offset"],
	.editor-row > [class*="offset"]{
		float: none;
		display: block;
		width: auto;
		margin-left: 0;
	}
	.row > [class*="offset"]:first-child,
	.editor-row > [class*="offset"].sortable-first{
	margin-left: 0;
	}
  // THUMBNAILS
  // ----------
  .thumbnails [class*="span"] {
    width: auto;
  }

  // FORM FIELDS
  // -----------
  // Make span* classes full width
  input[class*="span"],
  select[class*="span"],
  textarea[class*="span"],
  .uneditable-input {
    .input-block-level();
  }
  // But don't let it screw up prepend/append inputs
  .input-prepend input[class*="span"],
  .input-append input[class*="span"] {
    width: auto;
  }
  // Modals
  .modal {
    position: fixed;
    top:   50px;
    left:  20px;
    right: 20px;
    width: auto;
    margin: 0;
    &.fade  { top: -100px; }
    &.fade.in { top: 50px; }
  }
}



// PORTRAIT TABLET TO DEFAULT DESKTOP
// ----------------------------------

@media (min-width: 768px) and (max-width: 979px) {

  // Fixed grid
  //--// #grid > .core(42px, 20px);

  // Fluid grid
  //grid > .fluid(5.601104972%, 2.562430939%);

  // Input grid
  #grid > .input(42px, 20px);

}




// LARGE DESKTOP & UP
// ------------------

@media (min-width: 1200px) {

  // Fixed grid
/*  #grid > .core(70px, 30px);

  // Fluid grid
  #grid > .fluid(5.982905983%, 2.564102564%);

  // Input grid
  #grid > .input(70px, 30px);
*/
  // Thumbnails
  .thumbnails {
    // margin-left: -30px;
  }
  .thumbnails > li {
    margin-left: 30px;
  }

}
