body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
}

ul {
  padding: 0;
}

.header,
.main {
  padding: 0 10%;
}

.header {
  background-color: #4caf50;
  color: white;
  text-align: center;
  padding: 15px 0;
}

main {
  padding: 30px;
}

h2 {
  color: #4caf50;
}

.date-selector {
  margin-top: 15px;
  position: relative;
}

.date-selector__value {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.clear-diary-btn {
  margin-top: 20px;
}

.meal-block {
  margin-top: 30px;
}

.meal-block__title {
  color: #4caf50;
}

.food-list__heading,
.summary__haeding,
.summary__values {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.2fr;
}

.summary__button-container {
  text-align: start;
}

.food-list__heading {
  background-color: #4caf50;
  color: white;
  padding:8px;
  margin-top: 15px;
}

.product {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 0.2fr;
  border-bottom: 1px solid #ddd;
  padding: 8px 0;
}

.product__info {
  display: flex;
  justify-content: space-between;
}

.product__title,
.product__weight,
.product__protein,
.product__fats,
.product__carbohydrates,
.product__calories {
  padding: 8px;
}

.button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.button:hover {
  background-color: #45a049;
}

.product__remove {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
}

.product__remove:hover {
  background-color: #d32f2f;
}

.summary__values {
  height: 50px;
}

.summary__haeding {
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 5px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal_shown {
  display: block;
}

.modal__content {
  background-color: white;
  padding: 20px;
  margin: 5% auto;
  width: 60%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal_narrow .modal__content {
  width: 15%;
}

.modal__close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal__close-btn:hover,
.modal__close-btn:focus {
  color: black;
}

.modal__submit-btn {
  margin-top: 20px;
}

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

.modal__form label {
  margin-top: 10px;
}

.modal-form input,
.modal-form select {
  margin-bottom: 10px;
  padding: 8px;
}

.modal__add-product-btn {
  margin-top: 20px;
}

.no-overflow {
  overflow: hidden;
}

.histogram {
  position: relative;
  width: 600px;
  height: 300px;
  margin-bottom: 20px;
  margin-left: 25px;
}

.histogram__bars {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid black;
  border-left: 1px solid black;
  height: 100%;
}

.histogram__bar {
  height: 300px;
  width: 30px;
  background-color: #4caf50;
  position: relative;
}

.histogram__value-tooltip {
  position: absolute;
  display: none;
  width: 80px;
  height: 20px;
  top: -30px;
  right: -25px;
  text-align: center;
  border-radius: 2px;
  z-index: 1;

}

.histogram__bar:hover .histogram__value-tooltip {
  display: block;
}

.histogram__dates {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.histogram__date {
  width: 30px;
  text-align: center;
  font-size: 10px;
}

.histogram__y-ticks {
  position: absolute;
  left: -2px;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.histogram__y-tick {
  width: 5px;
  height: 1px;
  background-color: black;
  position: relative;
}

.histogram__y-label {
  font-size: 10px;
  position:absolute;
  left: -25px;
  bottom: -5px;
}

.daily-calorie-intake-warning {
  color: #45a049;
}

.daily-calorie-intake-warning_not-ok {
  color: orangered;
}
