/**
 * Styles used in FtcBlocksProjects.html, FtcBlocks.html, FtcSounds.html,
 * FtcOfflineBlocksProjects.html, and FtcOfflineBlocks.html
 */

/* Element-level rules  */

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: sans-serif;
  overflow: hidden;
  margin: 0px;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button {
  font-size: small;
  cursor: pointer;
  color: black;
}

button:disabled {
  color: gray;
}

input[type=text], select {
  height: 20px;
}

/* Table layout rules */

.scrolling_table_container {
  height: 200px;
  overflow: auto;
  background: white;
  padding-left: 5px;
  padding-right: 5px;
}

.buttons_td {
  padding: 5px;
}

.blank_td {
  background-color: white;
  padding: 1px;
}

.my_projects_td, .my_files_td {
  color: white;
  padding: 5px;
  font-weight: bold;
}

.header_tr {
  background: #eeeeee;
}

.header_td {
  font-family: sans-serif;
  font-size: small;
  cursor: pointer;
}

.project_row_tr {
  color: white;
  font-weight: bold;
}

.project_row_td {
  padding: 5px;
}

.project_row_checkbox.project_row_checkbox { /* hack: we chain the selector with itself to increase specificity */
  margin: 0 ;
  vertical-align: middle;
}

.project_tr, .file_tr {
  border-bottom: 1pt solid white;
}

/* Main Blocks project layout rules (uses flexbox) */

.horizontal_area {
  display: flex;
  flex-direction: row;
  background-color: white;
}

.vertical_area {
  display: flex;
  flex-direction: column;
  background-color: white;
}

.fill_area {
  flex-grow: 4;
}

.parent_area {
  margin: 2px;
}

.no_min_height {
  min-height:0;
}

.no_min_width {
  min-width: 0;
}

.content_border {
  border: 1px solid #909090; /* Same color as gutter */
}

.banner {
  display: flex;
  width: 100%;
  background: slategrey;
  padding: 5px;
  margin-bottom: 2px;
  align-items: center;
  justify-content: center;
}

.banner_text {
  color: white;
  margin-right: 10px;
  font-size: 1.7rem;
}

/* Modal dialog rules */

.modal_dialog {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.1);
}

.modal_dialog_container {
  position: absolute;
  top: 40%;
  width: 100%;
  text-align: center;
}

.modal_dialog_content {
  display: inline-block;
  text-align: left;
  padding: 16px;
  border: 3px solid #000;
  background-color: #fefefe;
}

body.waitCursor *{
  cursor: wait !important;
}

/* Text formatting rules */

a.help {
  color: white;
}

#saveSuccess {
  color: #ffffff;
}

#saveFailure {
  color: #ffffff;
  padding: 0px 10px 0px 10px;
  background-color: #f0ad4e;
  border: 1px solid transparent;
  border-radius: 4px;
}

.error_message {
  color: red;
}

.project_name, .file_name {
  font-family: sans-serif;
  font-weight: bold;
  cursor: pointer;
}

.invalid_project_name {
  font-family: sans-serif;
  font-weight: bold;
  cursor: not-allowed;
  position: relative;
  display: inline-block;
}

.invalid_project_name .tooltiptext {
  visibility: hidden;
  width: 250px;
  background-color: LemonChiffon;
  color: Black;
  text-align: left;
  border: 2px solid Sienna;
  border-radius: 6px;
  padding: 5px 5px;

  /* Position the tooltip */
  position: absolute;
  z-index: 1;
  top: -7px;
  left: 100%;
}

.invalid_project_name .tooltiptext::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent Sienna transparent transparent;
}

.invalid_project_name:hover .tooltiptext {
  visibility: visible;
}

.not_bold {
  font-weight: normal;
}

/* Java pane rules */

#javaCodeHeading {
  padding-left: 4px;
  font-weight: bold;
  color: white;
}

#javaContentContainer {
  overflow:auto;
  margin-top: 2px;
  padding: 2px 4px;
}

#javaContent {
  display: block;
  overflow: visible;
  padding:0;
  border: none;
  background-color: white;
  color: black;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  page-break-inside: avoid;
  white-space: pre;
  word-break: break-all;
  word-wrap: break-word;
}

/* CSS overrides for third-party libraries */

svg.blocklyWsDragSurface {
  overflow: visible;
}

/* Add border between toolbox and Blocks program */
.blocklyToolboxDiv {
  border-right: 1px solid #909090; /* Same color as content_border */
}

/* split.js gutter style */
.gutter.gutter-horizontal {
  cursor: col-resize;
  background-color: #909090; /* Same color as content_border */
  margin: 0 2px;
}
