* {
    margin: 0;
    padding: 0;
}

html {
    font-family: Lato, sans-serif;
    font-size: 14px;
    background: #fdfdfd;
}

main {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 12px 45px 12px;
    box-sizing: border-box;
    color: #0c1d35;
}

html, body {
    height: 100%;
}

body, #master, main, #messages {
    min-height: 100%;
}

body.fixed-layout, body.fixed-layout #master, body.fixed-layout main, body.fixed-layout #messages {
  height: 1px;
}

/* TODO */
main > div > section:first-child,
main > form:first-child {
  margin-top: 20px;
}

a {
    color: inherit;
}

:focus {
    outline: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

section {
    margin-bottom: 25px;
    clear: both;
}

.item {
    margin-bottom: 15px;
}

/* Clickable item with arrow */
a.item {
    text-decoration: none;
    display: block;
    background: url(images/arrow-right.png) no-repeat right center;
    background-size: 10px;
    padding-right: 12px;
}

/* Router transitions */
main > * {
  top: 0;
}
.slide-enter-active, .slide-leave-active {
  position: relative;
  transition: all .2s;
  transition-property: opacity top;
}

.slide-enter, .slide-leave-to /* .fade-leave-active in <2.1.8 */ {
  opacity: 0;
  top: 20px;
  position: relative;

}

/* Page header */
main > div > header {
    margin: 0 -10px 20px -10px;
    border-bottom: solid 1px #0c1d35;
}

/* Back button */
header .back {
  display: block;
  width: 34px;
  height: 41px;
  padding: 0 0 0 0;
  float: left;
  background: url(images/arrow-left.png) no-repeat;
  background-size: 10px;
  background-position: center;
}

h1 {
    font-size: 120%;
    text-transform: uppercase;
    text-align: center;
    font-weight: normal;
    padding: 10px 0;
    margin: 0 34px;
}

h2 {
    font-size: 100%;
    text-transform: uppercase;
    margin-bottom: 8px;
}

img.dp {
    display: block;
    float: left;
    width: 42px;
    height: 42px;
    border: solid 1px #8d8d8d;
    border-radius: 25px;
    object-fit: cover;
    margin-right: 12px;
}

.double-dp {
  width: 44px;
  height: 44px;
  position: relative;
  float: left;
  margin-right: 12px;
}

.double-dp .dp {
  position: absolute;
  margin-right: 0;
  left: -5px;
}

.double-dp .dp + .dp {
  left: 5px;
}

img.tournament {
  height: 32px;
  width: 42px;
  object-fit: contain;
  display: block;
  float: left;
  margin: 5px 12px 0 5px;
}

.user-tag {
  display: inline-block;
  width: 150px;
  height: 42px;
}

.user-tag img {
  display: inline-block;
  float: none;
}

.user-tag h3 {
  display: inline-block;
  max-width: 95px;
  vertical-align: top;
}

h3 {
    font-size: 100%;
    padding-top: 4px;
}

section header > h3, section header > h2 {
    float: left;
}

header > div {
    float: right;
}

main > div > header > div {
    margin: 11px 5px 0 0;
}

section > header:after,
.field-num-games:after,
section:after,
.item:after {
    content:'';
    display: block;
    clear: both;
}

section header:after {
    content: '';
    display: block;
    clear: right;
}

.item a, small {
    font-size: 83%;
}

.item h3 a {
    font-size: 100%;
}

.item p a {
  font-size: 100%;
}

.pale {
  color: #878787;
}

.form-group {
    clear: both;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    text-transform: uppercase;
    /* font-weight: bold; */
    margin-left: 9px;
    font-size: 83%;
    /* color: #777; */
}

.form-group p {
    font-size: 120%;
    margin-left: 9px;
}

.form-group > input[type=text],
.form-group > input[type=email],
.form-group > input[type=password],
.form-group > input[type=number],
textarea,
.form-group select {
    display: block;
    font-size: 100%;
    padding: 8px 8px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: inherit;
    margin-top: 3px;
    border: solid 1px #ccc;
    border-radius: 4px;
    -webkit-appearance: none;
}

.form-group > .form-control.is-invalid {
    border-color: #dc3545;
}

.form-group > .invalid-feedback {
    margin-top: 3px;
    font-size: 83%;
    color: #dc3545;
    margin-left: 9px;
}

.form-group > input:focus,
textarea:focus {
    border-color: #0c1d35;
}

.form-group input[type=file] {
    display: block;
    float: left;
    width: 100px;
    margin-top: 3px;
    font-size: 100%;
    color: inherit;
}

.form-group input:disabled {
  border: none;
}

.form-group canvas {
  margin-top: 3px;
}

.btn-primary,
.btn-secondary,
.choice .active {
    border: none;
    display: inline-block;
    background: #ff6666;
    color: #fafffc;
    padding: 6px 15px;
    min-width: 100px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: normal;
    font-size: 100%;
    margin-right: 20px;
    cursor: pointer;
    outline: none;
    text-align: center;
    -webkit-appearance: none;
}

.btn-left {
    margin-right: 0;
    border-radius: 50px 0 0 50px;
    min-width: 0;
}

.btn-right {
    min-width: 0;
    border-radius: 0 50px 50px 0;
}

header .btn-primary,
header .btn-secondary,
.choice > .btn-secondary {
    min-width: 0;
    padding: 4px 10px;
    margin-right: 0;
    position: relative;
    top: -4px;
}

.item header .btn-primary,
.item header .btn-secondary {
  top: 0;
}

.item .btn-primary,
.item .btn-secondary {
     min-width: 0;
     padding: 4px 10px;
}

.item p .btn-secondary {
  padding: 2px 18px 2px 10px;
  background-image: url(images/arrow-right-white.png);
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 6px;
  font-size: 83%;
}

.choice a {
    position: relative;
    top: -4px;
}

.btn-secondary {
    background: #00265c;
}

.choice > a {
    padding: 4px 10px;
}

.btn-link { 
    color: #00265c;
    font-size: 100%;
}

.stats {
    display: flex;
}

.stats > * {
    flex: 1;
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.stats .pie-chart {
  display: inline-block;
  width: 35px;
  height: 35px;
  vertical-align: bottom;
}

.stats p {
  display: inline;
  font-size: 200%;
}

.stats label {
  display: block;
}

.item.tournament a {
  font-size: 100%;
  text-decoration: none;
}

.item.tournament > div {
  margin: 15px 0 0 30px;
}

ol.ranking {
  list-style: none;
}

ol.ranking li {
  /* margin-left: 40px; */
  counter-increment: ranking;
}

ol.ranking li.highlight {
    background-color: #FFFACD;
}

ol.ranking li:before {
  content: counter(ranking) '.';
  float: left;
  font-size: 170%;
  width: 35px;
  padding-top: 8px;
  margin-right: 9px;
  text-align: right;
}

ol.ranking li.item {
  clear: none;
}

ol.ranking .rank-change {
  float: right;
  margin: 9px 0px 0 0;
}


.award-img {
  height: 32px;
  width: 42px;
  display: block;
  float: left;
  margin: 5px 12px 0 5px;
  background-repeat: no-repeat;
  background-size: contain;
}

.award-gold {
  background-image: url(images/tournament-dark.png);
}

.award-silver {
  /* TODO */
}

.field-num-games label {
    float: left;
    font-size: 100%;
}

.field-num-games div {
    float: left;
    margin-left: 5px;
}

.field-num-games a {
    display: inline-block;
    text-align: center;
    width: 17px;
    height: 17px;
    padding: 5px !important;
}

section#match {
    display: flex;
}

section#match .player {
    flex: 1;
}

section#match .vs {
    margin-top: 10px;
}

#score .player {
    text-align: center;
}

#score .player img {
    display: block;
    float: none;
    margin: 0 auto;
}

#score table {
    clear: left;
    padding-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

#score tbody td {
    height: 40px;
}

#score table th {
    font-weight: normal;
    font-size: 83%;
}

#score table .player img {
    width: 20px;
    height: 20px;
}

#score table .player h3 {
    font-weight: normal;
    font-size: 83%;
    padding-top: 0;
}

#score table input {
    min-width: 40px;
    text-align: center;
    margin-top: 0;
}

#score input:disabled {
  color: #0c1d35;
  -webkit-text-fill-color: #0c1d35;
  opacity: 1;
}

.btn-primary.center,
.btn-link.center {
    display: block;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 15px;
}

.navbar-header {
    width:100%;
    padding:10px;
}
.navbar-brand {
    font-size:20pt;
    float:none;
}

@media (max-width: 0) { /* Change this to 0 */
    .navbar-nav .open .dropdown-menu {
    position: static;
    float: none;
    width: auto;
    margin-top: 0;
    background-color: transparent;
    border: 0;
    box-shadow: none;
    }
    .navbar-nav .open .dropdown-menu > li > a,
    .navbar-nav .open .dropdown-menu .dropdown-header {
    padding: 5px 15px 5px 25px;
    }
    .navbar-nav .open .dropdown-menu > li > a {
    line-height: 20px;
    }
    .navbar-nav .open .dropdown-menu > li > a:hover,
    .navbar-nav .open .dropdown-menu > li > a:focus {
    background-image: none;
    }
}

.info {
  margin-bottom: 15px;
}

.info label {
    display: block;
    text-transform: uppercase;
    font-size: 83%;
}

.info p {
    font-size: 120%;
}

/* New */
.clear {
    clear: both;
}

nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 45px;
    background: #00265c;
}

nav > .center {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

nav a {
    flex:  1;
    /* width: 20%; */
    height: 45px;
    display: block;
    /* float: left; */
    background-size: 30px;
    background-repeat: no-repeat;
    background-position: center center;
}

nav .home {
    background-image: url(images/home.png);
}

nav .profile {
    background-image: url(images/profile.png);
}

nav .play {
    background-image: url(images/play.png);
    background-color: #ff6666;
    position: relative;
    top: -10px;
    border-radius: 50px;
    width: 80px;
    height: 80px;
    background-position: center 9px;
    background-size: 40px;
    flex: none;
}

nav .chats {
    background-image: url(images/chat.png);
}

nav .chats.new {
    background-image: url(images/chat-new.png);
}

nav .tournaments {
    background-image: url(images/tournament.png);
}

/* Activities */
a.post {
  background-image: url(images/post.png);
  background-size: 17px;
  background-repeat: no-repeat;
  background-position: right 10px center;
  height: 19px;
  padding-right: 33px;
  padding-left: 13px;
}

.activities .photos {
    margin-left: 55px;
    display: block;
}

.activities .photos img {
    max-width: 80px;
    margin: 5px 5px 5px 0;
    vertical-align: middle;
}

.activities .photos.big img {
    display: block;
    max-width: none;
    width: 100%;
}

.activities a.like {
  display: inline-block;
  width: 20px;
  height: 19px;
  background: url(images/heart.png) no-repeat;
  background-size: contain;
}

.activities a.like.red {
  background-image: url(images/heart-red.png)
}

.activities span.num-likes {
  color: #ff6666;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  vertical-align: top;
  font-size: 83%;
  margin: 2px 0 0 2px;
}

.activities small {
  margin: 2px 0;
}

.activities small,
.activities div.actions {
  margin-left: 56px;
  display: block;
}

.activities a.comment {
  display: inline-block;
  width: 22px;
  height: 18px;
  background: url(images/comment.png) no-repeat;
  background-size: contain;
}

.activities .comments {
  margin: 5px 0 0 40px;
}

.activities .comments .dp {
  width: 36px;
  height: 36px;
  margin-right: 10px;
}

.activities .comments p {
  margin-left: 46px;
}

.activities .comments form {
  display: flex;
}

.activities .comments form div {
  display: block;
  flex: 1;
}

.activities .comments textarea {
  display: block;
  width: 100%;
  height: 50px;
  margin-bottom: 5px;
  box-sizing: border-box;
  resize: vertical;
}

.activities .comments .btn-primary {
  font-size: 83%;
}

/* Post */
#post textarea {
  height: 80px;
  resize: vertical;
}

/* Tournament details */
table.ranking {
  width: 100%;
}

table.ranking th {
  text-align: left;
}

table.ranking .rank {
  width: 20px;
}

table.ranking h3 {
  padding-top: 0;
}

table.ranking .points,
table.ranking .games {
  text-align: center;
  width: 40px;
}

.matches {
  margin-top: 10px;
}

.matches a {
  display: flex;
  text-decoration: none;
  margin-bottom: 5px;
}

.matches h3 {
  flex: 1;
  padding-top: 0;
  font-weight: normal;
}

.matches .score {
  margin-right: 20px;
}

/* Messages */
#messages {
    display: flex;
    flex-direction: column;
}

#messages > ul {
    flex: 1;
    list-style: none;
    overflow: scroll;
}

#messages > ul > li {
    margin: 0 30px 5px 0;
    padding: 5px;
    background: #00265c;
    color: #fff;
}

#messages > ul > li.mine {
    margin: 0 0 5px 30px;
    text-align: right;
}

form#send-message {
    margin: 0 -12px;
    display: flex;
}

#messages #send-message input[type=text] {
    display: block;
    flex: 1;
    width: 100%;
    padding: 9px 14px;
    font-size: inherit;
    border: none;
    border-top: solid 1px #0c1d35;
}

#messages #send-message input[type=submit] {
    display: block;
    background: #0c1d35;
    outline: none;
    border: none;
    width: 50px;
    color: #fff;
}

#conversations .unread {
    background-color: #d6e7ff;
    margin: -7px -12px 0 -12px;
    padding-left: 12px;
    padding-top: 7px;
    padding-bottom: 8px;
}

/* DP list */
.dp-list {
   white-space: nowrap;
   overflow: hidden;
}

.dp-item {
    display: inline-block;
    margin-right: -16px;
}

.dp-item .dp {
    display: block;
    float: none;
    margin-right: 0;
}

.no-results {
    color: #666;
    text-align: center;
    padding: 10px 0;
}

/* User multiselect */
.multiselect__option {
  padding: 3px !important;
}

.multiselect__option .item {
  margin-bottom: 0;
}

.multiselect__option .item h3 {
  padding-top: 12px;
}

.multiselect__option--highlight,
.multiselect__tag {
  background: #00265c !important;
}

.multiselect__tag-icon:after {
  color: #fdfdfd !important;
}

.multiselect--active .multiselect__tags,
.multiselect__content-wrapper {
  border-color: #0c1d35 !important;
}

.multiselect__spinner:before,
.multiselect__spinner:after {
  border-color: #0c1d35 transparent transparent !important;
}

/* Alerts */
.flashpool {
    box-sizing: border-box;
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    max-height: 400px;
    -webkit-perspective: 400px;
    perspective: 400px;
    z-index: 1;
}

.flashpool .flash__message {
    transition: all .5s;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    line-height: 130%
}

.flash-enter, .flash-leave-to {
    opacity: 0;
    -webkit-transform: rotateX(-30deg) scale(.88) translateY(-30px);
    transform: rotateX(-30deg) scale(.88) translateY(-30px)
}

.flash-leave-active {
    position: absolute
}

.flash__message {
    box-sizing: border-box;
    padding: 15px 30px 15px 15px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background-color: #ccc;
    position: relative
}

.flash__message.success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6
}

.flash__message.warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc
}

.flash__message.error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1
}

.flash__message.info {
    color: #37516a;
    background-color: #f2f5fe;
    border-color: #dfe3f0
}

.flash__close-button {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    right: 0;
    color: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 10px;
    margin: 0;
    padding: 8px
}

.flash__close-button:active, .flash__close-button:focus {
    outline: none
}