/*** Injectable Estradiol Simulator by Aly @ Transfeminine Science (transfemscience.org) ***/
/*** Copyright of Transfeminine Science and all rights reserved (please don't reproduce) ***/

/* Light mode */
:root {
  --background-color: rgb(255, 255, 255);
  --font-color: rgb(92, 89, 98);
  --heading-color: rgb(39, 38, 43);
  --link-color: rgb(129, 83, 237);
  --graph-html-legend-item-hover-background-color: rgb(245, 245, 245);
  --about-section-font-color: rgb(128, 128, 128);

  --selection-background-color: rgb(191, 168, 246);
  --selection-font-color: rgb(255, 255, 255);

  --input-font-color: rgb(39, 38, 43);
  --input-background-color: rgb(255, 255, 255);
  --input-border-color: rgb(133, 133, 133);
  --input-border-width: 1px;
  --input-outline-color: rgb(0, 0, 0);
  --toggle-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' viewBox='0 0 119 276'%3E%3Cpath fill='%232b2627' d='M59.852,275.583L119,172.325,0,172.731Z' /%3E%3Cpath fill='%232b2627' d='M59.852,1.417L119,104.675,0,104.269Z' /%3E%3C/svg%3E"); /* Original: <svg class="toggle-button-icon-svg" xmlns="http://www.w3.org/2000/svg" width="4.2" height="9.75" viewBox="0 0 119 276"><path d="M59.852,275.583L119,172.325,0,172.731Z" /><path d="M59.852,1.417L119,104.675,0,104.269Z" /></svg> */  
  --button-background-color: rgb(239, 239, 239);
  --button-font-color: rgb(68, 68, 68);
  --button-border-color: rgb(133, 133, 133);
  --button-disabled-background-color: rgb(247, 247, 247);
  --button-disabled-font-color: rgb(200, 200, 200);
  --button-disabled-border-color: rgb(205, 205, 205);
  --about-hide-button-background-color: rgb(240, 240, 240);
  --about-hide-button-border-color: rgb(192, 192, 192);

  --tooltip-background-color: rgb(85, 85, 85);
  --tooltip-font-color: rgb(255, 255, 255);
  --tooltip-border-color: rgb(85, 85, 85) transparent transparent transparent;
  --context-menu-item-background-color: rgb(255, 255, 255);
  --context-menu-item-background-color-hover: rgb(232, 232, 233);
  --context-menu-item-font-color: rgb(32, 33, 36);  
  --context-menu-border-color: rgb(227, 228, 231);
  --context-menu-dividing-lines-color: rgb(227, 228, 231);

  --scrollbar-thumb-color: rgb(191, 191, 191);
  --scrollbar-thumb-color-hover: rgb(163, 163, 163);

  --graph-font-color: rgb(39, 38, 43);
  --graph-axis-label-color: rgb(92, 89, 98);
  --graph-axis-tick-color: rgb(92, 89, 98);
  --graph-grid-line-color: rgb(235, 240, 248);
  --graph-background-color: rgb(255, 255, 255);
}

/* Dark mode */
@media only screen {
  [data-theme="dark"] {
    --background-color: rgb(36, 38, 44);
    --font-color: rgb(230, 225, 232);
    --heading-color: rgb(245, 246, 250);
    --link-color: rgb(189, 163, 255);
    --graph-html-legend-item-hover-background-color: rgb(28, 28, 28);
    --about-section-font-color: rgb(192, 192, 192);

    --selection-background-color: rgb(176, 133, 240);
    --selection-font-color: rgb(255, 255, 255);

    --input-font-color: rgb(230, 225, 232);
    --input-background-color: rgb(63, 62, 71);
    --input-border-color: rgb(50, 50, 50) rgb(80, 80, 80) rgb(80, 80, 80) rgb(50, 50, 50);    
    --input-border-width: 2px;
    --input-outline-color: rgb(255, 255, 255);
    --toggle-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' viewBox='0 0 119 276'%3E%3Cpath fill='%23e6e1e8' d='M59.852,275.583L119,172.325,0,172.731Z' /%3E%3Cpath fill='%23e6e1e8' d='M59.852,1.417L119,104.675,0,104.269Z' /%3E%3C/svg%3E"); /* Original: <svg class="toggle-button-icon-svg" xmlns="http://www.w3.org/2000/svg" width="4.2" height="9.75" viewBox="0 0 119 276"><path d="M59.852,275.583L119,172.325,0,172.731Z" /><path d="M59.852,1.417L119,104.675,0,104.269Z" /></svg> */
    --button-background-color: rgb(68, 68, 68);
    --button-font-color: rgb(239, 239, 239);
    --button-border-color: rgb(100, 100, 100) rgb(50, 50, 50) rgb(100, 100, 100) rgb(50, 50, 50);
    --button-disabled-background-color: rgb(50, 50, 50);
    --button-disabled-font-color: rgb(125, 125, 125);
    --button-disabled-border-color: rgb(75, 75, 75) rgb(75, 75, 75) rgb(75, 75, 75) rgb(75, 75, 75);
    --about-hide-button-background-color: rgb(68, 68, 68);
    --about-hide-button-border-color: rgb(50, 50, 50);

    --tooltip-background-color: rgb(17, 17, 17);
    --tooltip-font-color: rgb(255, 255, 255);
    --tooltip-border-color: rgb(17, 17, 17) transparent transparent transparent;
    --context-menu-item-background-color: rgb(36, 38, 44);
    --context-menu-item-background-color-hover: rgb(63, 64, 66);
    --context-menu-item-font-color: rgb(232, 234, 237);
    --context-menu-border-color: rgb(60, 64, 67);
    --context-menu-dividing-lines-color: rgb(60, 64, 67);

    --scrollbar-thumb-color: rgb(67, 67, 78);
    --scrollbar-thumb-color-hover: rgb(30, 29, 33);

    --graph-font-color: rgb(230, 225, 232);
    --graph-axis-label-color: rgb(230, 225, 232);
    --graph-axis-tick-color: rgb(230, 225, 232);
    --graph-grid-line-color: rgb(77, 77, 77);
    --graph-background-color: rgb(36, 38, 44);
  }
}

html, body {
  box-sizing: border-box;
  overflow-x: hidden; /* For tooltip to prevent overflow resulting in page scroll */
  padding: 0px;
  margin: 0px;
  -ms-text-size-adjust: none; /* Disable font size scaling on mobile devices */
  -moz-text-size-adjust: none; /* Disable font size scaling on mobile devices */
  -webkit-text-size-adjust: none; /* Disable font size scaling on mobile devices */
  text-size-adjust: none; /* Disable font size scaling on mobile devices */
}

*, *:before, *:after {
  box-sizing: inherit;
}

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

body {
  background-color: var(--background-color);
  color: var(--font-color);
  font-family: -apple-system,BlinkMacSystemFont,"helvetica neue",helvetica,roboto,noto,"segoe ui",arial,sans-serif;
  padding-top: 25px;
  padding-bottom: 25px;
  padding-left: 20px;
  padding-right: 20px;
}

@media only screen and (max-width: 500px) {
  body {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Responsive sizing for narrow-width mobile */
@media only screen and (max-width: 380px) {
  body {
    padding-left: 10px;
    padding-right: 10px;
  }
}

::selection {
  background-color: var(--selection-background-color);
  color: var(--selection-font-color);
}

div, span {
  border: 0px solid black; /* Debug */
}

#header-content {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  margin-top: 0px;
  margin-bottom: 10px;
}

#icon {
  width: 45px; /* Old larger style: 33px */
  min-width: 45px; /* Old larger style: 33px */
  /*display: inline-block;*/ /* Uncomment this line to enable icon */
  display: none; /* Remove this line to enable icon */
  margin-right: 5px;
  margin-top: 5px;
  margin-bottom: 5px;
  background-image: url("android-chrome-512x512.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

#title {
  text-align: center;
}

/* Responsive font size to avoid title wrapping on narrow-width mobile */
@media only screen and (max-width: 380px) {
  #title {
    font-size: 6.99vw; /* 6.99 to not wrap at 320px */
    /* white-space: nowrap; */ /* Actually this can result in overflow with font scaling so don't use */
  }
}

#body-content {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap;
}

#col-graph {
  width: 60%;
}

#col-graph, #graph-and-legend-container, #graph-html-legend {
  background-color: var(--background-color);
  color: var(--font-color);
}

#graph-html-legend {
  text-align: center;
  cursor: default;
  padding-top: 4px;
  padding-bottom: 8px;
  line-height: 1.35;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#graph-html-legend-items {
  margin: 0 auto;
  width: 95%;
}

.graph-html-legend-item {
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 3px;
  padding-right: 3px;
  border-radius: 3px;
  margin-right: 2px;
}

.graph-html-legend-item:hover {
  background-color: var(--graph-html-legend-item-hover-background-color);
}

.graph-html-legend-item-text {
  pointer-events: none;
}

.graph-html-legend-item-circle {
  height: 13px;
  width: 13px;
  background-color: rgb(128, 128, 128);
  border-color: rgb(0, 0, 0);
  border-width: 2.5px;
  border-radius: 50%;
  margin-right: 3px;
  display: inline-block;
  vertical-align: middle;
  pointer-events: none;
}

.graph-html-legend-item-text-hidden {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

h1 {
  font-size: 35px;
  font-weight: 300;
  line-height: 1.25;
  margin-top: 0px;
  margin-bottom: 9px;
}

h2 {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  margin-top: 8px;
  margin-bottom: 14px;
}

h1, h2 {
  color: var(--heading-color);
}

@media only screen and (max-width: 500px) {
  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 21px;
  }
}

a {
  color: var(--link-color);
}

select {
  padding: 1px;
}

input {
  width: 42px;
  padding-top: 1px;
  padding-bottom: 1px;
  padding-left: 3px;
  padding-right: 3px;
}

select, input, .toggle-button {
  font-size: 15px;
  border-radius: 3px;
  color: var(--input-font-color);
  background-color: var(--input-background-color);
  border-style: solid;
  border-width: var(--input-border-width);
  border-color: var(--input-border-color);
}

select:active, input:active, .toggle-button:active {
  font-size: 15px;
}

/* Prevent automatic zooming on input elements on tap on iOS devices */
@supports (-webkit-touch-callout: none) {
  select, input, .toggle-button,
  select:active, input:active, .toggle-button:active {
    font-size: 16px;
  }
}

input:focus, select:focus, button:focus, textarea:focus, .toggle-button:focus {
  outline: 2px solid var(--input-outline-color);
}

.toggle-button {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  margin-top: -1px;
  padding-left: 5px;
  padding-right: 1px;
  white-space: nowrap;
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@-moz-document url-prefix() {
  .toggle-button {
    margin-top: -2.5px;
  }
}

.toggle-button-text {
  line-height: 1.4;
  margin-top: -1px;
  margin-right: 10px;
  pointer-events: none;	
}

@-moz-document url-prefix() {
  .toggle-button-text {
    margin-top: 0px;
  }
}

.toggle-button-icon {
  height: 20px;
  padding-left: 2px;
  padding-right: 2px;
  margin-left: 4px;
  margin-right: 4px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.toggle-button-icon {
  background-image: var(--toggle-button-icon);
}

#repeated-administration-top-container {
  white-space: nowrap;
}

#repeated-administration {
  min-width: 25px;
}

#concentration-units {
  min-width: 50px;
}

.option {
  line-height: 1.65;
  margin-bottom: 10px;
}

.col-divider {
  width: 5%;
}

@media only screen and (max-width: 900px) {
  .col-divider {
    display: none;
  }
}

#col-options-about {
  width: 35%;
}

@media only screen and (max-width: 900px) {
  #col-graph {
    margin-bottom: 15px;
  }

  #col-graph, #col-options-about {
    width: 100%;
  }
}

.heading-container {
  text-align: center;
}

#dose-interval-container {
  margin-top: 11px;
  opacity: 0.6;
}

#dose-limit-container {
  opacity: 0.6;
}

#y-axis-max {
  width: 52px;
}

#reset-button {
  width: 60px;
  height: 24px;
}

/* Hide certain elements */
#dose-limit-container,
#baseline-level-container,
#reset-button-container {
  display: none;
}

#about-section {
  margin-top: 25px;
}

#about {
  font-size: 10pt; /* ~13px (don't change to px—looks worse) */
  line-height: 1.35;
  color: var(--about-section-font-color);
  margin-top: 10px;
  margin-bottom: 10px;
}

#about-hidden {
  display: none;
}

#about-hide-button {
  color: var(--about-section-font-color);
  font-weight: bolder;
  background-color: var(--about-hide-button-background-color);
  border-style: solid;
  border-width: 1px;  
  border-color: var(--about-hide-button-border-color);
  border-radius: 10px;
  padding-left: 3px;
  padding-right: 3px;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#share-container {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: left;
}

#share-link {
  width: 100%;
  max-width: 228px;
  font-size: 12px;
  padding: 4px;
  margin-left: 4px;
}

#share-button, #download-button {
  width: 26px;
  height: 24px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-width: 1px;
  border-radius: 3px;
  cursor: pointer;
}

#mode-simple-button, #mode-advanced-button {
  min-width: 75px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-left: 6px;
  padding-right: 6px;
  margin-right: 7px;
  border-style: solid;
  border-width: 1px;
  border-radius: 3px;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#mode-simple-button:disabled, #mode-advanced-button:disabled {
  cursor: auto;
}

@media only screen and (max-width: 500px) {
  #share-link {
    max-width: 224px;
  }

  #share-button, #download-button {
    width: 30px;
    height: 28px;
  }
}

#mode-simple-button, #mode-advanced-button, #share-button, #download-button, #copy-icon, #download-icon, #reset-button {
  background-color: var(--button-background-color);
  color: var(--button-font-color);
  border-color: var(--button-border-color);
}

#mode-simple-button:disabled, #mode-advanced-button:disabled {
  background-color: var(--button-disabled-background-color);
  color: var(--button-disabled-font-color);
  border-color: var(--button-disabled-border-color);
}

@media only screen and (max-width: 500px) {
  #mode-simple-button, #mode-advanced-button, #share-button, #download-button, #copy-icon, #download-icon, #reset-button {
    font-size: 15px;
  }
}

/* For button hover tooltips */
.tooltip {
  position: relative;
  display: inline-block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 150px;
  white-space: nowrap;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -75px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltiptext {
  background-color: var(--tooltip-background-color);
  color: var(--tooltip-font-color);
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
}

.tooltip .tooltiptext::after {
  border-color: var(--tooltip-border-color);
}

.tooltip:hover .tooltiptext, .tooltip .tooltiptext.tooltip-triggered {
  visibility: visible;
  opacity: 1;
}

/* Context menu */

#overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

@media only screen and (max-width: 500px) {
  #overlay.context-menu-visible {
    display: block;
  }
}

#context-menu {
  position: fixed;
  z-index: 99999;
  width: 150px;
  box-shadow: rgba(0, 0, 0, 0.20) 0px 1px 4px;
  /*border-radius: 1px;*/
  visibility: hidden;
  pointer-events: none;
  border-width: 1px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#context-menu {
  border-color: var(--context-menu-border-color);
}

.context-menu-visible {
  visibility: visible !important;
  pointer-events: auto;
}

#context-menu .context-menu-item {
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  border-radius: inherit;
  pointer-events: auto;
  white-space: nowrap;
}

#context-menu .context-menu-item {
  background-color: var(--context-menu-item-background-color);
  color: var(--context-menu-item-font-color);
}

@media only screen and (min-width: 500px) {
  #context-menu .context-menu-item:hover {
    background-color: var(--context-menu-item-background-color-hover);
  }
}

/* For mobile */
@media only screen and (max-width: 500px) {
  #context-menu {
    top: 50%;
    left: 50%;
    width: 80%;
    transform: translate(-50%, -50%);
    border-radius: 5px;
  }

  #context-menu .context-menu-item {
    font-size: 18px;
    margin-bottom: 1px;
    border-radius: 0px;
    padding: 15px 15px;
  }

  #context-menu .context-menu-item:first-of-type {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
  }

  #context-menu .context-menu-item:last-of-type {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
  }

  html[data-iframe] #context-menu {
    top: 175px;
    transform: translate(-50%, 0%);
  }
}

/* Needed on mobile for context menu to work right */
@media only screen and (max-width: 500px) {
  body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

#context-menu {
  background-color: var(--context-menu-dividing-lines-color); /* For dividing lines between menu items */
}

/* Scrollbar */

::-webkit-scrollbar {
  background-color: var(--background-color);
  border: none;
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
  border: 1px solid var(--scrollbar-thumb-color);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-color-hover);
  box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.2);
  border: none;
}

