* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
}

:root {
  --primary-color: #09d47c;
  --primary-hover: #03bb6d;

  --background-primary: #002e22; /* 002e22;*/
  --background-secondary: white;
  --background-overlay: rgba(0, 0, 0, 0.4);

  --text-primary: #07271f;
  --text-secondary: #6c757d;
  --text-light: #e5faf6;
  --text-muted: #adb5bd;
  --text-primary-muted: rgba(0, 46, 34, 0.4);

  --border-color: #dee2e6;
  --accent-color: #2f4858;
  --error-color: #dc3545;
  --success-color: #09d47c;

  --shadow-color: rgb(0 0 0 / 0.2);

  /* --background-color-opacity: rgba(7, 39, 31,0.6); */

  --skeleton-background: #e7e7e7;
  --skeleton-foreground: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0) 80%
  );

  --card-radius: 0.67rem;
  --button-radius: 2.4rem;
  --input-radius: 0.4rem;
}

.dark {
  --background-secondary: #1a2f2a;
  --text-primary: #d1fff3;
  --text-muted: #6c757d;
  --text-secondary: #adb5bd;
  --accent-color: #6dc9b0;

  --skeleton-background: #2d4942;
  --skeleton-foreground: linear-gradient(
    100deg,
    rgba(233, 255, 250, 0),
    rgba(233, 255, 250, 0.15) 60%,
    rgba(233, 255, 250, 0) 80%
  );
}

html {
  font-size: 18px;
  font-family: "Public Sans";
  color: var(--text-primary);
}

/* login css */
#loginContent {
  display: none;
  height: 100vh;
  width: 100%;
  justify-content: center;
  align-items: center;
}

#loginLeft {
  background-color: var(--background-secondary);
  height: 100%;
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#leftLogo {
  width: 30%;
}
#leftHeader {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--accent-color);
}

#loginForm {
  margin-top: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
}
#loginForm div {
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"] {
  width: 50%;
  height: 42px;
  padding-left: 12px;
  border-radius: var(--input-radius);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--primary-color);
}

input.inputError {
  border: 1px solid var(--error-color);
}

.inputErrorMessage {
  color: var(--error-color);
  font-size: 0.6rem;
}

.btn {
  line-height: 1.5;
  border-radius: var(--button-radius);
  color: var(--text-light);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.6rem 1.3rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--primary-hover);
  cursor: pointer;
}

#loginSubmit {
  margin-top: 20px;
}

#leftLogos {
  height: 30%;
  margin-top: 40px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2.4rem;
}

.leftLogo {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 120px;
}

.leftLogo > img {
  height: 90px;
  width: 90px;
}

.leftLogo > p {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--text-muted);
}

input[type="submit"]:hover {
  cursor: pointer;
}

#loginRight {
  background-color: var(--background-primary);
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  color: var(--text-light);
}

#loginRight.animate {
  transform: scaleX(1);
}

#headerRight {
  height: 30%;
  width: 60%;
  font-size: 2rem;
  padding-top: 80px;
  padding-left: 4rem;
  z-index: 10;
}
#rightTitle {
  font-weight: bold;
}
#rightContent {
  font-size: 20px;
  color: var(--text-secondary);
}

#rightBackground {
  z-index: 5;
  position: absolute;
  height: 100%;
  width: 60%;
}

#rightImage {
  position: absolute;
  z-index: 3;
  height: 40%;
  width: 40%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30%);
}

#rightBlob {
  position: absolute;
  height: 80%;
  width: 80%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
}

#authenticatedContent {
  display: none;
}

#createModal {
  display: none;
  position: absolute;
  z-index: 1;
  height: 100vh;
  width: 100%;
  background-color: var(--background-overlay);
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  font-family: "Public Sans";
}
#transactionForm {
  background-color: var(--background-secondary);
  border-radius: var(--card-radius);
  padding: 1.1rem;
  width: 30%;
  height: 40%;
  box-shadow: 0 3px 10px var(--shadow-color);
  overflow-y: scroll;
}
#fieldsContainer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
}

.formLabel {
  font-size: 0.8rem;
  font-weight: 700;
}
#fieldsContainer div {
  margin-top: 5px;
  /* margin-bottom: 10px; */
  width: 100%;
  display: flex;
  padding-bottom: 5px;
  vertical-align: center;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

#transactionCreationForm {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: space-between;
  height: 100%;
}
#fieldsContainer {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

#formHeader {
  height: 15%;
  display: flex;
  flex-direction: column;
}

.closeModal {
  align-self: flex-end;
  height: 35px;
  width: 35px;
  background-color: transparent;
  color: var(--text-muted);
  font-weight: bold;
}

.closeModal:hover {
  cursor: pointer;
  color: var(--text-secondary);
}


#buttonRow {
  height: 10%;
  display: flex;
  align-self: flex-end;
  align-items: flex-end;
  width: 100%;
  justify-content: flex-end;
}
#dataModal {
  display: none;
  position: absolute;
  z-index: 1;
  height: 100vh;
  width: 100%;
  background-color: var(--background-overlay);
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
}

#dataModalCard {
  display: flex;
  flex-direction: column;
  align-items: space-around;
  background-color: var(--background-secondary);
  border-radius: var(--card-radius);
  padding: 1.1rem;
  width: 30%;
  height: 40%;
  box-shadow: 0 3px 10px var(--shadow-color);
  overflow-y: scroll;
}
#dataModalCard > div {
  margin-top: 1rem;
  flex: 1;
  word-wrap: break-word; 
}

#transactions {
  background-image: url(assets/trianglify.svg);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 100vh;
  width: 100%;
  display: flex;
}

#sideDrawer {
  height: 100%;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 20px;
  padding-right: 20px;
}

#logo {
  padding: 10px;
  height: 40px;
  margin-top: 10px;
}
.sideButton {
  margin-top: 15px;
  height: 40px;
  width: 100%;
  color: var(--error-color);
  transition: all 0.1s ease;
  border-radius: var(--card-radius);
  background-color: transparent;
}
.sideButton:hover {
  cursor: pointer;
  background-color: var(--background-primary);
}

#main {
  flex: 5;
  display: flex;
  flex-direction: column;
}

#topDrawer {
  height: 70px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 15px;
  padding-left: 5px;
}
#search {
  margin-left: 1rem;
}

#transactionList {
  flex: 1;
  border-radius: var(--card-radius);
  margin: 0px 1rem 1.8rem 0px;
  padding: 1rem 1rem 2rem 1rem;
  display: flex;
  min-height: 0;
  background-color: var(--background-secondary);
}

#transactionModal {
  overflow-y: scroll;
  flex: 1;
  min-height: 0;
  color: var(--text-primary);
}

#transactionTable {
  width: 100%;
  background-color: var(--background-secondary);
  table-layout: fixed;
  color: var(--accent-color);
  border-collapse: separate;
  border-spacing: 0;
}

#transactionTable thead {
  background-color: var(--background-secondary);
  font-weight: 600;
  position: sticky;
  top: 0px;
}
#transactionTable th {
  text-align: center;
  font-size: 1em;
  padding: 0.7rem 0.9rem;
  max-width: 50px;
  border-bottom: 1px solid var(--accent-color);
}

#transactionTable tr {
  font-size: 0.8rem;
  text-align: center;
  height: 50px;
  justify-content: center;
}
#transactionTableBody tr:hover {
  background-color: var(--text-light);
  cursor: pointer;
}

#transactionTable td {
  white-space: nowrap;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 400;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 50px;
}

#transactionTable td:last-child {
  text-align: right;
}

.transactionError {
  color: var(--error-color);
  text-align: center;
  margin-top: 20px;
}
.loading {
  position: relative;
}

@keyframes loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.bar {
  background-color: var(--skeleton-background);
  height: 50px;
  border-radius: var(--input-radius);
  position: relative;
  overflow: hidden;
}

.bar:after {
  position: absolute;
  transform: translateY(-50%);
  top: 50%;
  left: 0;
  content: "";
  height: 100%;
  width: 100%;
  background-image: var(--skeleton-foreground);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: loading 1s ease-in-out infinite;
}

#dark-toggle {
  color: var(--text-muted);
  background-color: transparent;
  position: absolute;
  top: 15px;
  right: 15px;
  height: 20px;
  width: 20px;
  z-index: 20;
}

#dark-toggle:hover {
  color: var(--text-secondary);
  cursor: pointer;
}

#dark-icon {
  display: none;
}

#light-icon {
  display: none;
}

@media (max-width: 768px) {
  #loginContent {
    flex-direction: column;
  }
  #loginLeft {
    width: 100%;
    height: 100%;
  }
  #loginRight {
    height: 40%;
    display: none;
  }
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"] {
    width: 80%;
  }
  
  #transactions {
    flex-direction: column;
  }
  
  #transactionModal {

  overflow-x: scroll;
  }

  #sideDrawer {
    flex-direction: row;
    height: 10px;
    justify-content: space-between;
  }

  #main {
    flex: 8;
    overflow-y: scroll;
  }

  #logo {
    height: 30px;
  }

  .sideButton {
    height: 20px;
    width: 100px;
  }

  #transactionForm {
    width: 70%;
    height: 50%;
  }

  #transactionList {
    margin: 1rem;
  }
  #search {
    margin-right: 1rem;
  }
  #showCreateTransaction {
    margin-left: 1rem;
  }
}
