* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

:root {
  /* main */
  --positive_green: #00c800;
  --negative_red: #fd5240;
  --NEUTRAL: #b2b2b2;

  /* body */
  --light__gray__body: #7b7b7b;
  --light__gray__highlight: #c5c5c5;

  --ff_main: "Nunito Sans", sans-serif;

  --aside_height: 135px;

  --panel_height_from: 500;
  --panel_height_to: 815;
}

body {
  font-family: var(--ff_main);
}

/* header */

header {
  position: sticky;
  top: 0;
  padding: 1em 5em;

  background-color: white;

  display: flex;
  justify-content: space-between;
  align-items: center;

  z-index: 100;

  gap: 5em;
  font-weight: 700;
  font-size: 1.25em;
}

header nav li {
  cursor: pointer;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

header img {
  width: 48px;
  height: 48px;
}

form input {
  box-sizing: border-box;
  width: 30rem;
  height: 48px;
  padding-left: 1em;
  font-size: 1em;
}

form ul {
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 0.75em;

  font-size: 0.75em;
  list-style: none;
  position: absolute;

  padding: 1em 0;

  width: 30rem;

  border: 1px solid black;
  border-top: none;

  background-color: lightgray;
}

form li {
  width: 100%;
  padding: 0.5em 1em;
}

form a {
  text-decoration: none;
  color: black;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2em;
}

form input:focus {
  background-color: lightgray;
  outline: none;
  /* border-bottom: none; */
}

form li:hover {
  background-color: var(--light__gray__highlight);
  cursor: pointer;
}

/* main container */
.app-container {
  display: flex;
  justify-content: center;
  margin: 2.5em;
}

.main-container {
  width: 1200px;
  min-width: 800px;
  margin: 0 1em;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

/* autocomplete */
.auto-ticker {
  display: flex;
  justify-content: space-between;
}

/* main portfolio */
.portfolio-container {
  display: flex;
  flex-direction: column;
}

.portfolio-container ul {
  list-style: none;
  display: flex;
  gap: 1em;
  font-weight: 800;
  font-size: 1em;
}

.portfolio-container ul li {
  border-bottom: 2px solid white;
  padding: 1em 1em 0em 0em;
  cursor: pointer;
}

#portfolio-chart {
  width: 100%;
  height: 400px;
}

.portfolio-bp {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

#buying-power {
  border-bottom: 1px solid lightgray;
}

/* Main sub-panels */

.sub-panel {
  display: flex;
  flex-direction: column;
  gap: 2em;
  font-size: 1.25em;
  border-top: 1px solid lightgray;
  padding: 1.5em 0;
}

.sub-panel ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1em;
  font-size: 0.8em;
}

section h1 {
  font-size: 2em;
  font-weight: 600;
  margin-bottom: 0.5em;
}

/* side containers */
aside {
  position: sticky;
  top: var(--aside_height);
  max-height: 500px;
}

.side-container {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin: 0 1em;
  margin-bottom: 2em;
  width: 335px;
}

.panel {
  display: flex;
  flex-direction: column;
  font-size: 1em;
  box-shadow: 0px 0px 32px 6px rgba(0, 0, 0, 0.1);
  border-radius: 0.25em;
}

/* user stock info */
.sub-panel-stocks {
  display: flex;
  gap: 1em;
}

.user-stock-panel {
  width: 50%;
  border: 1px solid var(--light__gray__highlight);
  padding: 1.25em;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  border-radius: 0.25em;
  justify-content: space-between;
}

.user-stock-panel hr {
  border: none;
  border-top: 1px solid var(--light__gray__highlight);
}

.user-stock-stats {
  display: flex;
  justify-content: space-between;
}

/* stock content panel */

.stocks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-weight: 700;
  padding: 1em;
  text-decoration: none;
  align-items: center;
  color: black;
}

.stocks:hover {
  background-color: var(--light__gray__highlight);
  cursor: pointer;
}

.stocks .ticker-graph {
  max-width: 90px;
  max-height: 45px;
  justify-self: center;
}

.stocks .ticker-price {
  text-align: right;
  justify-self: end;
}

.stocks .ticker-sub {
  margin-top: 5px;
  font-size: 0.85em;
  font-weight: 600;
}

.stocks .user-shares {
  color: var(--light__gray__body);
  font-weight: 400;
  font-size: 0.8em;
}

/* Purchase Panel */

.purchase-panel {
  padding: 0 1em;
  gap: 0em;
  margin-bottom: 1em;

  height: 550;
  transition: height 0.25s ease-out;
}

.purchase-panel .purchase-panel-header {
  display: flex;
  flex-direction: row;

  gap: 1em;
}

.purchase-panel hr {
  border: none;
  background-color: lightgray;
  height: 1px;
}

.purchase-panel h2 {
  font-weight: 700;
  font-size: 1.4em;
  padding: 1em 0;
  border-bottom: 1px solid white;
  cursor: pointer;

  transition: border-bottom 0.5s;
}

.purchase-panel .current-available {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.25em;
  padding: 1em 0;
  font-weight: 700;
  border-top: 1px solid lightgray;
}

.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 2em;
  margin: 1em 0;
}

.purchase-form .order-summary {
  flex-direction: column;
  gap: 0.25em;
  margin-top: 1em;
  font-size: 17px;
}

.purchase-form .order-summary h3 {
  align-self: baseline;
}

.purchase-form section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.purchase-form section input,
select {
  width: 120px;
  height: 30px;
  padding-left: 6px;
}

.purchase-form .form-buttons {
  display: flex;
  flex-direction: column;
  gap: 2em;
  width: 100%;
  background-color: white;
}

/* remove arrow */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0.25em;
}

.purchase-form .order-value {
  text-align: right;
  box-sizing: content-box;
}

.purchase-form hr {
  margin: 0;
}

.current-estimated {
  font-weight: 800;
}

.btn-submit {
  background-color: var(--positive_green);
  border: none;
  border-radius: 2em;
  color: white;
  font-weight: 600;
  margin-top: 1em;
  width: inherit;
  cursor: pointer;
}

.user-available {
  font-weight: 700;
  text-align: center;
}

.btn-alternative {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.5em;

  border-radius: 2em;

  background-color: white;

  font-weight: 500;
  width: inherit;
}

.btn-subPanel {
  padding: 1em;
  align-self: center;
  width: 225px;
}

.btn-subPanel:hover {
  background-color: #fd53401d;
  background-color: #00c8001d;
}

.btn-subPanel img {
  width: 16px;
}

.hidden {
  display: none;
}

/* News Content */

.news-panel {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 5em;
  margin: 0em 0;
  font-size: 1em;
  text-decoration: none;
  align-items: center;
  color: black;
}

.news-panel:hover {
  background-color: var(--light__gray__highlight);
  filter: brightness(0.75);
  cursor: pointer;
}

.news-panel-main {
  display: flex;
  flex-direction: column;
  gap: 1em;
  justify-content: space-between;
}

.news-publisher {
  font-weight: 700;
}

.news-publisher-time {
  font-weight: 500;
}

.news-title {
  font-size: 1.5em;
}

.news-teaser {
  font-size: 0.95em;
  line-height: 1.75em;
  color: var(--light__gray__body);
}

.news-tickers {
  width: fit-content;
}

.news-ticker {
  align-self: flex-end;
  font-weight: 800;
  transition: color 0.1s ease-in;
}

.news-tickers:hover {
  color: orangered;
}

.news-image {
  display: flex;
  height: 150px;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.news-panel img {
  width: 100%;
}

.loading {
  min-width: 335px;
  height: 500px;
  animation: loadingGradient 2s infinite;
}

@keyframes loadingGradient {
  50% {
    background-color: var(--light__gray__highlight);
  }

  100% {
    background-color: white;
  }
}

/* footer */

footer {
  font-size: 1em;
  text-align: center;
  height: 2.5em;
}

footer p {
  font-weight: lighter;
}

footer span {
  font-weight: bold;
}

/* 404 Page */
.missing-page {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  gap: 2em;
  padding: 5em;
  font-size: 32px;
}

.missing-text {
  display: flex;
  flex-direction: column;

  gap: 1em;
}

.missing-img img {
  width: 500px;
}

.missing-page section {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  gap: 0em;
}

.missing-page button {
  width: 175px;
  font-size: 24px;
  padding: 1em;
  border: none;
  border-radius: 3em;
  font-weight: 600;
  background-color: #00c800;
}

/* POSITIVE GREEN NEGATIVE RED */
.positive_green {
  color: var(--positive_green);
}

.negative_red {
  color: var(--negative_red);
}

.positive_green_symbol {
  filter: invert(43%) sepia(48%) saturate(2137%) hue-rotate(88deg)
    brightness(106%) contrast(112%);
}

.negative_red_symbol {
  filter: invert(42%) sepia(14%) saturate(3604%) hue-rotate(323deg)
    brightness(105%) contrast(109%);
}

.positive_green_button {
  border: 1px solid var(--positive_green);
  color: var(--positive_green);
}

.negative_red_button {
  border: 1px solid var(--negative_red);
  color: var(--negative_red);
}

/* ANIMATIONS*/

/* loading animation */
.loader {
  border: 6px solid #f3f3f3; /* Light grey */
  border-top: 6px solid #7b7b7b; /* Blue */
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* text slide in animation */
.animateReview {
  animation: slideDown 0.5s;
}

.animateGrow {
  animation: growPanel 55s;
}

@keyframes slideDown {
  from {
    transform: translateY(-65%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes growPanel {
  from {
    height: var(--panel_height_from);
    /* height: 500; */
  }
  to {
    /* height: 815; */
    height: var(--panel_height_to);
  }
}
