/*****************
 * General styles
 *****************/

body {
  overflow-y: scroll;
}

canvas {
    border: 1px solid #aaa;
}

#qbody form {
    margin-top: 20px;
}

line.axis {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}

.axis path,
.axis line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}

.grid path,
.grid line {
    fill: none;
    stroke: #ddd;
    shape-rendering: crispEdges;
}

.bar {
    stroke: #46b8da;
    fill: #5bc0de;
}

.outlineBar {
    stroke: #fff;
    fill: #5bc0de;
}

.outlineBarRed {
    stroke: #fff;
    fill: #FF0000;
}

.parallelHistMean {
    stroke: #000;
    stroke-width: 3px;
}

.statsPlot .label {
    font-size: 14px;
    font-weight: normal;
    fill: black;
}

.statsPlot .fitLine {
    stroke: #00b;
}

body table.no-border td {
    border: 0px;
}

body table.no-border th {
    border: 0px;
}

.statsPlot .point {
    stroke: #d43f3a;
    fill: #d9534f;
}

table.two-column-description tr th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 5%;
}

table.two-column-description-no-header tr td:first-of-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 5%;
}

table.two-column-description-no-header-with-help tr td:first-of-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 5%;
}

table.two-column-description-no-header-with-help tr td:last-of-type {
    width: 1%;
}

.table-no-wrap th {
    white-space: nowrap;
}

.table-no-wrap td {
    white-space: nowrap;
}

pre {
    overflow-wrap: normal;
}

/**************
 * Submissions
 **************/

/* General-purpose show/hide button with animation */
.show-hide-btn {
  cursor: pointer;
}

.show-hide-btn .expand-icon {
  transition: transform 400ms;
}

.show-hide-btn.collapsed .expand-icon {
  transform: rotateX(180deg);
}

/* Button in submission header context
   prepends "hide" or "show" automatically */
.submission-header {
  cursor: pointer;
}

.submission-header .expand-icon {
  transition: transform 400ms;
}

.submission-header .expand-icon-container::before {
  content: "hide";
}

.submission-header.collapsed .expand-icon {
  transform: rotateX(180deg);
}

.submission-header.collapsed .expand-icon-container::before {
  content: "show";
}

/***************************************
 * Additions for Bootstrap 4 conversion
 ***************************************/

.card > table, .card > .table-responsive > table {
  margin-bottom: 0;
}

.btn.btn-xs {
  padding: 1px 5px;
  font-size: 0.7rem;
}

a.badge {
  text-decoration: none;
}

.navbar, #course-nav {
    align-items: baseline;
}

.no-select {
    user-select: none;
}

/*****************
 * Brand label ("PrairieLearn" text)
 *****************/
.navbar-brand {
  position: relative;
}

.navbar-brand-label, .navbar-brand-hover-label {
  display: inline-block;
  transition: all 0.3s ease-out;
}

.navbar-brand-hover-label {
  opacity: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 0.8rem;
  transform: translate(0px, -3px);
}

.navbar-brand:hover .navbar-brand-label{
  transform: translate(0px, -7px);
}

.navbar-brand:hover .navbar-brand-hover-label {
  opacity: 1;
  transform: translate(0px, 0px);
}

/* Supports a color accent at the tops of nav tabs, github-style */
.nav-tabs.pl-nav-tabs-bar .nav-link.active {
    border-top-color: var(--primary);
    border-top-width: 0.2rem;
    padding-top: 0.4rem;
}

/* Used to help vertically center badges in table cells */
table td > .badge {
  transform: translate(0, -12.5%);
}

/* Used to give table rows the same padding as Bootstrap card headers */
.card > table tr td:first-child,
.card > table tr th:first-child,
.card > .table-responsive > table tr td:first-child,
.card > .table-responsive > table tr th:first-child {
    padding-left: 1.25rem;
}
.card > table tr td:last-child,
.card > table tr th:last-child,
.card > .table-responsive > table tr td:last-child,
.card > .table-responsive > table tr th:last-child {
    padding-right: 1.25rem;
}

/* Custom button styles that look better in input groups */
.btn.btn-med-light {
  color: #212529;
  background-color: #dbdcdc;
}

.btn.btn-med-light:hover {
  background-color: #ced0d0;
}

.btn.btn-med-light:focus {
  background-color: #c3c3c3;
  box-shadow: 0 0 0 0.2rem rgba(195,195,195,.25)
}

.user-output, .user-output-invalid {
    display: inline;
    font-size: 14px;
    white-space: pre;
    color: #444;
    background: #F0F0F0;

    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 2px;
    padding-right: 2px;

    border-radius: 2px;
    border-color: #ccc;
    border-width: 1px;
    border-style: solid;

    line-height: 28px;
}

.user-output-invalid {
    color: #dc3545;
}

.user-output.small, .user-output-invalid.small, small .user-output, small .user-output-invalid {
    font-size: 11px;
    line-height: 25px;
}

.badge-invalid {
    border-style: solid;
    border-width: 1.5px;
    border-color: #dc3545;
    margin-left: 5px;
    background: #fff;
}

.badge-missing-input {
    border-style: solid;
    border-width: 2px;
    border-color: #6c757d;
    margin-left: 5px;
    background: #fff;
}
