/*
 * This file is meant to add a very minimal set of changes on top of what bootstrap provides
 * to makes sure that everything looks good with the way tourney.cc uses what is provided by bootstrap
 */

header h1 {
   padding-left: 30px;
   display: inline;
   vertical-align: middle;
}

header { padding-bottom: 0px; padding-top: 0px; overflow: visible; }
#userbar { margin-bottom: 0; }

/* width of form elements */
.controls textarea {         width: 400px; }
.controls select {           width: 400px; }
.controls input[type=text] { width: 400px; }

/* HTML/CSS is fkn stupid sometimes */
.pretty-form input, .pretty-form button {
    width: 100%;
    min-height: 1em;
    box-sizing: border-box; /* css3 rec */
    -moz-box-sizing: border-box; /* ff2 */
    -ms-box-sizing: border-box; /* ie8 */
    -webkit-box-sizing: border-box; /* safari3 */
    -khtml-box-sizing: border-box; /* konqueror */
}
.pretty-form input { min-height: 2em; }

/* We abuse Bootstrap's 'wells' to draw boxes around stuff. Remove margins from the first and last element in them */
.well>*:first-child { margin-top: 0; }
.well>*:last-child { margin-bottom: 0; }

/* tourney.cc standard elements */
h3.title { line-height: inherit; border-bottom: 1px solid lightgray; padding-bottom: 5px; }
.no-content { line-height: 135px; vetical-align: middle; text-align: center; font-style: italic; }

/* increase width of modal dialogs */
.modal  { margin-left: 0; margin-right: 0; left: 10%; right: 10%; width: 80%; }
.modal .modal-body { max-height: 600px; }

/* help-text styling */
.popover.right { max-width: 320px; }

/* fix 'text-right' for table cells */
table td.text-right, table th.text-right { text-align: right; }
table td.text-center, table th.text-center { text-align: center; }

/* .span#.center */
.row>.centered, .row-fluid>.centered { float: none;  margin-left: auto;  margin-right: auto; }

/* bootstrap falls flat on its face when you want to arrange a bunch of things in a grid */
ul.block-grid, ol.block-grid { width: 100%; }
ul.block-grid:after, ol.block-grid:after { display: table; content: ""; clear: both; }
ul.block-grid>li, ol.block-grid>li { display-type: inline-block; margin-left: 0px; }
ul.block-grid>li.span2, ol.block-grid>li.span2 { width: 16.6666%; }
ul.block-grid>li.span3, ol.block-grid>li.span3 { width: 25%; }
ul.block-grid>li.span4, ol.block-grid>li.span4 { width: 33.333%; }
ul.block-grid>li.span6, ol.block-grid>li.span6 { width: 50%; }
ul.block-grid>li.span12, ol.block-grid>li.span12 { width: 100%; }

/* group's may have different heights */
.group-row>.span6:nth-child(odd) { margin-left: 0; }

/* tourney.cc specific layout: brackets */
#bracket-frame { position: relative; overflow: visible; }
#bracket-fullscreen { position: fixed; left: 0; top: 0; right: 0; bottom: 0; }
#bracket-fullscreen>#bracket-innerframe { position: relative; max-height: 100%; }
#bracket-frame>#bracket-innerframe { max-height: 700px; }
#bracket-innerframe { position: relative; overflow: auto; }
#bracket-sidebar { position: absolute; top: 0px; right: 0px; z-index: 100; }
#bracket-scrollwindow { display: none; margin-top: 10px; }
.bracket .bracket-participant { margin: 0; position: absolute; z-index: 5; }
.bracket .bracket-participant .match-link.playerlabel { text-align: left; }
.bracket .bracket-participant .match-link.fallback {  text-align: center; color: #ADAFAE; }
.bracket .bracket-participant .score.muted { color: #ADAFAE; }
.bracket .bracket-participant .score { display: inline-block; width: 14px; }
.bracket .bracket-hline { background: #ADAFAE; height: 2px; position: absolute; z-index: 1; }
.bracket .bracket-vline { background: #ADAFAE; width: 2px;position: absolute; z-index: 1; }


ul.playerlist { text-align: left; list-style: none; }

#site.well { margin-top: 0; padding-top: 0; border-top: none; }