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

button {
  cursor: pointer;
}

p {
  margin: 0;
}

input {
  height: 1.5rem;
  /* min-width: 5rem; */
  /* width: 80px; */
}

select,
option {
  cursor: pointer;
}

.invisible {
  display: none !important;
}

table.table-default {
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid rgb(150, 150, 150);
}

table.table-con-totali tfoot {
  background-color: rgb(241, 241, 241);
}

table.table-con-totali tfoot tr td {
  border-top: 1px solid black;
  font-weight: bold;
}

table.table-con-totali tfoot tr td:nth-child(1) {
  text-align: right;
}

table.table-default td,
table.table-default th {
  padding: 0.4rem;
}

table.table-default tbody tr:nth-child(even) {
  background-color: rgb(244, 244, 244);
}

table.table-default thead th:not(:nth-last-child(1)),
table.table-default tbody td:not(:nth-last-child(1)) {
  border-right: 1px solid lightgray;
}

table.table-default thead tr th {
  border-bottom: 2px solid rgb(144, 144, 144);
  background-color: rgb(211, 231, 249);
}

table.table-default thead tr th:nth-last-child(1),
table.table-default tbody tr td:nth-last-child(1) {
  text-align: right;
}

/* the cells of the last row */
table.table-default tbody tr:nth-last-child(1) td {
  border-bottom: 1px solid lightgray;
}

table.table-default tfoot {
  font-weight: bold;
}

table.table-default tfoot td {
}

.icon-big {
  font-size: 1.5rem;
}

header {
  background-color: rgb(78, 78, 78);
  height: 20%;
  color: white;
  text-align: center;
  font-size: 1.5rem;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

header > .wrapper {
  /* display: inline-block;
    margin: auto; */
  padding-block: 1rem;
}

header > .wrapper > p + p {
  font-size: 1rem;
  font-style: italic;
  margin-top: 0.5rem;
}

#select-recipe {
  height: 2rem;
  margin-top: 1rem;
}

/* BUTTONS */

.button-std {
  font-size: .8rem;
  border: 0;
  border-radius: .6rem;
  padding: .8rem;
  color: white;
}

.button-info {
  background-color: rgb(48, 106, 178);
}

.button-info:hover {
  background-color: rgba(48, 107, 178, 0.647);
}

.button-success {
  background-color: rgb(64, 165, 64);
}

.button-success:hover {
  background-color: rgba(64, 165, 64, 0.688);
}

.button-danger {
  background-color: rgb(243, 43, 43);
}

.button-danger:hover {
  background-color: rgba(243, 43, 43, 0.743);
}

/* MAIN */

@media screen and (width > 900px) {
  main {
    display: flex;
    flex-direction: column;
    /* min-height: 700px; */
    /* min-width: 300px; */
    width: 50%;
    padding: 0.2rem;
    /* border: 1px solid black; */
    margin: 2rem auto;
    gap: 2rem;
  }
}

@media screen and (width > 700px) and (width < 900px) {
  main {
    display: flex;
    flex-direction: column;
    /* min-height: 700px; */
    /* min-width: 300px; */
    width: 70%;
    padding: 0.2rem;
    /* border: 1px solid black; */
    margin: 2rem auto;
    gap: 2rem;
  }
}

@media screen and (width <= 700px) {
  main {
    display: flex;
    flex-direction: column;
    /* min-height: 700px; */
    /* min-width: 300px; */
    width: 95%;
    padding: 0.2rem;
    /* border: 1px solid black; */
    margin: 2rem auto;
    gap: 2rem;
  }
}

main > .row {
  padding: 0.2rem;
  border: 2px solid black;
  /* max-height: 500px; */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-radius: 0.3rem;
  background-color: rgb(252, 252, 252);
  box-shadow: 1px 4px 1px rgba(71, 71, 71, 0.651);
}

main > .row:not(:last-child) {
  /* margin-bottom: 1rem; */
}

main > .row > .head {
  display: flex;
  flex-direction: column;
  padding: 0.7rem;
  flex: 0.1;
  gap: 0.7rem;
  border: 1px solid black;
  background-color: antiquewhite;
}

main > .row > .head > * {
}

main > .row > .head > .title {
  flex: 0.2;
}

main > .row > .head > .title > p {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

main > .row > .head > .description {
  flex: 1;
  font-size: 0.8rem;
  color: rgb(89, 89, 89);
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

main > .row > .body {
  flex: 1;
  /* border: 1px solid black; */
}

main > .row > .body > .row-arrow {
  text-align: center;
  border: 0;
  font-size: 2rem;
}

main > .row-menu {
  display: flex;
  justify-content: center;
  text-align: center;
  border: 0;
  box-shadow: 0 0 0 0;
  background-color: white;
}

main > .row-menu > a {
  display: inline;
}

main > .row-legend {
}

main > .row-legend > .body {
  padding: 1rem;
}

main > .row-legend > .body > .row > p:not(:last-child) {
  margin-bottom: 1rem;
}

main > .row-esempio {
}

main > .row-esempio > .body {
  overflow-y: auto;
}

main > .row-esempio > .body > .bottoni {
  text-align: center;
  padding: 0.4rem;
  border-bottom: 1px solid lightgray;
}

main > .row-esempio > .body > .bottoni > button.avvia-esempio {
  cursor: pointer;
  font-size: 2rem;
  background-color: rgb(202, 230, 194);
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  border-radius: 0.5rem;
}

main > .row-esempio > .body > .bottoni > button.avvia-esempio:hover {
  background-color: rgb(251, 220, 180);
}

main > .row-esempio > .body > .esempio {
}

main > .row-esempio > .body > .esempio > p {
  white-space: pre;
  width: 100%;
}

/* ROW RICETTA */

main > .row-ricetta > .body {
  display: flex;
  flex-direction: column;
}

main > .row-ricetta > .body > .row-more-actions {
  display: flex;
  justify-content: center;
}

main > .row-ricetta > .body > .row-more-actions > * {
}

main > .row-ricetta > .body > .row-more-actions select {
  height: 30px;
}

main > .row-ricetta > .body > .row-more-actions input {
  width: 50px;
}

main > .row-ricetta > .body > .row-input > .content > .ricetta {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* main > .row-ricetta > .body > .ricetta > * {

} */

main > .row-ricetta > .body > .row-input > .content > .ricetta > .nome {
  text-align: center;
}

main > .row-ricetta > .body > .row-input > .content > .ricetta > .campi {
}

main > .row-ricetta > .body > .row-input > .content > .ricetta > .campi > table {
  width: 100%;
  margin: auto;
}

main > .row-ricetta > .body > .row-input > .content > .ricetta > .aggiungi-campo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.1rem;
}

main > .row-ricetta > .body > .row-input > .content > .ricetta > .aggiungi-campo > input {
  width: max-content;
}

main > .row-ricetta > .body > .row-input > .content > .ricetta > .aggiungi-campo > button {
  font-size: 1.5rem;
}

main > .row-ricetta > .body > .row-input > .content > .ricetta > .aggiungi-campo > * {
  cursor: pointer;
}

/* ROW: HO INGREDIENTE */

main > .row-ho-ingrediente {
}

main > .row-ho-ingrediente > .body,
main > .row-ho-tot > .body,
main > .row-ricetta > .body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.1rem;
}

main > .row-ho-ingrediente > .body > *,
main > .row-ho-tot > .body > *,
main > .row-ricetta > .body > * {
  /* border: 1px solid black; */
}

main > .row-ho-ingrediente > .body > .row-input,
main > .row-ho-tot > .body > .row-input,
main > .row-ricetta > .body > .row-input {
  flex: 0.1;
  display: flex;
  flex-direction: column;
}

main > .row-ricetta > .body > .row-options-recipe {
  display: flex;
  flex-direction: column;
  text-align: center;
}

main > .row-ricetta > .body > .row-options-recipe {
}

/* boxes: choose, add */
main > .row-ricetta > .body > .row-options-recipe > * {
  padding: 2rem;
}

main > .row-ricetta > .body > .row-options-recipe > * > p {
  font-size: 1.5rem;
}

main > .row-ricetta > .body > .row-options-recipe > * button {
  font-size: 1.5rem;
}

main > .row-ricetta > .body > .row-save {
  display: flex;
  justify-content: space-around;
}

main > .row-ricetta > .body > .row-save > div:nth-of-type(1) {
  /* flex: 1; */
  /* display: flex; */
  /* justify-content: center; */
}

main > .row-ricetta > .body > .row-save > div:nth-of-type(2) {
  /* margin-left: auto; */
}

main > .row-ho-ingrediente > .body > .row-input > .title,
main > .row-ho-ingrediente > .body > .row-output > .title,
main > .row-ho-tot > .body > .row-input > .title,
main > .row-ho-tot > .body > .row-output > .title,
main > .row-ricetta > .body > .row-input > .title,
main > .row-ricetta > .body > .row-output > .title {
  /* flex: 0.1; */
  border-bottom: 1px solid lightgray;
  font-weight: bold;
  padding: 0.2rem;
  text-align: center;
  background-color: rgb(207, 232, 240);

  /* font-size: 1.2rem; */
}

main > .row-ricetta > .body > .row-save-as-pdf,
main > .row-ho-ingrediente > .body > .row-save-as-pdf,
main > .row-ho-tot > .body > .row-save-as-pdf {
  text-align: center;
  border: 0;
}

main > .row-ricetta > .body > .row-save-as-pdf > button,
main > .row-ho-ingrediente > .body > .row-save-as-pdf > button,
main > .row-ho-tot > .body > .row-save-as-pdf > button {
  font-size: 1.5rem;
}

main > .row-ho-ingrediente > .body > .row-input > .content,
main > .row-ho-tot > .body > .row-input > .content,
main > .row-ricetta > .body > .row-input > .content {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

main > .row-ho-ingrediente > .body > .row-output,
main > .row-ho-tot > .body > .row-output,
main > .row-ricetta > .body > .row-output {
  flex: 1;
}

main > .row-ho-ingrediente > .body > .row-output > .content,
main > .row-ho-tot > .body > .row-output > .content,
main > .row-ricetta > .body > .row-output > .content {
  padding-bottom: 0.5rem;
}

main > .row-ho-ingrediente > .body > .row-output > .content > .table-container,
main > .row-ho-tot > .body > .row-output > .content > .table-container,
main > .row-ricetta > .body > .row-output > .content > .table-container {
  width: 100%;
  margin: auto;
  margin-top: 1rem;
}

main > .row-ho-ingrediente > .body > .row-output > .content > .table-container > table,
main > .row-ho-tot > .body > .row-output > .content > .table-container > table,
main > .row-ricetta > .body > .row-output > .content > .table-container > table {
  width: 100%;
  /* min-width: 300px; */
  overflow-wrap: break-word;
}

/* at first, the user is shown the options to choose a recipe, so
the other containers are hidden */
main > .row-ricetta > .body > .row-input,
main > .row-ricetta > .body > .row-output,
main > .row-ricetta > .body > .row-save-as-pdf {
}

main > .row-ho-tot {
}

footer {
}
