:root {
  --main-color: #71ad85;
  --second-color: #1b6433;
  --third-color: #e5ffee;
}

html {
  height: 100%;
  margin: 0;
  scrollbar-color: var(--second-color) var(--main-color);
  min-height: 100%;
  min-width: 100%;
  font-family: "Playfair Display", serif;
  background: linear-gradient(var(--third-color), #d9ffe6);
}

body {
  min-height: 100%;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  background: linear-gradient(var(--third-color), #d9ffe6);
}

main {
  flex: 1;
}

header {
  margin-top: 30px;
  font-size: 20px;
  color: var(--second-color);
}

.grid-container {
  display: grid;
  margin: 40px auto 0 auto;
}

.ingredients-container {
  display: grid;
  width: 50%;
  margin: auto;
}

label {
  margin-bottom: 10px;
  font-size: 22px;
  color: var(--second-color);
}

#ingredients-txtarea {
  height: 100px;
  font-family: "Playfair Display", serif;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid white;
  box-shadow: 2px 2px 5px var(--second-color);
}

#ingredients-txtarea:focus {
  outline: 2px solid var(--main-color);
}

.separator {
  margin: 30px 0 10px 0;
  font-size: 20px;
  font-weight: bold;
}

.products-container {
  display: flex;
  margin: 0 14%;
}

.brand-container,
.product-container,
.ingredients-list-container {
  display: grid;
  margin: auto;
}

.custom-select {
  position: relative;
  width: 100%;
  text-transform: capitalize;
}

#brand-input,
#product-input {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  background: var(--main-color);
  border-radius: 20px;
  border: none;
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  text-align: center;
  text-transform: capitalize;
  box-shadow: 2px 2px 5px var(--second-color);
}

#brand-input:focus,
#product-input:focus {
  outline: 2px solid var(--second-color);
}

#product-input:disabled,
.check-btn:disabled,
.check-btn:disabled:hover {
  background-color: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  color: #666;
  opacity: 0.5;
}

.options-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--main-color);
  border-radius: 10px;
  margin-top: 5px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.option-item {
  padding: 10px 20px;
  color: white;
  cursor: pointer;
}

.option-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ingredients-list-container,
.results-container {
  opacity: 0;
  height: 0;
}

.ingredients-list,
.results {
  width: 50%;
  text-align: justify;
  margin: auto;
}

.check-btn {
  margin: 50px auto 10px auto;
  padding: 15px 30px;
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  color: white;
  background: var(--second-color);
  width: fit-content;
  cursor: pointer;
  border-radius: 25px;
  border: none;
  box-shadow: 2px 2px 5px var(--second-color);
}

.check-btn:hover {
  box-shadow: 4px 4px 3px var(--second-color),
    inset 2px 2px 3px var(--second-color);
}

.results-container {
  display: grid;
}

.results {
  text-align: center;
  font-size: 17px;
}

.results-container table {
  margin: 20px auto;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 15px;
  overflow: hidden;
  text-transform: capitalize;
  box-shadow: 2px 2px 5px var(--second-color);
  border: 1px solid white;
}

.results-container th {
  background: var(--main-color);
  font-weight: bold;
  color: white;
  font-size: 17px;
}

.results-container th,
.results-container td {
  border: 1px solid var(--second-color);
  padding: 8px;
  border: none;
}

.results-container table tr:nth-child(even) {
  background: white;
}

.results-container th:first-child {
  border-top-left-radius: 15px;
}
.results-container th:last-child {
  border-top-right-radius: 15px;
}

.results-container tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}
.results-container tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.red {
  background-color: red;
}

.legend-dot.orange {
  background-color: orange;
}

.legend-dot.yellow {
  background-color: yellow;
}

footer {
  text-align: center;
  padding: 15px 0;
  width: 100%;
  font-size: 16px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
}
