/*
 * Variables
 */
:root {
  --dark-background: #1d1d1d;
  --dark-element: #2d2d2d;

  --short-color: #db2b2a;
  --long-color: #2eab43;
  --hedge-color: #26a69a;

  --positive-text: #55db6b;
  --negative-text: #ee3131;
  --hedge-text: #58ffee;
}

@media (min-width: 768px) {
  html {
    font-size: 20px;
  }
}
@media (min-width: 1450px) {
  html {
    font-size: 22px;
  }
}

/* 
 * Disabling selection of non input elements in the simulator
 * NOTE: This is necessary to prevent select components that can interfere with sliders manipulation
 */
.non-selectable {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

@media (min-width: 450px) {
  h1,
  h2 {
    margin-bottom: 1rem;
  }
}
@media (min-width: 1200px) {
  h1 {
    font-size: 1.9rem;
  }
}
[role='button'] {
  cursor: pointer;
}

@media (max-width: 767px) {
  .hidden-xs {
    display: none !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .hidden-sm {
    display: none !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .hidden-md {
    display: none !important;
  }
}
@media (min-width: 1200px) {
  .hidden-lg {
    display: none !important;
  }
}

#simulation {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  background-color: var(--dark-background);
  padding-top: 2rem;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  box-shadow:
    -0.25rem 0.5rem 0 var(--dark-element),
    0.25rem 0.5rem 0 var(--dark-element);
}

#simulation.fullscreen {
  padding-top: 9rem;
  padding-bottom: 9rem;
}
#simulation-contractStartPrice {
  position: absolute;
  visibility: hidden;
}
.simulation-inputGroup {
  text-align: left;
  padding: 10px;
  width: 100%;
  position: relative;
}

#simulation > .simulation-inputGroup > small {
  margin-top: -0.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  font-style: italic;
}
#simulation-contractUserAmountInAsset {
  width: 100%;
  text-align: left;
  height: 2rem;
  background-color: var(--dark-element);
  color: #ccc;
  border: none;
  font-size: 14px;
}
.sliders-container {
  width: 100%;
  height: 190px;
  display: grid;
  align-items: center;
}
.user-amount-selected-long:focus,
.contract-asset-picker-long:focus {
  border-bottom: 2px solid var(--long-color) !important;
  outline: none;
}
.user-amount-selected-short:focus,
.contract-asset-picker-short:focus {
  border-bottom: 2px solid var(--short-color) !important;
  outline: none;
}
.user-amount-selected-hedge:focus,
.contract-asset-picker-hedge:focus {
  border-bottom: 2px solid var(--hedge-color) !important;
  outline: none;
}
#simulation-contractCounterpartyAmountInAsset,
#simulation-contractUserAmountInAsset {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
#simulation-contractAsset {
  width: 100%;
  height: 2rem;
  background-color: var(--dark-element);
  color: #ccc;
  border: none;
  font-size: 14px;
}
#contract-userLeverage,
#contract-userProtection {
  text-align: left;
  width: 100%;
}
.input-container {
  position: relative;
  width: 100%;
}
.input-container-start-item {
  padding-right: 0px;
}
.input-container-end-item {
  padding-left: 0px;
  position: absolute;
  bottom: 0;
  right: 0;
}
#simulation-outcomeSlider {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 5rem;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 0;
  margin-top: 1rem;
}
#simulation-inputPrice {
  outline: 0;
  cursor: pointer;
}
#simulation-inputPrice::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.5rem;
  outline: 0;
  box-shadow: inset 0 0.05rem 0 rgba(0, 0, 0, 0.13);
  background: linear-gradient(
    90deg,
    #d8989c 0,
    #d8989c calc(50% - (20% / 2)),
    #dede7e calc(50% - (20% / 2)),
    #dede7e 50%,
    #b6e892 50%,
    #b6e892 100%
  );
  border-radius: 1rem;
  border: 0.05rem solid rgba(80, 80, 80, 0.65);
}
#simulation-inputPrice::-moz-range-track {
  width: 100%;
  height: 0.34rem;
  box-shadow: inset 0 0.05rem 0 rgba(0, 0, 0, 0.13);
  background-color: #bec0c4;
  border-radius: 9999rem;
  border: 0.05rem solid rgba(80, 80, 80, 0.65);
}
#simulation-inputPrice::-moz-focus-outer {
  border: 0;
}
#simulation-inputPrice::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  border: none;
  margin-top: -0.3em; /* Centers thumb on the track */
  height: 1.2em;
  width: 1.1em;
  border-radius: 1em;
  background: #ccc;
}
#simulation-inputPrice::-moz-range-thumb {
  border: none;
  height: 1.2em;
  width: 1.1em;
  border-radius: 2em;
  background: #ccc;
}
#simulation-inputPrice {
  box-sizing: content-box;
  width: 80%;
  height: 1.5rem;
  border-top: 2rem solid transparent;
  border-bottom: 2rem solid transparent;
  margin: 0;
  padding: 0;
  background: 0 0;
  z-index: 2;
}
#simulation-inputCeilingPrice,
#simulation-inputFloorPrice {
  display: inline-block;
  width: 10%;
}
#simulation-inputFloorPrice {
  text-align: right;
  padding-right: 5px;
}
#simulation-inputCeilingPrice {
  text-align: left;
  padding-left: 5px;
}
#simulation-25Marker {
  left: 20%;
}
#simulation-50Marker {
  left: 30%;
}
#simulation-75Marker {
  left: 40%;
}
#simulation-125Marker {
  left: 60%;
}
#simulation-150Marker {
  left: 70%;
}
#simulation-175Marker {
  left: 80%;
}
#simulation-startPriceMarker {
  left: calc(50% - 1px);
  height: 20px;
  width: 1px;
  background-color: var(--positive-text);
  font-weight: 700;
}
#simulation-lowLiquidationMarker {
  height: 50%;
  width: 1px;
  z-index: 3;
}
#simulation-highLiquidationMarker {
  height: 50%;
  width: 1px;
  z-index: 3;
}
.maker-bubble {
  background-color: #ccc;
  color: var(--dark-element);
  margin-top: -1.8rem !important;
  border-radius: 0.5rem;
  padding: 0.2rem;
  height: 1.1rem !important;
}
#simulation-settlementMarker {
  opacity: 1;
  margin-left: -1px;
  margin-top: -0.05rem;
  height: 0.85rem;
  width: 2.3px;
  background-color: transparent;
  pointer-events: none;
  z-index: 5;
}
.maker-bubble:before {
  display: block;
  position: absolute;
  content: '';
  top: -0.55rem;
  left: -0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: 0 0;
  border: 0.5rem solid transparent;
  border-bottom: none;
  border-top-width: 0.5rem;
  border-top-color: #ccc;
  top: -0.8rem;
}
.simulation-marker {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: absolute;
  left: 20%;
  height: 20%;
  width: 1px;
  background-color: #ccc;
}
.simulation-marker.minor {
  opacity: 0.42;
}
.simulation-marker > span {
  width: 5rem;
  height: 0.75rem;
  margin-left: -2.5rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 0.65rem;
}
.simulation-marker > span:first-child {
  margin-top: -1.25rem;
}
.simulation-marker > span:last-child {
  margin-bottom: -1.25rem;
}
#bch-logo {
  display: flex;
  position: absolute;
  width: 4.4rem;
  height: 4.4rem;
}
#simulation-outcomes {
  margin-top: 0.5rem;
  width: 100%;
}
#simulation-outcomeVisualizationTotalBch {
  width: 80%;
  overflow: hidden;
  position: relative;
  border: 0.075rem solid #787b7e;
  border-radius: 0.25rem;
  height: 4.5rem;
  background-color: #afb2b7;
  margin-left: 10%;
  margin-right: 10%;
  margin-top: 0.75rem;
}
#simulation-outcomeVisualizationUserBch {
  width: 50%;
  height: 7rem;
  background-color: #c4c6ca;
  box-shadow:
    0.2rem 0 0 rgba(0, 0, 0, 0.13),
    inset -0.2rem 0 0 rgba(255, 255, 255, 0.31);
}
#simulation-outcomeData {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-bottom: 0.5rem;
  color: #fff;
  font-size: 1rem;
  text-shadow:
    0 0 0.09rem #000,
    0.1rem 0.15rem 0 rgba(0, 0, 0, 0.13);
  padding-top: 0.75rem;
}
.simulation-outcome {
  width: 100%;
  text-align: center;
}

.simulation-outcome > em {
  font-weight: 700;
  font-style: italic;
}
.simulation-outcome > small {
  color: orange;
  font-size: 0.66rem !important;
  margin-top: -0.5rem;
  opacity: 0.66;
}
.simulation-outcome > span > span:first-child {
  font-size: 0.9rem !important;
}
.simulation-outcome > span > span:last-child {
  font-size: 0.75rem !important;
  color: grey;
}

.line-separator {
  display: flex;
  align-items: center;

  &:before,
  &:after {
    content: '';
    flex: 1;
    height: 1px;
    margin: 0 1em;
    background: grey;
  }
}

/**
 * Long / Short buttons
 */
.div-position-type-container {
  padding: 0.5em;
  width: 100%;
  cursor: pointer;
}
.short-activated {
  color: var(--short-color);
}
div.short-activated {
  background-color: var(--short-color);
}
.short {
  color: #f5c6cb;
}
.long-activated {
  color: var(--long-color);
}
div.long-activated {
  background-color: var(--long-color);
}
.long {
  color: #c3e6cb;
}
.hedge-activated {
  color: var(--hedge-color);
}
div.hedge-activated {
  background-color: var(--hedge-color);
}
.hedge {
  color: #cce5ff;
}

/**
 * Leverage/Protection Sliders style
 */
.slider-style {
  -webkit-appearance: none;
  cursor: pointer;
  background: 0 0;
  width: 100%;
}
.slider-thumb-style-long::-moz-range-thumb {
  border: none;
  height: 1.2em;
  width: 1.2em;
  border-radius: 2em;
  background: var(--long-color);
}
.slider-thumb-style-long::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  border: none;
  margin-top: -0.45em; /* Centers thumb on the track */
  height: 1.2em;
  width: 1.2em;
  border-radius: 1em;
  background: var(--long-color);
}
.slider-thumb-style-short::-moz-range-thumb {
  border: none;
  height: 1.2em;
  width: 1.2em;
  border-radius: 2em;
  background: var(--short-color);
}
.slider-thumb-style-short::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  border: none;
  margin-top: -0.45em; /* Centers thumb on the track */
  height: 1.2em;
  width: 1.2em;
  border-radius: 1em;
  background: var(--short-color);
}
.slider-thumb-style-hedge::-moz-range-thumb {
  border: none;
  height: 1.2em;
  width: 1.2em;
  border-radius: 2em;
  background: var(--hedge-color);
}
.slider-thumb-style-hedge::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  border: none;
  margin-top: -0.45em; /* Centers thumb on the track */
  height: 1.2em;
  width: 1.2em;
  border-radius: 1em;
  background: var(--hedge-color);
}
