/*
 * This file is part of mesamatrix.
 *
 * Copyright (C) 2014 Romain "Creak" Failliot.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* Best practice: https://css-tricks.com/box-sizing/ */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-size: 85%;
    font-family: sans-serif;
    background-color: #ffffff;
}

a:link {
    text-decoration: none;
    color: rgb(20, 20, 210);
}
a:visited{
    color: rgb(130, 130, 210);
}
a:hover, a:active {
    text-decoration: underline;
}

#main {
    width: 1100px;
    margin: auto;
}

header {
    display: flex;
    justify-content: space-between;
}
header .header-icons {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}
header .header-icons img.rss {
    width: 32px;
    height: 32px;
    margin: 3px;
}

.stats {
    display: flex;
}
.stats-commits {
    order: 0;
    white-space: nowrap;
}
.stats-lb {
    order: 1;
    margin-left: 5px;
}

.commits th                         { text-align: left; }
.commits .commitsAge                { padding-right: 2em; }
.commits .commitsAge::first-letter  { text-transform: uppercase; }

.lb                             { border-collapse: collapse; border-spacing: 0; width: 100%; }
.lb th, .lb td                  { padding: 0.25em 0.5em; }
.lb th                          { background-color: #d3d7cf; }
.lb td                          { border: 1px solid #d3d7cf; }
.lbCol-rank                     { text-align: center; }
.lbCol-driver                   { min-width: 10em; }
.lbCol-score, .lbCol-version    { text-align: right; }
.lbCol-pctScore                 { font-size: 0.8em; color: rgb(120, 120, 120); }
.lbCol-1st td                   { background-color: rgba(195, 255, 155, 1.00); }
.lbCol-2nd td                   { background-color: rgba(195, 255, 155, 0.67); }
.lbCol-3rd td                   { background-color: rgba(195, 255, 155, 0.33); }

/**
 * Matrix table
 */

.matrix {
    border-spacing: 1px;
    border-collapse: separate;
    width: 100%;
}

.hCellGl {
    padding: 0.8em 0 0 0;
    font-weight: bold;
    font-size: 2em;
    text-align: left;
}

.hCellGlVersion {
    padding: 0.8em 0 0.8em 0;
    font-weight: bold;
    font-size: 1.5em;
    text-align: left;
}

.hCellHeader {
    padding: 0.2em;
    font-weight: bold;
    text-align: center;
    cursor: default;
}

.hCellDriverScore {
    font-weight: bold;
    color: #DDDDDD;
    cursor: default;
}

.hCellDriverScore-done { color: #99D75F; }
.hCellDriverScore-almost { color: #E1A25E; }
.hCellDriverScore-notyet { color: #B94B3D; }

.hCellVendor-default    { background-color: #d3d7cf; }
.hCellVendor-software   { background-color: #d1b4ce; }
.hCellVendor-intel      { background-color: #b9cee4; }
.hCellVendor-nvidia     { background-color: #d5f796; }
.hCellVendor-amd        { background-color: #f7b5b2; }
.hCellVendor-qualcomm   { background-color: #c7dce8; }

.hCellSep       { width: 0px; }

.permalink { margin-left: 0.3em; visibility: hidden; }
.permalink:link { text-decoration: none; color: #DDDDDD; }
.permalink:visited { text-decoration: none; color: #DDDDDD; }
:hover > .permalink { visibility: visible; }

.extension-child { padding-left: 1em; }

.extension > td.hover {
    opacity: 0.75;
}

.extension > td:nth-child(1).hover {
    background-color: #ededed;
    opacity: 1.0;
}

.task {
    position: relative;
    padding-right: 4px;
    height: 1.3em;
    padding: 0;
    cursor: default;
    text-align: center;
}
.task span {
    position: absolute;
    bottom: 0;
    right: 0;
    font: 0.7em sans-serif;
    text-decoration: none;
    color: black;
}

.isDone { background-color: #A7E969; }
.isInProgress { background-color: #E99D4A; }
.isNotStarted { background-color: #D55E4F; }

.footnote.task {
    padding: 0;
    cursor: help;
}
.footnote.isDone {
    background: repeating-linear-gradient(45deg, #A7E969, #A7E969 10px, #97C86A 10px, #97C86A 20px);
}
.footnote.isInProgress {
    background: repeating-linear-gradient(45deg, #E99D4A, #E99D4A 10px, #C9853F 10px, #C9853F 20px);
}
.footnote.isNotStarted {
    background: repeating-linear-gradient(45deg, #D86758, #D86758 10px, #AA574C 10px, #AA574C 20px);
}

/**
 * Menu
 * Inspired from http://purecss.io/menus/
 */
.menu {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.menu-list, .menu-item {
    position: relative;
}
.menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0.3em 0;
}
.menu-item {
    margin: 0 0.3em 0 0;
    padding: 0;
}
.menu-item > a {
    padding: 0.5em 1em;
    text-decoration: none;
    color: #777;
}
.menu-item > a:hover, .menu-item > a:focus {
    background-color: #eee;
}
.menu-selected > a {
    border-radius: 0;
    background-color: #ddd;
}
.menu-selected > a, .menu-selected > a:visited {
    color: #333;
}

@media screen and (max-width: 1400px) {

#github-ribbon {
    display: none;
}

}

/**
 * CSS for the donation page.
 */

/* Highlight in yellow the Donate menu */
.menu-list li:nth-child(4) > a {
    border-radius: 5px;
    background-color: #FFF0D7;
}

.contributor-list {
    width: 30em;
    margin: auto;
}
.contributor-list .subtitle {
    font-size: 0.8em;
    font-weight: normal;
}
.contributor-list .contributor-year {
    margin: 0.5em 0 0.3em 0;
    font-size: 1.2em;
    font-weight: bold;
}
.contributor-list .contributor-table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
}
.contributor-list .contributor-rank {
    width: 1.5em;
    text-align: left;
}
.contributor-list .contributor-name {
    text-align: left;
}
.contributor-list .contributor-date, .contributor-total {
    width: 7em;
    text-align: right;
}
.contributor-list .contributor-donation, .contributor-total-donation {
    width: 7em;
    text-align: right;
}
.contributor-list .contributor-total, .contributor-total-donation {
    font-weight: bold;
}

.donate-bar {
    margin: 2em;
    max-width: 400px;
}

.form-row {
    margin: 0.6em 0 0.2em 0;
}

.form-row input[type=text] {
    display: block;
    width: 100%;
    margin: 0.2em 0;
}

.form-row + .submit {
    margin-top: 1em;
    text-align: right;
}
