/*
 * Copyright 2018 The CodeWorld Authors. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html { height: 100%; width: 100%; }

/* Avoid setting height on body since sweetAlert2 overrides it to `auto` while
 * the dialog is open. */
body {
  margin: 0;
}

.root {
  flex-grow: 1;
  align-items: stretch;
  -webkit-align-items: stretch;
  -ms-align-items: stretch;
  height: 100vh;
  background-color: #e5eff9;
  display: flex;
  display: -webkit-flex;
  display: -ms-flex;
  flex-direction: column;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  overflow: hidden;
}

.ui-layout-container {
  flex: 1 1 auto;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  padding-bottom: 5px;
}

#toolbar {
  display: flex;
  display: -webkit-flex;
  display: -ms-flex;
  align-items: stretch;
  -webkit-align-items: stretch;
  -ms-align-items: stretch;
  flex-direction: row;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex: 0 0 auto;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
}

#toolbar > div {
  align-items: stretch;
  -webkit-align-items: stretch;
  -ms-align-items: stretch;
  display: flex;
  display: -webkit-flex;
  display: -ms-flex;
  flex: 0 1 auto;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex-flow: row wrap;
  -webkit-flex-flow: row wrap;
  -ms-flex-flow: row wrap;
}

#toolbar > span {
  flex: 1 1 auto;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
}

#nav {
  display: flex;
  display: -webkit-flex;
  display: -ms-flex;
  align-items: stretch;
  -webkit-align-items: stretch;
  -ms-align-items: stretch;
  flex-direction: column;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;

  overflow-y: auto;
  padding-bottom: 3px;
}

.nav_items {
  flex: 0 0 auto;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  display: flex;
  display: -webkit-flex;
  display: -ms-flex;
  align-items: stretch;
  -webkit-align-items: stretch;
  -ms-align-items: stretch;
  flex-direction: column;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;

  margin: 0px;
}

#keyboard-shortcuts {
  text-align: center;
  height: 50vh;
  overflow: auto;
}

#keyboard-shortcuts table {
  border-collapse: collapse;
  display: inline-block;
}

#keyboard-shortcuts table tbody tr td {
  border: 1px solid black;
  padding: 4px;
}

#source {
  position: relative;
}

#source .CodeMirror {
  position:absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto;
  height: auto;
}

#result {
  display: flex;
  display: -webkit-flex;
  display: -ms-flex;
  align-items: stretch;
  -webkit-align-items: stretch;
  -ms-align-items: stretch;
  flex-direction: column;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;

  margin: 0px;
  overflow-y: auto;
}

#runner {
  flex: 0 0 auto;
  -webkit-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  width: calc(100% - 6px);
}

#message {
  flex: 1 1 20px;
  -webkit-flex: 1 1 20px;
  -ms-flex: 1 1 20px;

  overflow: auto;
  font-size: 11px;
  padding: 5px;
}

#message.error {
  background-color: #fcc;
}

#message a {
  cursor: pointer;
}

.cw-button {
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  font-family: arial, helvetica, sans-serif;
  margin: 3px 3px 0px 3px;
  padding: 6px 6px 6px 6px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  color: white;
  white-space: nowrap;
  overflow: hidden;
}

#toolbar .cw-button {
  margin-bottom: 3px;
  margin-top: 0px;
}

.cw-button * {
  vertical-align: middle;
}

.cw-button.yellow,
.cw-button.yellow:hover:active,
.cw-button.green.project-active,
.cw-button.green.project-active:hover:active {
  background-color: hsl(60, 75%, 35%);
}

.haskell .cw-button.yellow,
.haskell .cw-button.yellow:hover:active,
.haskell .cw-button.green.project-active,
.haskell .cw-button.green.project-active:hover:active {
  background-color: hsl(180, 75%, 35%);
}

.cw-button.yellow:hover,
.cw-button.green.project-active:hover {
  background-color: hsl(60, 75%, 25%);
}

.haskell .cw-button.yellow:hover,
.haskell .cw-button.green.project-active:hover {
  background-color: hsl(180, 75%, 25%);
}

.cw-button.green,
.cw-button.green:hover:active {
  background-color: hsl(130, 75%, 35%);
}

.haskell .cw-button.green,
.haskell .cw-button.green:hover:active {
  background-color: hsl(210, 75%, 35%);
}

.cw-button.green:hover {
  background-color: hsl(130, 75%, 25%);
}

.haskell .cw-button.green:hover {
  background-color: hsl(210, 75%, 25%);
}

.cw-button.blue,.cw-button.blue:hover:active {
  background-color: hsl(220, 75%, 35%);
}

.haskell .cw-button.blue,.cw-button.blue:hover:active {
  background-color: hsl(135, 75%, 35%);
}

.cw-button.blue:hover {
  background-color: hsl(220, 75%, 25%);
}

.haskell .cw-button.blue:hover {
  background-color: hsl(135, 75%, 25%);
}

.cw-button.red,.cw-button.red:hover:active {
  background-color: hsl(10, 75%, 35%);
}

.haskell .cw-button.red,.cw-button.red:hover:active {
  background-color: hsl(60, 75%, 35%);
}

.cw-button.red:hover {
  background-color: hsl(10, 75%, 25%);
}

.haskell .cw-button.red:hover {
  background-color: hsl(60, 75%, 25%);
}

.cw-button.cyan,.cw-button.cyan:hover:active {
    background-color: hsl(180, 75%, 35%);
}

.haskell .cw-button.cyan,.cw-button.cyan:hover:active {
    background-color: hsl(300, 50%, 35%);
}

.cw-button.cyan:hover {
    background-color: hsl(180, 75%, 25%);
}

.haskell .cw-button.cyan:hover {
    background-color: hsl(300, 50%, 25%);
}

.cw-button:focus { outline: none; }
::-moz-focus-inner { border:0; }

.loader {
    border: 3px solid #ffffff55;
    border-top: 3px solid #ffffffee;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    animation: spin 1.5s linear infinite;
}

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

.dropbox {
  background-color: white;
  border: solid #cccccc 1px;
  box-shadow: 1px 1px 2px #000;
  box-sizing: border-box;
  margin: 2px 4px 4px 2px;
}

.sweet-alert.helpdoc {
  max-width: 70em;
  width: 80vw;
  height: 90vh;
  margin: 0px 0px 0px 0px !important;
  padding: 10px 15px 15px 10px !important;
  position: fixed;
  top: 3vh;
  left: 10vw;
}

.sweet-alert.helpdoc div { display: none; }
.sweet-alert.helpdoc fieldset { display: none; }
.sweet-alert.helpdoc h2 { display: none; }
.sweet-alert.helpdoc p {
  display: block;
  margin: 0px 0px 0px 0px;
  padding: 0px 0px 0px 0px;
  height: 100%;
}

.ui-layout-resizer-dragging {
  background-color: #444444;
  cursor: ew-resize !important;
}

.ui-layout-resizer-east-open:hover,
.ui-layout-resizer-west-open:hover {
  cursor: ew-resize !important;
}

.ui-layout-toggler-east,
.ui-layout-toggler-west {
  background-color: #444444;
  opacity: 1.0;
  cursor: pointer !important;
}

#recordIcon {
  color: #B30000;
  animation: record-blink 1s cubic-bezier(.5, 0, 1, 1) infinite alternate;
}

@keyframes record-blink {
  from { opacity: 1; }
  to { opacity: 0; }
}

.swal2-popup {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.req-list {
  text-align: left;
}
.req-yes {
  color: darkgreen;
  list-style-type: none;
}
.req-yes:before {
  content: "✓ ";
}
.req-no {
  color: darkred;
  list-style-type: none;
}
.req-no:before {
  content: "✗ ";
}
.req-indet {
  color: darkmagenta;
  list-style-type: none;
}
.req-indet:before {
  content: "? ";
  font-weight: bold;
}
.req-yes,
.req-no,
.req-indet {
  margin-bottom: 10px;
}
.req-yes:before,
.req-no:before,
.req-indet:before {
  margin-left: -36px;
  font-size: 32px;
  vertical-align: middle;
}
.req-details {
  color: #555;
}
