@import "./fonts/fonts.css";

* {
  box-sizing: border-box;
}

header.boca {
  display: block;
  max-height: unset;
  min-height: unset;
  background-color: unset;
  padding: unset;
  margin: 8px;
  line-height: 1.15;
}

header.boca .table {
  max-height: 33px;
  min-height: 33px;
  border: 1px outset #000;
  padding: 2px;
  background-color: white;
  display: flex;
  font-size: 20px;
  gap: 2px;
}

header.boca .block {
  border: 1px inset #000;
  margin: 0;
  background-color: #35a7ff;
  max-height: 28px;
  padding: 0 2px;
  display: flex;
}

header.boca h1 {
  align-items: end;
}

header.boca h1 a {
  font-size: 26px;
}

header.boca h1 sub {
  font-size: 9px;
}

header.boca nav {
  padding: 2px;
  margin-left: 0;
  background-color: unset;
  justify-content: space-around;
}

header.boca nav a {
  padding: 4px;
  color: black;
  font-family: "PT Sans";
  text-transform: unset;
}

header.boca nav button {
  padding: 4px;
  margin: 0;
  background: none;
  border: none;
  font-family: "PT Sans";
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}

header.boca nav button:hover, header.boca nav a:hover {
  border-bottom: 1px solid #555555;
  border-right: 1px solid #555555;
  border-top: 1px solid white;
  border-left: 1px solid white;
  margin: -1px;
}

header .block span {
  margin-right: 4px;
}

#breadcrumb {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}

#breadcrumb a {
  padding: 4px;
}

#scoreboard {
  display: flex;
  flex-flow: column;
  padding: 8px;
}

#scoreboard .score, #scoreboard .penalty, #scoreboard .user {
  border-left: 1px solid #999;
}

.score-row {
  display: flex;
  flex-flow: row;
  height: 56px;
  border: 1px solid #999;
  border-bottom: none;
}

.score-row:last-child {
  border-bottom: 1px solid #999;
}

.score-row.header {
  background: #555;
  color: white;
}

.user {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 16px;
}

main {
  display: flex;
  overflow: auto;
  flex: 1;
}

#statement-submission {
  overflow: auto;
  display: flex;
  flex: 1;
}

#statement {
  flex: 1;
}

#editor {
  flex: 1;
  margin-top: 0;
}

#contest-header {
  padding: 8px;
}

#contest-header h2 {
  margin: 0;
}

#contests, #problems, #contest, #problem {
  display: flex;
  flex-flow: column;
  flex: 1;
  padding: 8px;
}

.contest, .problem {
  background: #fff;
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
  display: flex;
  height: 56px;
  text-decoration: none;
}

.problem-info {
  text-decoration: none;
}

.contest-info {
  padding: 8px;
}

.penalty {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  width: 108px;
}

.score {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  width: 64px;
}

.score .time {
  font-size: 14px;
}

.problem-info {
  display: flex
  flex-flow: column;
  padding: 8px;
}

.problem-info .name {
  flex: 1;
}

.extra {
  font-size: 14px;
  color: #555;
}

form {
  display: flex;
  flex-flow: column;
}

form > * {
  margin: 8px;
}

#login-form {
  max-width: 500px;
}

form > button {
  padding: 4px;
}

#logout-form {
  display: inline;
  padding: 0;
}

header {
  background-color: #35a7ff;
  min-height: 56px;
  max-height: 56px;
  display: flex;
  align-items: center;
  color: white;
  padding: 16px;
}

header a {
  color: white;
  text-decoration: none;
}

nav {
  display: flex;
  padding: 8px;
  margin-left: 16px;
  background-color: #35a7ff;
}

nav a {
  font-family: PT Sans Narrow;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 800;
  color: white;
  padding: 8px;
  font-size: 18px;
}

.span {
  flex: 1;
}

html, body {
  margin: 0;
  display: flex;
  flex-flow: column;
  width: 100%;
  height: 100%;
  font-family: PT Sans;
}

#submission {
  border: 1px solid #ddd;
  display: flex;
  flex-flow: column;
  flex: 1;
}

#submission > label {
  font-size: 14px;
  margin: 8px;
}

#submission > input, #submission > button, #submission > textarea, #submission > select {
  margin: 0 8px 8px 8px;
}

#submission > button {
  margin-top: 8px;
  padding: 4px;
  box-sizing: border-box;
}

.flash-message {
  padding: 8px;
  font-size: 14px;
  box-sizing: border-box;
  height: 36px;
  animation: vanish 5s forwards;
}

.flash-Info {
  border: solid 1px #55f;
  background: #66f;
  color: white;
}

.flash-Error {
  border: solid 1px #f55;
  background: #f66;
  color: white;
}

#title {
  font-size: 20px;
  padding: 16px;
  box-sizing: border-box;
}

#submissions {
  border: 1px solid #ddd;
  padding: 8px;
  font-size: 16px;
  overflow: auto;
  max-width: 260px;
}

#submissions-list {
  padding: 8px 0;
}

.submission {
  padding: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-flow: column;
  cursor: pointer;
  transition: 0.5s all;
}

.submission .uuid {
  font-size: 10px;
  font-family: PT Mono;
  padding-bottom: 8px;
}

.submission .description {
  display: flex;
  height: 18px;
}

.compilation-result {
  white-space: nowrap;
  font-family: PT Mono;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  font-size: 13px;
}

.submission:hover .compilation-result {
  white-space: unset;
}

.lds-hourglass {
  display: inline-flex;
  position: relative;
  width: 0;
  height: 0;
  transform: translate(1px, -3px);
}

.verdict {
  margin-right: 4px;
  width: 24px;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.waiting-judge {
  background: #777;
  color: white;
}

.accepted {
  background: #2DFF0F;
  color: black;
}

.wrong-answer {
  background: #900e00;
  color: white;
}

.runtime-error {
  background: #CA3CFD;
  color: white;
}

.memory-limit {
  background: #AD5A03;
  color: white;
}

.time-limit {
  background: #0064BB;
  color: white;
}

.compilation-error {
  background: #000;
  color: white;
}

.lds-hourglass:before {
  content: " ";
  display: block;
  border-radius: 50%;
  width: 0;
  height: 0;
  margin: 0;
  box-sizing: border-box;
  border: 11px solid #aaa;
  border-color: #aaa transparent #aaa transparent;
  animation: lds-hourglass 1.2s infinite;
}

@keyframes lds-hourglass {
  0% {
    transform: rotate(0);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }
  50% {
    transform: rotate(270deg);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  100% {
    transform: rotate(360deg);
  }
}

table {
  border: 1px solid #ddd;
  border-collapse: collapse;
}

table.boca {
  border-collapse: unset;
}

table.boca .balloon {
  width: 20px;
  margin: -4px 0;
}

table.boca a {
  display: unset;
}

table.boca td {
  padding: 8px;
}

th {
  padding: 8px;
  text-align: left;
}

th.right, td.right {
  text-align: right;
}

tr {
  max-height: 32px;
  min-height: 32px;
}

td {
  max-height: 32px;
  min-height: 32px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 8px;
}

table a {
  display: block;
  max-height: 40px;
  min-height: 40px;
  padding: 8px;
  margin: -8px;
  text-decoration: none;
}

#modal {
  /* Underlay covers entire screen. */
  position: fixed;
  top:0px;
  bottom: 0px;
  left:0px;
  right:0px;
  background-color:rgba(0,0,0,0.5);
  z-index:1000;

  /* Flexbox centers the .modal-content vertically and horizontally */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content: center;
}

.modal-content {
  display: flex;
  flex-flow: column;
}

#modal h4 {
  margin: 0;
}

#modal .source-text {
  flex: 1;
  min-height: 60vh;
}

textarea {
  font-family: PT Mono;
  font-size: 13px;
}

#modal button {
  flex: 1;
}

#modal > .modal-underlay {
  position: absolute;
  z-index: -1;
  top:0px;
  bottom:0px;
  left: 0px;
  right: 0px;
}

#modal > .modal-content {
  /* Sizing for visible dialog */
  width:80%;
  max-width:600px;

  /* Display properties for visible dialog*/
  border:solid 1px #999;
  border-radius:8px;
  box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
  background-color:white;
  padding:20px;
}

.gg-user {
  display: block;
  transform: scale(var(--ggs,1));
  box-sizing: border-box;
  width: 12px;
  height: 18px
}

.gg-user::after,
.gg-user::before {
  content: "";
  display: block;
  box-sizing: border-box;
  position: absolute;
  border: 2px solid
}

.gg-user::before {
  width: 8px;
  height: 8px;
  border-radius: 30px;
  top: 0;
  left: 2px
}

.gg-user::after {
  width: 12px;
  height: 9px;
  border-bottom: 0;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  top: 9px
}


textarea #source-text {
  overflow: hidden;
}

#login-outer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
  flex: 1;
}

#logo {
  margin: 16px;
}

.balloon {
  margin: 2px;
}

.boca-info {
  margin: 8px;
  margin-top: 0;
}

.buttons { display: flex; }
.buttons button { flex: 1; }

form.boca {
  align-self: center;
}

label {
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes vanish {
    90%  {opacity:1; height: 36px; padding: 8px; }
    100%  {opacity:0; height: 0; padding: 0; }
}

#timer {
  flex: 1;
  font-size: 64px;
  font-weight: 500;
  text-align: center;
}

.boca-score {
  font-size: 12px;
  width: 75px;
}

.form-balloon-color {
  height: 44px;
  display: flex;
  flex-flow: row;
  align-self: center;
}

.center {
  text-align: center;
  margin-bottom: 16px;
}

.table-balloon {
  width: 20px;
  margin: -4px 2px;
}

.pending {
  background: #ffe140;
}

.done {
  background: #97ff40;
}
