/*  z-indices:
 * 99: expanding-overlay
 *  9: settings-button
 *  8: settings-menu
 *  2: search-container
 *  1: 
 *  0: *
 * -8:
 * -9: bg1
 */
:root {
  --white: #fff;
  --black: #000;
  --main95: hsl(150, 60%, 95%);
  --main90: hsl(150, 60%, 90%);
  --main80: hsl(150, 60%, 80%);
  --main60: hsl(150, 60%, 60%);
  --main40: hsl(150, 20%, 40%);
  --main20: hsl(150, 20%, 20%);
  --main10: hsl(150, 10%, 10%);
  --main05: hsl(150, 10%, 5%);
  --google-bg: #202124;
}

@keyframes pulse {
  0% { transform: scale(1);}
  50% { transform: scale(0.8);}
  100% { transform: scale(1); }
}
@keyframes fade {
  0% {opacity: 0;}
  100% {opacity: 1;}
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--black);
  overflow-x: hidden;
}

#settings-button {
  position: fixed;
  right: 0;
  width: 25px;
  height: 25px;
  padding: 15px;
  fill: var(--white);
  cursor: pointer;
  z-index: 9;
  transition: transform 0.5s ease;
}
#settings-button:hover {
  transform: rotate(90deg);
}

#settings-menu {
  position: fixed;
  width: 100vw;
  height: 100vh;
  padding-left: 30vw;
  display: flex;
  justify-content: center;
  align-items: left;
  flex-direction: column;
  background-color: var(--main05);
  z-index: 8;
  visibility: hidden;
  opacity: 0;
  transition: 0.2s;
}
.settings-form {
  padding: 35px;
  gap: 35px;
  display: flex;
  flex-direction: row;
}
.settings-form-for-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100%;
  padding: 1em;
  gap: 2em;
  margin-top: 0.75em;
}
.settings-divider {
  position: absolute;
  margin-top: -35px;
}
.settings-divider-header {
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--white);
}
.settings-field input {
  width: 8rem;
  height: 2.5rem;
  padding: 0 0.75rem 0 0.75rem;
  outline: 2px solid var(--main80);
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  background: linear-gradient(to right, #fff 80%, var(--main10));
  -webkit-background-clip: text;
  background-clip:text;
  -webkit-text-fill-color: transparent;
  background-color: var(--main05);
  transition: .25s;
}
.settings-field label {
  position: absolute;
  pointer-events: none;                 /* Click through label */
  color: var(--main80);
  background-color: var(--main05);      /* Color of settings container */
  padding: 0 5px;                       /* So background color goes over outline better */
  margin-left: -9em;                 /* Volatile: move into the settings input */
  margin-top: .55em;                     /* Volatile: move into the settings input */
  transition: .25s;
}
.settings-field input:not(:placeholder-shown) ~ label, .settings-field input:focus ~ label {
    transform: translateY(-1.3em) translateX(-3.1em);   /* Volatile: move into the top of the setting input's outline */
    font-size: 0.75em;
    transition: .25s;
}
.settings-field input:focus, .settings-field input:hover {
    outline: 2px solid var(--white);
}
.settings-field input:focus ~ label {
    color: var(--white) !important;
}
.settings-slider {
}
.settings-slider label {
  position: absolute;
  pointer-events: none;                 /* Click through label */
  color: var(--main80);
  background-color: var(--main05);      /* Color of settings container */
  padding: 0 5px;                       /* So background color goes over outline better */
  margin-left: -16.2em;                 /* Volatile: move into the settings input */
  margin-top: 0.2em;                     /* Volatile: move into the settings input */
  transform: translateY(-1.25em) translateX(-3em);   /* Volatile: move into the top of the setting input's outline */
  font-size: 0.85em;
}
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 20em;
  height: 3.1em;
  outline: 2px solid var(--main80);
  border-radius: 5px;
  border: none;
  background-color: var(--main05);
  transition: .25s;
  margin-top: -0.4em;
}
.slider:hover {
  outline: 2px solid var(--white);
  transition: .25s;
}
.slider::-moz-range-thumb {
  border: none;
  outline: none;
  width: 0.5em;
  height: 1em;
  border-radius: 5px;
  background: var(--white);
  cursor: pointer;
}

#main-container {
  position: relative;
  left: 25vw;
  width: 50vw;
  height: 80vh;
  padding-top: 10vh;
  padding-bottom: 10vh;
  display: flex;            
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 2rem;
  animation: fade 0.2s;
}
#search-container {
  width: 100%;
}
#search {
  width: 100%;
  border-style: none;   /* Removes extra content on the right */
  padding-bottom: 5px;
  padding-top: 5px;
  font-size: 1rem;
  text-align: center;
  color: var(--white);
  border-radius: 20px;
  border: 1px solid var(--main80);
  background-color: var(--main05);

}
#search:focus {
  outline: none;
}
#search::placeholder {
  color: var(--main80);
}
#box-container {
  column-gap: 8em;  /* volatile */
  row-gap: 2em;     /* volatile */
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  grid-template-rows: repeat(2, 1fr);    /* 2 equal rows */
}
.box {
  font-size: 1rem;
  border-left: 4px solid var(--main80);
  transition: border-left 0.2s;
}
.box:hover {
  border-left: 4px solid var(--white);
}
.category-title {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  padding-left: 1rem;
  color: var(--white);
}
.link-container {
  max-height: 4.75rem;
  overflow-y: auto;
  padding-left: 1rem;
}
.link-container:not(:hover) {
  scrollbar-color: rgba(0, 0, 0, 0) transparent;
  transition: scrollbar-color 0.25s;
}
.link-line a:hover {
  color: var(--white);
  transition: color 0.2s;
}
.link {
  color: var(--main80);
  text-decoration: none;
}
.extra-link {
  color: var(--main40);
  text-decoration: none;
  padding: 0px 0.25rem;
}


#bandwidth-container {
  position: relative;
  height: 50vh;
  width: 40vw;
  left: 0vw;
  padding-bottom: 500px;
}
#bandwidth-chart-container {
  position: relative;
  height: 100vh;
  width: 60vw;
  left: 20vw;
  gap: 4rem;
  display: flex;  
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background: linear-gradient(to bottom, transparent 0%, var(--main05) 80%);
  transition: left 0.5s ease;
}
.bandwidth-chart {
  height: 20%;
  width: 100%;
  overflow: hidden;
  transition: opacity 0.2s;
}

#finance-container {
  display: inline-flex;
}

#finance-chart-plans-container {
  position: relative;
  left: 0vw;
  width: 25vw;
  height: 80vh;
  padding-top: 10vh;
  padding-bottom: 10vh;
  gap: 2rem;
  display: flex;  
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* background-color: rgba(255,255,255,0.1); */
}

#finance-chart-container {
  position: relative;
  left: 0vw;
  width: 50vw;
  height: 80vh;
  padding-top: 10vh;
  padding-bottom: 10vh;
  gap: 2rem;
  display: grid;
  grid-template-rows: 1fr 1fr; /* Two rows, each taking 1 fraction */
  grid-template-columns: 1fr 2fr; /* Two columns, each taking 1 fraction */
  /* background-color: rgba(255,100,0,0.2); */

}
#finance-table {
  height: 100%;
  min-width: 100%;
  max-width: 100%;
  border-spacing: 0;
  grid-column: span 2;
}
#finance-table tbody tr {
  color: var(--main80);
  background-color: var(--main10);
}
#finance-table tbody tr:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.2s;
}
#finance-table td {
  box-sizing: border-box;
}
#finance-table tbody td {
  text-align: right;
}
#finance-table th {
  color: var(--white);
  background-color: var(--main10);
  box-sizing: border-box;
  padding-bottom: 5px;
  padding-top: 5px;
}
#finance-table thead th {
  border-top: 1px solid var(--main80);
}
#finance-table thead th:first-child {
  border-top-left-radius: 20px;
  border-left: 1px solid var(--main80);
}
#finance-table thead th:last-child {
  border-top-right-radius: 20px;
  border-right: 1px solid var(--main80);
}
#finance-table tfoot th {
  border-bottom: 1px solid var(--main80);
}
#finance-table tfoot th:first-child {
  border-bottom-left-radius: 20px;
  border-left: 1px solid var(--main80);
}
#finance-table tfoot th:last-child {
  border-bottom-right-radius: 20px;
  border-right: 1px solid var(--main80);
}
#finance-table tbody td:first-child {
  border-left: 1px solid var(--main80);
}
#finance-table tbody td:last-child {
  border-right: 1px solid var(--main80);
}
#finance-table tbody td:nth-child(1), #finance-table tbody td:nth-child(5), #finance-table tbody td:nth-child(9) {
  border-right: 1px solid var(--main40);
}
.finance-num {
  font-family: 'SF Pro Mono', monospace;
  text-align: right;
  min-width: 5rem;
  max-width: 5rem;
  /* background-color: rgba(255,255,255,0.1); */
}
.finance-delta {
  font-family: 'SF Pro Mono', monospace;
  text-align: right;
  font-size: 0.75rem;
  padding-right: 10px;
  min-width: 3vw;
  max-width: 3vw;
  /* background-color: rgba(255,100,0,0.1); */
}
#finance-table-year-back, #finance-table-year-forward {
  padding: 5px;
  color: var(--main80);
  user-select: none;
}
#finance-table-year {
  font-family: 'SF Pro Mono', monospace;
}

#finance-settings {
  border-radius: 20px;
  border: 1px solid var(--main80);
  transition: opacity 0.2s;
  background-color: var(--main10);
  padding: 10px;
  text-align: center;
  display: flex;  
  flex-direction: column;
  align-items: center;

}

#finance-wishlist-table {
  color: #fff;
}
#finance-wishlist-table input[type=number] {
  -moz-appearance: textfield;
  color: var(--main80);
  background-color: var(--main20);
  border: none;
  outline: none;
}

#finance-toggle-container {
  position: relative;
  background: var(--main05);
  border-radius: 25px;
  position: relative;
  height: calc(1rem + 10px);
  width: 200px;
  display: inline-block;
}
#finance-toggle-container > * {
  float: left;
}
#finance-toggle-container input[type=radio]{
  display: none;
}
#finance-toggle-container label {
  color: var(--white);
  display: block;
  width: 100px;
  padding-top: 2.5px;
  height: calc(1rem + 10px);
  border-radius: 25px;
  cursor: pointer;
  text-align: center;
}
.finance-toggle-slider {
  width: 100px;
  height: calc(1rem + 10px);
  position: absolute;
  border-radius: 25px;
  transition: .2s;
}
#finance-toggle-1:checked ~ .finance-toggle-slider{
  background: rgba(255,255,255,0.1);
  height: calc(1rem + 10px);
  top: 0px;
  left: 0px;
}
#finance-toggle-2:checked ~ .finance-toggle-slider{
  background: rgba(255,255,255,0.1);
  height: calc(1rem + 10px);
  top: 0px;
  left: 100px;
}

#cashflow-chart-container {
  border-radius: 20px;
  border: 1px solid var(--main80);
  overflow: hidden;
  transition: opacity 0.2s;
  background-color: var(--main10);
  display: flex;  
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
  padding-top: 10px;
}
#cashflow-toggle-1:checked ~ .finance-toggle-slider{
  background: rgba(255,255,255,0.1);
  height: calc(1rem + 10px);
  top: 0px;
  left: 0px;
}
#cashflow-toggle-2:checked ~ .finance-toggle-slider{
  background: rgba(255,255,255,0.1);
  height: calc(1rem + 10px);
  top: 0px;
  left: 100px;
}
#cashflow-chart {
  transition: opacity 0.2s;
  background-color: var(--main10);
}


#main-gradient {
  position: fixed;
  top: 0vh;
  left: 0vw;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(to bottom, transparent 50%, var(--main05) 100%);
  transition: background 0.5s ease;
  z-index: -8;
}
#main-bg {
  position: fixed;
  top: 0%;
  left: 0vw;
  height: 100%;
  width: 100%;
  z-index: -9;
  will-change: top, transform;
  transition: left 0.5s;
  animation: fade 0.5s;
}

#time-container {
  justify-content: center;
}
#time {
  font-size: 128px;
  font-weight: bold;
  color: var(--white);
}
#date {
  font-weight: bold;
  color: var(--main80);
  position: absolute;
  right: 63.5vw;
  justify-content: left;
}
#weekday {
  font-weight: bold;
  color: var(--main80);
  position: absolute;
  left: 63.5vw;
  justify-content: right;
}
