/******************************* CUSTOM PROPERTIES *****************************/
:root {
	--header-color: #fff;
	--header-bg-color: #2d545e;
	--chart-line-color: #4d6a90;
	--chart-bg-color: #eff6f8;
	--slider-color: LightGray;
	--button-bg-color: skyblue;
	--focus-color: dodgerblue;
	--button-option-off: #f5f5f5;
	--button-on: skyblue;
	--button-off: gainsboro;
	--draggable-fill-color: powderblue;
	--simulation-color: #FFFCEF;
	--hover-color: #5BC0EB;
	--control-border-color: #7393B3;
	--chart-top: 30px;
	--chart-right: 80px;
	--chart-bottom: 70px;
	--chart-left: 45px;
	--hotspot-size: 24px;
}

/******************************** HELP OVERLAYS ********************************/

#distribution-overlay, #network-overlay {
	position: fixed;
	display: none;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0,0.5);
	z-index: 2;
	cursor: pointer;
}

#dhelp, #networkhelp {
	width: 100%;
	height: 100%;
}

svg text.helplabel {
	fill: white;
	font-size: 15;
}

svg rect.helprect, svg line.helpline, svg polygon.helppolygon {
	fill: rgba(1,1,1,0.4);
	stroke: white;
}

svg line.helpline {
	stroke-width: 2px;
}

svg text.helptext {
	font-size: 0.9375rem;
	dominant-baseline: middle;
	fill: white;
	font-weight: 500;
}

/********************************** NAVBAR ***********************************/

.navbar {
    background-color: var(--header-bg-color);
	padding-top: 0px;
	padding-bottom: 0px;
}

.navbar-brand {
	font-family: 'Arial', sans-serif;
	font-weight: 600;
	margin-right: 0.25rem;
}

nav .navbar-nav li a {
	color: var(--header-color) !important;
	font-weight: 500;
	border-bottom: 5px solid var(--header-bg-color);
	}

.navbar-nav > li > a:hover {
	background-color: var(--hover-color);
	border-bottom: 5px solid var(--hover-color);
}

.navbar-nav > li > a.active { 
	border-bottom: 5px solid var(--hover-color); 
}

a.navbar-brand:hover {
	outline: var(--header-color) solid 2px;
}

.dropdown-item:focus {
	outline: var(--focus-color) solid 2px;
}

/********************************** LISTS ***********************************/

ul {
	list-style-type: square;
	margin-bottom: 0.5rem;
}

/* Sticky footer styles -------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}
body {
    margin-bottom: 120px; /* Margin bottom by footer height */
}
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 121px; /* Set the fixed height of the footer here */
    line-height: 40px; /* Vertically center the text here */
    color: var(--header-color);
    background-color: var(--header-bg-color);
}

@media screen and (min-width: 440px) {
	.footer {
		height: 81px;
	}
	body {
		margin-bottom: 80px;
	}
}

@media screen and (min-width: 768px) {
	.footer {
		height: 41px;
	}
	body {
		margin-bottom: 40px;
	}
}

/********************************** HEADINGS **********************************/

#charttext, #chart2text {
	text-align: center;
}

#currentValues, #relatedValues {
	text-align: center;
	margin: 0px;
	min-height: 33px;
}

#currentValues.disabled > input {
	pointer-events: none;
	opacity: 0.6;
}

#relatedDescription, #related {
	color: black;
}

h1 {
	margin-top: 10px;
}

h1.header {
	margin: 0px;
	padding-top: 0.3125rem;
	padding-bottom: 0.3125rem;
	color: #fff;
	font-family: 'Arial', sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	vertical-align: middle;
}

h2.title {
	margin-top: 20px;
	text-align: center;
	font-size: 1.25rem;
}

#description, #relatedExplanation {
	margin-top: 10px;
}

.related {
	display: none;
}

p.heading {
	font-size: 1rem;
	font-weight: 500;
	padding: 6px 4px;
	margin-bottom: 4px;
	margin-top: 1rem;
	background-color: gainsboro;
}

h4 {
	font-size: 1.125rem;
}

/*********************************** TEXT ***********************************/

a.help {
	border-bottom: 1px dotted;
	color: black;
	text-decoration: none;
}

a.help:hover {
	text-decoration: none;
}

a.link {
	text-decoration: none;
}

a.link:hover {
	text-decoration: none;
	padding-bottom: 1px;
	border-bottom: 1px solid blue;
}

a.link:focus, a.help:focus {
	outline: var(--focus-color) solid 2px;
	border-color: var(--chart-bg-color);
	border-radius: 2px;
}

/*********************************** FORMS ***********************************/

input {
	background-color: var(--chart-bg-color);
	border-width: 2px;
	border-style: solid;
	border-color: silver;
	border-color: var(--control-border-color);;
}

input.integer {
	width: 3em;
}

input.decimal {
	width: 5em;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type=number]:focus {
	outline: var(--focus-color) solid 2px;
	border-color: var(--chart-bg-color);
	border-radius: 2px;
}

input[type=number]:hover {
	border-width: 3px;
}

/* Firefox */
input[type=number] {
	-moz-appearance: textfield;
}

form.disabled {
	opacity: 0.5;
	pointer-events: none;
}

/*********************************** TABLES ***********************************/

#examples {
	margin-top: 1rem;
}

#examples tr.example  {
	cursor: pointer;
}

#examples tr.example:focus  {
	outline: var(--focus-color) solid 2px;
}

#parameters {
	margin-bottom: 0;
}

.table td {
	vertical-align: middle;
}

thead.my-table {
	background-color: gainsboro;
}

th {
	font-weight: 500;
}

/*********************************** IMAGES ***********************************/

span.formula {
	font-size: 1rem;
	font-weight: 500;
}

#visualization, #visualization2 {
	width: 98%;
	height: auto;
	aspect-ratio: 3/2;
	min-height: 300px;
	max-height: 360px;
	background-color: var(--simulation-color);
	border: 2px solid cadetblue;
	margin-left: auto;
	margin-right: auto;
	pointer-events: none;
}

#chart1svg, #chart2svg {
	width: 100%;
	height: auto;
	aspect-ratio: 3/2;
	min-height: 330px;
	max-height: 400px;
}

/*********************************** MATHML ***********************************/

math {
	font-weight: 500;
	font-size: 1.125rem;
}

math.support {
	float: right;
	font-size: 1rem;
}

/*********************************** BUTTONS **********************************/

#current {
	text-align: right;
}

.dropdown {
	margin-top: 10px;
}

#options {
	width: 100%;
	margin-top: 10px;
}

.btn-group-options {
	width: 50%;
	margin-top: 0px;
	margin-bottom: 10px;
}

.btn-toolbar {
	margin-top: 5px;
	margin-bottom: 10px;
	width: 100%;
}

.btn {
	white-space:normal !important;
	text-align: left;
}

button p {
	margin: 0px;
}

/*----------------------------- View controls -------------------------------*/

#pdfOption, #cdfOption, #survivalOption, #hazardOption, #visualizeOption, #simulateOption { 
	margin: 0px 2px;
	text-align: center;
	padding: 8px 4px;
}

/*-------------------------- Simulation controls ----------------------------*/

#restartSimulation, #stepSimulation, #playSimulation, #fastSimulation {
	margin-top: 0px;
	padding-left: 10px;
	padding-right: 10px;
}

#simulationOptions {
	margin-top: 24px;
}

.video-group {
	width: 100%;
	margin-top: 0px;
	margin-bottom: 10px;
}

.video-btn {
	background-color: var(--button-off);
	border: var(--button-on) solid 1px;
}

.video-btn.active, .video-btn:hover {
	font-weight: 600;
	background-color: var(--button-on);
}

.video-btn.active:disabled {
	font-weight: 400;
	background-color: var(--button-off);
}

/*----------------------------- Axis controls -------------------------------*/

input[type="radio"]+label {
	margin: 1px;
	text-align: center;
	padding: 4px 0px;
	background-color: var(--button-off);
	outline: var(--button-on) solid 1px;
}

input[type="radio"]:checked+label, input[type="radio"]:hover+label {
	font-weight: 600;
	background-color: var(--button-on);
}

input[type="radio"]:focus+label {
	outline: var(--focus-color) solid 2px;
}

input[type="radio"]:disabled+label {
	font-weight: 400;
	background-color: var(--button-off);
	outline-color: var(--button-off);
	color: #000000;
}

#xAxisOptions, #xAxisOptions2 {
	padding-right: 4px;
}

#yAxisOptions, #yAxisOptions2 {
	padding-left: 4px;
}

.menu-btn {
	background-color: gainsboro;
}

.menu-btn.active {
	font-weight: 600;
	outline-color: skyblue;
	outline-width: 1px;
	outline-style: solid;
	background-color: var(--button-bg-color);
}

.menu-btn:hover {
	background-color: skyblue;
	font-weight: 600;
}

.proof-btn {
	background-color: white;
	outline-color: skyblue;
	outline-width: 2px;
	outline-style: solid;
	margin-top: 8px;
}

.proof-btn:hover {
	background-color: var(--button-bg-color);
}

.btn:focus  {
	outline: var(--focus-color) solid 2px;
}

#current:hover, #related:hover {
	background-color: var(--hover-color);
}

.proof-btn {
	margin-right: 4px;
	margin-left: 4px;
	width: calc(100% - 8px);
}

/************************************ ICONS ***********************************/

img.icon {
	margin: 0px 12px;
}

img.icon:hover {
	opacity: 50%;
}

/******************************** MODAL WINDOW ********************************/

.modal-header, .modal-footer {
	background-color: #d6e6f6;
}

/******************************** POPOVERS ********************************/

[x-arrow] {
	position: absolute;
}

.popover {
	margin: 8px;
	font-size: 0.875rem;
	padding: 2px 5px;
}

.popover[x-placement^="bottom"] [x-arrow] {
	top: -8px;
	border-bottom: 8px solid white;
	border-right: 8px solid transparent;
	border-left: 8px solid transparent;
}

.popover[x-placement^="top"] [x-arrow] {
	bottom: -8px;
	border-top: 8px solid white;
	border-right: 8px solid transparent;
	border-left: 8px solid transparent;
}

.popover[x-placement^="left"] [x-arrow] {
	right: -8px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 8px solid white;
}

.popover[x-placement^="right"] [x-arrow] {
	left: -8px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-right: 8px solid white;
}

/******************************** SVG ELEMENTS ********************************/

#chartgroup, #chartgroup2 {
	user-select: none;
}
svg rect.chartarea {
	fill: var(--chart-bg-color);
}
#chartarea1 {
	touch-action: none;
}
#chartarea1:hover  {
	stroke: var(--control-border-color);
	stroke-width: 2;
}
#chartarea1:focus  {
	stroke: var(--focus-color);
	stroke-width: 2;
}
svg g.disabled {
	opacity: 0.5;
	pointer-events: none;
}
svg .simulation {
	/* Drag and zoom events get passed through to the chart */
	pointer-events: none;
}

/*--------------------------------- Line ------------------------------------*/
svg line.dataline {
	stroke: var(--chart-line-color);
	stroke-width: 2.5;
	/* Drag and zoom events get passed through to the chart */
	pointer-events: none;
}
svg line.overlay {
	stroke: red;
	stroke-width: 2.5;
	opacity: 0.5;
	/* Drag and zoom events get passed through to the chart */
	pointer-events: none;
}
svg line.quartile {
	stroke: lightgray;
	stroke-width: 1.5;
	/* Drag and zoom events get passed through to the chart */
	pointer-events: none;
}
svg line.histogram {
	stroke: var(--chart-line-color);
	/* Drag and zoom events get passed through to the chart */
	pointer-events: none;
}
svg line.simulation {
	stroke-width: 1;
}
svg line.event, line.sample, line.labelevent {
	stroke: black;
}
svg line.arrow, #arrowhead {
	stroke: dimgray;
}
svg line.success {
	stroke: green;
}
svg line.failure {
	stroke: grey;
	opacity: 0.3;
}
svg line.statistic {
	stroke: dodgerblue;
	stroke-width: 3;
}
svg line.dashed {
	stroke-dasharray: 2;
	stroke: gray;
}

/*--------------------------------- Rect -----------------------------------*/
svg rect.background {
	fill: var(--simulation-color);
	stroke: cadetblue;
	stroke-width: 3px;
	pointer-events: auto;
}
svg rect.simulation {
	fill: var(--simulation-color);
	stroke: var(--chart-bg-color);
	stroke-width: 3px;
	pointer-events: none;
}
svg rect.box {
	fill: white;
	stroke: black;
}

/*-------------------------------- Circle -----------------------------------*/
svg circle.simulation {
	fill: red;
	stroke: red;
}
svg circle.circle {
	stroke: black;
}
svg rect.label {
	fill: white;
}
svg circle.dataline {
	stroke: var(--chart-line-color);
	fill: var(--chart-line-color);
}
svg circle.right {
	fill: var(--chart-bg-color);
	fill-opacity: 1;
}
svg circle.overlay {
	stroke-width: 1;
	stroke: red;
	opacity: 0.7;
}
svg circle.overlay.left {
	fill: red;
}
svg circle.overlay.cap {
	stroke-width: 1.5;
	fill: white;
	opacity: 0.8;
}

/*--------------------------------- Text ------------------------------------*/
svg text.label, text.box {
	font-size: 14px;
}
svg text.simulation {
	dominant-baseline: middle;
}
svg text.sample {
	font-size: 0.625rem;
	dominant-baseline: middle;
}
svg text.sample1 {
	fill: red;
}
svg text.sample2 {
	fill: blueviolet;
}
svg text.labelsample {
	fill: black;
}
svg text.result {
	fill: var(--chart-line-color);
	font-size: 13px;
	opacity: 0.5;
}
svg text.intercept {
	fill: dodgerblue;
	font: bold;
	dominant-baseline: middle;
}

/*--------------------------------- Path ------------------------------------*/
svg path.dataline {
	stroke: var(--chart-line-color);
	stroke-width: 2.5;
	fill-opacity: 0;
	/* Drag and zoom events get passed through to the chart */
	pointer-events: none;
}
svg path.dataline.filled {
	stroke-width: 1.5;
	fill: url(#chartGradient);
	fill-opacity: 0.5;
}
svg path.dataline.filled.fixed {
	fill: url(#chartGradientFixed);
}
svg path.overlay {
	stroke: red;
	stroke-width: 1.5;
	stroke-dasharray: 4;
	fill-opacity: 0;
}
svg path.simulation {
	stroke: var(--chart-line-color);
	stroke-width: 1;
	fill: url(#chartGradient);
}
.stop1 {
	stop-color: LightGray;
	stop-color: LightBlue;
	stop-color: Azure;
	stop-color: #E0EEFF;
}
.stop2 {
	stop-color: DarkGray;
	stop-color: var(--button-bg-color);
}
.stop1fixed {
	stop-color: LightGray;
	stop-color: #E5E4E2;
	stop-color: #E0EEFF;
}
.stop2fixed {
	stop-color: DarkGray;
	stop-color: Silver;
	stop-color: var(--button-bg-color);
}

/*------------------- Mean/variance and parameter controls ------------------*/

svg rect.dragarea, rect.fixed, rect.draggable, rect.variancebox {
	height: var(--hotspot-size);
}
svg rect.dragarea {
	width: var(--hotspot-size);
}
svg rect.fixed, rect.draggable {
	width: 8px;
}
.fixed, .variancebox {
	stroke: gray;
	stroke-width: 1;
	fill: var(--chart-bg-color);
}
.draggable {
	cursor: ew-resize;
	stroke: var(--chart-line-color);
	stroke-width: 2;
	fill: var(--draggable-fill-color);
}
.draggable:hover {
	stroke-width: 4;
}
svg line.slider {
	stroke: var(--slider-color);
	stroke-width: 4;
}
svg rect.slider  {
	height: var(--hotspot-size);
	stroke: var(--chart-line-color);
	stroke-width: 2;
	fill: var(--draggable-fill-color);
	cursor: ns-resize;
	touch-action: none;
}
svg rect.slider:hover  {
	stroke-width: 4;
}
svg rect.slider:focus, .draggable:focus  {
	outline: var(--focus-color) solid 2px;
	stroke: var(--focus-color);
	stroke-width: 2;
}
svg text.slider {
	font-size: 11px;
	font-size: 0.6875rem;
	pointer-events: none;
	text-anchor: middle;
	dominant-baseline: middle;
}
svg text.chartlabel {
	font-size: 0.875rem;
}
foreignObject p {
	font-size: 0.875rem;
	padding: 0px;
	margin: 0px;
	text-align: center;
}
foreignObject.slider {
	width: 24px;
	height: 20px;
}
