@font-face { font-family: 'Material Icons'; font-style: normal; font-weight: 400; src: url("/icons.ttf"); src: local('Material Icons'), local('MaterialIcons-Regular'), url("/icons.ttf") format('truetype'); } .material-icons { transform: translateY(0.1em); font-family: 'Material Icons'; font-weight: normal; font-style: normal; font-size: 1em; /* Preferred icon size */ display: inline-block; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; user-select: none; /* Support for all WebKit browsers. */ /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; /* Support for IE. */ font-feature-settings: 'liga'; } * { margin: 0; padding: 0; } html, body { min-height: 100vh; font-size: 100%; } header { font-size: 1.5rem; line-height: 5em; text-align: center; background-color: #add8e6; color: #333; } #food-search-container { margin: 1em; text-align: center; } #food-search { margin-bottom: 0.25em; border: 1px solid darkgray; border-radius: 0.15em; padding: 0.25em; outline: 0; box-sizing: border-box; width: 20rem; max-width: 100%; } #search-entries { margin: 0 auto; max-width: 100%; display: flex; flex-wrap: wrap; gap: 0.25em; justify-content: center; } .search-entry { background-color: #eee; border: 1px solid darkgray; padding: 0.15em; border-radius: 0.15em; cursor: pointer; transition: all 0.25s ease-in-out; } .search-entry:hover { background-color: #ddd; transition: all 0.25s ease-in-out; } #food-menu, #summary { width: 60em; max-width: 100%; margin: 0 auto; } .menu-item { padding: 0.5em; box-sizing: border-box; } .menu-item:not(:last-child) { border-bottom: 1px solid lightgray; } .delete-menu-item, .summary-delete-icon { display: block; float: right; color: #cc3d3d; width: 1.5em; height: 1.5em; text-align: center; cursor: pointer; transition: all 0.25s ease-in-out; } .delete-menu-item:hover, .delete-menu-item:focus { scale: 1.5; transition: all 0.25s ease-in-out; } .menu-item-kcal { color: #333; font-size: 0.65em; transform: translateY(-0.15em); display: inline-block; } .menu-item-amount-container, .summary-amount-container { float: right; margin-right: 0.2em; } .menu-item-amount, .summary-amount { font-size: 1rem; border: 1px solid lightgray; box-sizing: border-box; outline: 0; width: 3em; text-align: right; margin-left: 0.3em; border-radius: 0.2em; } .menu-item-unit, .summary-unit { display: inline-block; margin-left: 0.2em; min-width: 1.5em; transform: translateX(-0.1em); } .menu-item-amount:hover, .menu-item-amount:focus { border: 1px solid darkgray; } .menu-item-amount:invalid { border: 1px solid red; } /* Chrome, Safari, Edge, Opera */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Firefox */ input[type=number] { -moz-appearance: textfield; } @keyframes highlight { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } .menu-item-kcal-unit, .summary-kcal-unit { margin-right: 0.25em; } .menu-item-kcal-for-amount, .menu-item-kcal-unit { color: #555; } #summary { border-top: 1px solid black; padding: 0.5em; box-sizing: border-box; } .summary-amount, .summary-unit, .summary-delete-icon, .summary-kcal-unit-sep { visibility: hidden; } .summary-kcal, .summary-kcal-unit, .summary-name { display: inline; font-weight: bold; } .menu-item-info-container { margin-right: 1em; position: relative; float: right; } .menu-item-info-hover-button { color: #333; font-size: 0.75em; text-decoration: underline; } .menu-item-info { z-index: 1; left: 0; display: none; width: 12em; position: absolute; background-color: #eee; border: 1px solid darkgray; box-sizing: border-box; border-radius: 0.15em; padding: 0.25em 0; } .menu-item-info > div { display: flex; flex-direction: row; justify-content: space-between; padding: 0 0.25em; } .menu-item-info-energy { padding-top: 0.35em !important; } .menu-item-info-hover-button { cursor: pointer; user-select: none; } .menu-item-info-hover-button:hover + .menu-item-info { display: block; } .menu-item-kcal-for-amount { text-align: right; display: inline-block; min-width: 3em; } .menu-item-info-unit { display: block !important; padding-bottom: 0.35em !important; text-align: center; font-weight: bold; border-bottom: 1px solid darkgray; } .menu-item-info-sugar { padding-left: 0.25em; } .menu-item-score { float: right; margin-right: 1em; font-size: 0.9rem; padding: 0em 0.5em; border-radius: 0.25em; color: white; user-select: none; } .menu-item-score.green { background-color: darkgreen; } .menu-item-score.orange { background-color: #e57e00; } .menu-item-score.red { background-color: darkred; }