:root {
    /** Specify the BG color in one place. **/
    --background-color: white;
    --text-color: black;
}

/** WCAG fixes start **/
.btn-primary {
    background-color: #0072ed;
}
.btn-success {
    background: #0a8927;
}
.card-body > ul > li > a {
    color: #0072ed;
}
/** WCAG fixes end **/

body {
    color: var(--text-color);
    background-color: var(--background-color);
    font-family: Roboto, sans-serif;
    padding-bottom: 4em;
    padding-top: 4.5rem;
}

/* has no menu */
body.static {
    padding-top: 1rem;
}

/* menu */
#menuDefault ul li.nav-item {
    white-space: nowrap;
}

#djlogo {
    width: 93px; height: 196px;
}

a {
    text-decoration: none;
}

.submitform {
    max-width: 450px;
}
.clarificationform {
    max-width: 800px;
}

.disabled, .dropdown-disabled, .disabled td {
    color: silver !important;
}

.unseen {
    font-weight: bold;
}

.data-table .ignore, table td.ignore {
    text-decoration: line-through;
}

.probid, .langid { font-variant: small-caps; }

.badge-testcase {
    width: 20px;
    margin-right: 1px;
    padding-left: 0;
    padding-right: 0;
}

.sol {
    font-weight: bold;
    font-variant: small-caps;
}

.sol_correct, .compile-successful     { color: green;  }
.sol_incorrect, .compile-unsuccessful { color: red;    }
.sol_queued       { color: gray;   }

.judgetime      { font-size: smaller; font-style: italic; }
.testcases_prev { font-size: xx-small; }
.prevsubmit     { color: #696969; }

.output_text {
    border-top: 1px dotted #c0c0c0;
    border-bottom: 1px dotted #c0c0c0;
    background-color: #fafafa;
    margin: 0;
    padding: 5px;
    font-family: monospace;
    white-space: pre;
}

.clarificationform pre {
    border-top: 1px dotted #c0c0c0;
    border-bottom: 1px dotted #c0c0c0;
    background-color: #fafafa;
    margin: 0;
    padding: 5px;
    font-family: monospace;
    white-space: pre;
}

kbd {
    background-color: #fafafa;
    color: black;
}

.teamid { font-family: monospace; }
.filename, .hostname { font-family: monospace; }

.nodata {
    color: #767676;
    font-style: italic;
}

a.collapse-link { color: black; text-decoration: none; }

table.lcsdiff {
    border-spacing: 0;
    border-collapse: collapse;
}
table.lcsdiff td.linenr {
    background-color: darkgray;
    text-align: right;
    border-right: solid 1px black;
    padding-right: 7px;
}

ins {
    background: #dfd;
    text-decoration: none;
}
del {
    background: #fdd;
    text-decoration: none;
}


.run h4 {
    font-size: 1.25rem;
    padding-top: 1rem;
}

.run h5 {
    font-size: 0.9rem;
    font-weight: bold;
    padding-top: 1.2rem;
}

.source-tab {
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    padding: 0.5rem;
}

#lastmod {
    position: absolute; right: 1ex; margin-top: 1em;
}
#lastmod, #lastmod a {
    font-size: x-small;
    color: gray;
    text-align: right;
}

.center { margin: 0 auto; }

.scoreboard {
    border-collapse: collapse;
    clear: both;
}
.scoreboard td {
    font-size: small;
    vertical-align: middle;
    text-align: center;
}
.scoreboard td div {
    width: 4em;
    font-size: 120%;
    display: inline-block;
}
.scoreboard td div span {
    font-weight: normal;
    font-size: 70%;
    display: block;
}
.scoreboard tr {
    border-bottom: 1px solid black;
    height: 42px;
}
.scoreboard td, .scoreboard th {
    border-right: 1px solid silver;
    padding: 0;
}
.scoreboard td.no-border, .scoreboard th.no-border {
    border: none;
}
.scoreboard td.heart {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.scoreboard td.rank {
    padding-left: 0.3em;
    padding-right: 0.3em;
}
.scoreboard td.score_cell {
    min-width: 4.2em;
    border-right: none;
}
.scoreboard a {
    display: block;
    padding: 2px 1px 2px 1px;
    text-decoration: none;
    color: black;
}

.scoreboard .scoretn {
    padding: 0 5px 0;
    text-align: right;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forceWidth {
    position: relative;
    display: block;
    overflow: hidden;
}

.mobile-problem-badges {
    position: relative;
    display: block;
    white-space: nowrap;
}

.toolong:after {
    content: "";
    width: 30%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
}
.scoreboard .scoreaf { white-space: nowrap; border: 0; padding-left: 2px; text-align: center; }
.scoreboard .scoreaf img { vertical-align: middle; }
.mobile-scoreboard .countryflag {
    height: 1rem;
    width: 1.33rem;
    border-radius: 0.1875rem;
}
.univ {
    font-size: 80%;
    font-weight: normal;
    color: dimgrey;
}

img.affiliation-logo {
    max-height: 32px;
    max-width: 32px;
    padding-left: 2px;
}

.scoreheader {
    font-variant: small-caps;
    border-bottom: 2px solid black;
    white-space: nowrap;
}
.scoreheader th {
    text-align: center;
    box-shadow: -1px 0 0 0 silver inset,
                0 2px 0 0 black;
    border: none;
    background: var(--background-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.problempoints {
    font-size: smaller;
    font-weight: normal;
    color: #303030;
    padding-left: 3pt;
    padding-right: 3pt;
}

.score_correct             { background: #60e760; }
.score_correct.score_first { background: #1daa1d; }
.score_incorrect           { background: #e87272; }
.score_pending             { background: #6666ff; }

.gold-medal   { color: #eec710 }
.silver-medal { color: #aaa }
.bronze-medal { color: #c08e55 }

#scoresolv,#scoretotal,#scoresolvmobile,#scoretotalmobile { width: 2.5em; }
.scorenc,.scorett,.scorepl { text-align: center; width: 2ex; }
.scorenc { font-weight: bold; }
td.scorenc { border-color: silver; border-right: 0; }

.scoreprob { width: 3.0em; vertical-align: middle; }
.scoreaffil { text-align: center; }

.scoresummary {
    border-top: 2px solid black;
    border-bottom: none;
    font-variant: small-caps;
}
.scorethisisme  {
    background: #ffff99;
}

.scorelegend {
    display: inline-block;
    vertical-align: top;
}

.scorelegend td, .scorelegend th {
    text-align: center;
    width: 25ex;
}

#teamscoresummary { margin-top: 2.5em; }

/* between different sortorder-categories, print a thick line */
.sortorderswitch { border-top: 2px solid black; }

.filterbox {
    margin-left: 1rem;
    margin-right: 1rem;
}
.filterbox label {
    font-size: smaller;
    color: gray;
    margin: 0 0 0 1rem;
}
.filterbox .form-control {
    width: auto;
}

.circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid black;
    display: inline-block;
}

.heart {
    padding: .3em;
    cursor: pointer;
}

.heart.fas {
    color: red;
}

.countryflag {
    height: 1.5rem;
    width: 2rem;
    border-radius: .375rem;
    margin: .125rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
}

.select2 img.countryflag {
    height: 25px;
    width: auto;
}

table.rejudgetable td {
    text-align: center;
    padding: .5rem;
}
table.rejudgetable td,th {
    padding: .5rem;
}
table.rejudgetable td.changed {
    background-color: #fdd;
    font-weight: bold;
}
table.rejudgetable td.identical {
    background-color: #dfd;
}
table.rejudgetable td.zero {
    background-color: #f0f8ff;
}

tr.ignore td, td.ignore, span.ignore {
    text-decoration: line-through;
}

.clarification-subject-form, .clarification-queue-form {
    display: none;
}

.form-inline {
    display: inline;
}

.input-group-text {
    font-size: small;
    width: 3em;
}

.card-header .fa {
    transition: .5s transform ease-in-out;
}
.card-header .collapsed .fa {
    transform: rotate(90deg);
}

.banner {
    max-width: 98%;
    max-height: 12ex;
    height: auto;
    display: block;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
}

.teampicture {
    width: 100%;
    border: 1px solid black;
}

.problem-list h2, .problem-list h3, .problem-list h4 {
    text-align: center !important;
}

.problem-list h2 {
    font-size: 1.17em;
}

.problem-list h3 {
    font-size: 1.12em
}

.problem-list h4 {
    font-size: .83em;
}

#teamwelcome {
    padding-top: 3rem;
}
#teamwelcometeam {
    font-weight: bold;
}
#contestnotstarted {
    color: silver;
    margin-top: .2ex;
    font-weight: normal;
}

.teamoverview {
    border-top: solid 1px darkgray;
    border-bottom: solid 1px darkgray;
    background-color: #c4d8ff;
    margin-top: 2ex;
    padding-left: 1ex;
    font-size: 1.17em;
    text-align: center;
}

.ajax-loader {
    -webkit-animation: spin 4s linear infinite;
    -moz-animation: spin 4s linear infinite;
    animation: spin 4s linear infinite;
}

@-moz-keyframes spin {
    100% {
        -moz-transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.scrollable-menu {
    height: auto;
    max-height: 500px;
    overflow-x: hidden;
}

.error-template {
    padding: 40px 15px;
    text-align: center;
}

.problem-stats {
    padding-top: 10px;
}

.problem-stats .problem-stats-item {
    display: inline-block;
    margin-right: 3px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(27, 31, 35, .04);
}

.problem-stats-item.correct-0 {
    background-color: #eeeeee;
}

.problem-stats-item.correct-1 {
    background-color: #dcffe4;
}

.problem-stats-item.correct-2 {
    background-color: #bef5cb;
}

.problem-stats-item.correct-3 {
    background-color: #85e89d;
}

.problem-stats-item.correct-4 {
    background-color: #34d058;
}

.problem-stats-item.correct-5 {
    background-color: #28a745;
}

.problem-stats-item.correct-6 {
    background-color: #22863a;
}

.problem-stats-item.correct-7 {
    background-color: #176f2c;
}

.problem-stats-item.correct-8 {
    background-color: #165c26;
}

.problem-stats-item.correct-9 {
    background-color: #144620;
}

.problem-stats-item.incorrect-0 {
    background-color: #eeeeee;
}

.problem-stats-item.incorrect-1 {
    background-color: #ffdce0;
}

.problem-stats-item.incorrect-2 {
    background-color: #fdaeb7;
}

.problem-stats-item.incorrect-3 {
    background-color: #f97583;
}

.problem-stats-item.incorrect-4 {
    background-color: #ea4a5a;
}

.problem-stats-item.incorrect-5 {
    background-color: #d73a49;
}

.problem-stats-item.incorrect-6 {
    background-color: #cb2431;
}

.problem-stats-item.incorrect-7 {
    background-color: #b31d28;
}

.problem-stats-item.incorrect-8 {
    background-color: #9e1c23;
}

.problem-stats-item.incorrect-9 {
    background-color: #86181d;
}

.problem-stats-item.frozen-0 {
    background-color: #eeeeee;
}

.problem-stats-item.frozen-1 {
    background-color: #dbedff;
}

.problem-stats-item.frozen-2 {
    background-color: #c8e1ff;
}

.problem-stats-item.frozen-3 {
    background-color: #79b8ff;
}

.problem-stats-item.frozen-4 {
    background-color: #2188ff;
}

.problem-stats-item.frozen-5 {
    background-color: #0366d6;
}

.problem-stats-item.frozen-6 {
    background-color: #005cc5;
}

.problem-stats-item.frozen-7 {
    background-color: #044289;
}

.problem-stats-item.frozen-8 {
    background-color: #032f62;
}

.problem-stats-item.frozen-9 {
    background-color: #05264c;
}

.select_readonly {
    background-color: #e9ecef !important;
    opacity: 1;
}

.problem-badge {
    --badge-padding-x: 0.5em;
    font-size: 1em;
    min-width: 2em;
}

h5 .problem-badge {
    font-size: 1rem;
}

h1 .problem-badge {
    font-size: 2rem;
}

.tooltip .tooltip-inner {
    max-width: 500px;
}

blockquote {
    border-left: darkgrey solid .2em;
    padding-left: .5em;
    color: darkgrey;
}

.category-best {
    margin-right: 2em;
    font-weight: normal;
}

.rendered-preview-badge {
    position: relative;
    float: right;
    background-color: Gainsboro;
    padding-left: 6px;
    padding-right: 6px;
    border-radius: 4px;
    font-style: italic;
    font-size: smaller;
}

.right {
    text-align: right;
}

#contesttimer {
    color: DimGray;
    margin-left: auto;
}

.lasttcruns, .lastresult {
    opacity: 0.5;
}

.keybox {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #295d8a;
    font-size: 200%;
    font-weight: bold;
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1000;
}

#keyhelp {
    position: fixed;
    height: 90%;
    width: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(41, 93, 138, 0.9);
    font-size: 150%;
    font-weight: bold;
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1001;
}

#keyhelp code {
    color: white;
    background-color: black;
    padding: 3px;
    border-radius: 5px;
}

.strike-diagonal {
    position: relative;
    text-align: center;
}

.strike-diagonal:before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    right: 0;
    border-top: 2px solid;
    border-color: firebrick;

    -webkit-transform:rotate(-35deg);
    -moz-transform:rotate(-35deg);
    -ms-transform:rotate(-35deg);
    -o-transform:rotate(-35deg);
    transform:rotate(-35deg);
}

.editor {
    width: 100%;
    height: 80vh;
    border: 1px solid grey;
}
