:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 100vw;
  min-height: 100vh;
  background-image: url("assets/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0.4em 1.6em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #03a007;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  background-color: #65d10c;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.header {
  display: flex;
  width: 90%;
  height: 4rem;
  align-items: center;
  justify-content: center;
}

.changeLog {
  font-size: 0.9em;
  width: 12%;
  margin: 0em 0em 0em 1em;
  background-color: #0b8e0f;
}

.title {
  background-image: url("assets/title.png");
  background-size: contain;
  background-position: start;
  background-repeat: no-repeat;
  width: 100%;
  height: 50%;
  margin: 0em 0em;
}

.Main-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  place-content: center;
  align-items: center;
  justify-content: center;
}
.Main-container-content {
  width: 90%;
  height: 24rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.content-container {
  display: flex;
  width: 90%;
  height: 120%;
  gap: 1rem;
  justify-content: center;
}

.panel1 .Calculator-container {
  margin-bottom: 1rem;
}

.Calculator-container-header,
.list-container-header,
.graph-container-header {
  background-color: #03a007;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  width: 100%;
  text-align: center;
  color: white;
  font-weight: bold;
  padding: 0.4rem 0rem;
}

.Calculator-container,
.list-container,
.graph-container {
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.Calculator-container {
  display: flex;
  flex-direction: column;
  background-color: rgba(208, 235, 253, 0.8);
  color: #1a1a1a;
  flex: 2;
  max-width: 100%;
}

.Calculator-container-form {
  padding: 1rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  justify-items: center;
}

.Calculator-container-form button {
  width: 80%;
}

.Calculator-container-form .form-group {
  display: flex;
  padding: 0.4em 0.6em;
}

.Calculator-container-form .form-group label {
  margin-right: 1rem;
  flex: 0 0 auto;
}

.Calculator-container-form .form-group input {
  flex: 1;
  padding: 0.4em;
  min-width: 0;
}

.crop-submit {
  width: 100% !important;
  font-size: 1rem;
}

#crop-switch {
  width: 48%;
  font-size: 1rem;
}

.graph-container {
  display: flex;
  flex-direction: column;
  background-color: rgba(208, 235, 253, 0.8);
  flex: 1;
  color: #1a1a1a;
  min-width: 80%;
  max-width: 100%;
  overflow: visible;
}

.graph-container-graph p {
  text-align: center;
  color: #5d645e;
}

.list-container {
  display: flex;
  flex-direction: column;
  background-color: rgba(208, 235, 253, 0.8);
  color: #1a1a1a;
  flex: 2;
  min-height: 12rem;
}

.list-container-form,
.graph-container-graph {
  padding: 3rem 2rem;
}

.columnScroll {
  overflow-y: auto;
  height: 100%;
  width: 100%;
  flex: 3;
}

/*END OF CONTAINERS*/

.list-container-form table {
  width: 100%;
  border-collapse: collapse;
  min-height: 1em;
  max-height: 2em;
  overflow-y: auto;
}

.list-container-form th {
  padding: 2px 8px;
}

#list-search {
  height: 2rem;
  width: 10rem;
}
.search-button {
  background-image: url("assets/magnifying-glass.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 1rem;
  height: 2rem;
  border: none;
  cursor: pointer;
  padding: 0.4em 1.2em;
}

.list-button {
  padding: 0.4em 0.5em;
  font-size: 1em;
  font-weight: 500;
}

.list-container .list-container-header {
  position: sticky;
  top: 10;
}

.list-container .list-container-form {
  position: sticky;
  top: 0;
}

#crop-list-table {
  width: 100%;
  border-collapse: collapse;
}

#crop-list-table thead {
  position: sticky;
  top: 0;
}

#crop-list-table tbody td {
  padding: 0rem 1.2rem 0rem 1rem;
  text-align: start;
}

#crop-list-table td {
  width: 10%;
}

/*head*/
#crop-list-table th:nth-child(1n) {
  text-align: center;
  background-color: #88b1a0;
  border: none;
}

#crop-list-table th:nth-child(2n) {
  text-align: center;
  background-color: #a9c7b8;
}

/*body*/
#crop-list-table td:nth-child(1n) {
  text-align: center;
  background-color: #7da494;
}

#crop-list-table td:nth-child(2n) {
  text-align: center;
  background-color: #9bb6a9;
}

#crop-list-table tbody {
  color: black;
  box-shadow: rgba(2, 68, 10, 0.35) 0px -50px 36px -28px inset;
}

#crop-list-table tr:hover td {
  filter: brightness(70%);
}

#crop-canvas {
  height: auto !important;
  min-height: 10em;
  align-self: center;
  justify-content: center;
  align-content: center;
  align-items: center;
  overflow: visible !important;
  display: flex;
  width: 100%;
}

#Toast {
  visibility: hidden;
  background-color: #424542;
  min-width: 250px;
  padding: 10px 10px;
  text-align: center;
  margin-left: -125px;
  color: #fff;
  border-radius: 4px;
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 30px;
  font-size: 17px;
}

#Toast.show {
  visibility: visible;
  -webkit-animation: fade in 0.5s, fade out 0.5s 2.5s;
  animation: fade in 0.5s, fade out 0.5s 2.5s;
}

#form-group-graph {
  box-sizing: border-box;
  display: unset;
  min-width: none;
  flex: unset;
}
#crop-customDuration {
  width: 30%;
}

#form-group-graph button {
  padding: 0.4em 1em;
}

.modalPopUp {
  display: flex;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100%;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.6);
}

.modalPopUpContent {
  background-color: rgba(244, 244, 244, 0.992);
  backdrop-filter: blur(10px);
  margin: 8% auto;
  padding: 20px;
  border: 1px solid #03a007;
  width: 50%;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

.titleContent-header {
  background-color: #03a007;
  padding: 10px;
  display: flex;
  width: 100%;
  margin-bottom: 1em;
  color: white;
  text-shadow: 2px 1px 0px rgba(0, 0, 0, 0.6);
  position: sticky;
}

.titleContent-start {
  font-size: 1em;
  width: 50%;
  font-weight: bold;
}

.titleContent-end {
  width: 50%;
  text-align: end;
}
.titleContent table {
  vertical-align: middle;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: stretch;
}

.titleContent th {
  background-color: #03a007;

  color: rgb(14, 59, 74);
  padding: 10px;
  width: 14vw;
}

/* Container for scrollable table */
.tableContent {
  max-height: 50vh;
  overflow-y: auto;
  width: 100%;
  box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px,
    rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
}

/* Table styling */
.tableContent table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}

.tableContent thead {
  position: sticky;
  top: 0;
  background: white;
}

/* Cell alignment */
.tableContent th,
.tableContent td {
  padding: 0px;
  text-align: center;
  width: auto; 
}

.tableContent th,
.tableContent td {
  padding: 6px;
}

.tableContent td {
  overflow-x: auto;
}

.tableContent tr:hover {
  background-color: #dbdbdb;
}

.tableContent-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em;
}

.tableContent-flex-left {
  display: flex;
  align-items: flex-start;
  flex: 1;
}

.tableContent-flex-left span {
  color: #4d4d4d;
}

.tableContent-flex-format {
  display: flex;
  flex-direction: column;
}

.tableContent-flex-right {
  display: flex;
}

.tableContent-button button {
  margin: 0px 0px 0px 10px;
}

#tableContent-delete {
  background-color: transparent;
  border: 1px solid rgb(134, 134, 134);
  color: #242424;
}

#tableContent-delete:hover {
  background-color: #f91e1efa;
  color: #ffe8e8;
}

#tableContent-cancel {
  background-color: transparent;
  color: #242424;
  width: 100%;
  margin: 0.4em 0.4em;
}

#tableContent-cancel:hover {
  background-color: #b0b0b0;
}

#tableContent-button2:hover {
  background-color: #65d10c;
  color: white;
}

.modalPopDown {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.modalPopDown:hover,
.modalPopDown:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* for clicking cells in modal */
.selected {
  background-color: #7fb29d;
  font-weight: bold;
  color: #293b3b;
}

.selected:hover {
  background-color: #6fa28d !important;
}

.crop-fieldButton {
  margin-bottom: 0.4em;
  color: #f9f9f9;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px,
    rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;

  background: linear-gradient(45deg, #03a007, #48cb1d, #389e3c);
  background-size: 200% 200%;

  animation: gradientPulse 3s ease infinite;
  transition: transform 0.2s;
}

@keyframes gradientPulse {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.crop-fieldButton:hover {
  animation: gradientPulse 2.5s ease infinite;
  transform: translateY(-1px);
}

.crop-fieldButton:active {
  transform: translateY(1px);
}

.crop-singleField {
  min-width: 15em;
  width: 80%;
}

.graphButtonField {
  display: flex;
  flex-direction: column;
}

.graphRowField {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.graphRowField div {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
}

.graphRowField button {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
}

.graphRowField button:active {
  background-color: white;
}

.crop-singleField .form-group {
  flex-direction: column;
  align-items: flex-start;
}

.crop-singleField .form-group label {
  margin: 5px 0px;
}

.crop-singleField .form-group textarea {
  width: 100%;
  padding: 10px;
  overflow-x: scroll;
}

.crop-singleField button {
  width: 100%;
}

.form-group small {
  color: #626f62;
}

.form-group small:nth-of-type(2) {
  color: #4c554c;
}

.form-group-row {
  width: 100%;
  display: flex;
  flex-direction: row !important;
  align-items: center;
  margin: 0.5em 0em;
}

.form-group-row small {
  width: 70%;
  align-self: flex-start;
}

.form-group-row button {
  width: 30%;
  align-self: flex-end;
}

.tippy-box[data-theme~='custom'] {
  background-color: rgba(197, 214, 221, 0.9);
  border: 2px solid rgba(13, 146, 44, 0.8);
  border-radius: 6px;
  color: rgb(57, 57, 57);
  font-size: 14px;
  max-width: 300px;
}

.tippy-box[data-theme~='custom'] .tippy-content {
  padding: 12px;
}

.tippy-box[data-theme~='custom'] .tippy-content .tippyBody {
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
}

.tippy-box[data-theme~='custom'] .tippy-content .tippyBody span {
  font-weight: 600;
  margin: 0.2em 0em 0.1em 0em;
  color: rgb(2, 26, 8);
}

.tippy-box[data-theme~='custom'] .tippy-content .tippyBody .tippyHeading {
  display: inline-block;
  font-weight: 700;
  margin: 0.2em 0em 0.1em 0em;
  color: rgb(201, 213, 204);
  background-color: #137c25;
  width: 100%;
  padding: 2px;

  
}

.tippy-box[data-theme~='custom'] .tippy-content .tippyBody .tippySection {
  margin: 0.5em 0em 0em 0em;
  border-radius: 10px;
  padding: 4px;
}

/*arrow only, style*/
.tippy-box[data-theme~='custom'] .tippy-arrow {
  color: rgba(197, 214, 221, 0.9);
}

.tippy-box[data-theme~='custom'] .tippy-arrow::before {
  border-top-color: rgba(13, 146, 44, 0.8);
  border-bottom-color: rgba(13, 146, 44, 0.8);
  border-left-color: rgba(13, 146, 44, 0.8);
  border-right-color: rgba(13, 146, 44, 0.8);
}

@media (max-width: 768px) {
  body {
    overflow-y: scroll;
    min-height: 100vh;
    font-size: 3vw;
    display: block;
  }

  .Main-container {
    max-width: fit-content;
    width: 100vw;
    height: 90%;
    place-content: center;
    align-items: center;
    justify-content: center;
  }

  .Main-container-content {
    width: 80%;
    height: 90vh;
  }
  .header {
    height: 20%;
    margin-bottom: 0px;
  }
  .content-container {
    margin-top: 0px;
    flex-wrap: wrap;
  }

  .Calculator-container {
    max-height: 28rem;
    flex-basis: 1rem;
    max-width: 100%;
  }

  #crop-list-table {
    width: 40%;
    max-height: 28rem;
    border: 1px solid red;
  }

  .list-container {
    max-height: 30rem;
    max-width: 100%;
  }

  input {
    width: 20%;
    height: 5%;
    padding: 0.01em;
  }

  #list-search {
    height: 5%;
    width: 50%;
  }

  .graph-container {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .Main-container-content {
    height: 90%;
  }

  .header {
    position: sticky;
    top: 0;
    margin-bottom: 6rem;
    width: 100vw;
    backdrop-filter: blur(5px);
  }

  .content-container {
    width: 100%;
    flex-direction: column;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #03a007;
    color: #ffffff;
  }

  button:hover {
    background-color: #65d10c;
  }
}
