diff --git a/frontend/css/styles.css b/frontend/css/styles.css index 89833be..b9917e0 100644 --- a/frontend/css/styles.css +++ b/frontend/css/styles.css @@ -230,6 +230,7 @@ body { /* Form elements */ .form-group { + position: relative; margin-bottom: 14px; } @@ -771,6 +772,13 @@ select { display: flex; flex-direction: column; gap: 6px; + max-height: calc(100vh - 209px - var(--safe-area-top) - var(--safe-area-bottom)); + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +.prod-list .prod-card { + flex-shrink: 0; } /* Product card — collapsed */ @@ -876,8 +884,61 @@ select { } /* Modal product search */ +.search-dropdown { + position: absolute; + left: 0; + right: 0; + z-index: 100; + max-height: 60vh; + overflow-y: auto; + background: var(--surface); + border: 1px solid var(--border); + border-radius: var(--radius); + box-shadow: 0 4px 16px rgba(0,0,0,0.5); + -webkit-overflow-scrolling: touch; +} + +.search-dropdown .sd-item, +.search-dropdown .modal-prod-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 12px; + cursor: pointer; + border-bottom: 1px solid var(--border); + font-size: 14px; +} +.search-dropdown .sd-item:active, +.search-dropdown .modal-prod-item:active { + background: rgba(255,255,255,0.05); +} +.sd-item-kcal { + color: var(--muted); + font-size: 13px; + white-space: nowrap; + margin-left: 8px; +} + +.search-dropdown .prod-card { + border: none; + border-bottom: 1px solid var(--border); + border-radius: 0; + background: transparent; +} + .modal-search-results { - margin-top: 4px; + position: absolute; + left: 0; + right: 0; + z-index: 100; + max-height: 50vh; + overflow-y: auto; + margin-top: 2px; + background: var(--surface); + border: 1px solid var(--border); + border-radius: var(--radius); + box-shadow: 0 4px 16px rgba(0,0,0,0.5); + -webkit-overflow-scrolling: touch; } .modal-prod-item { diff --git a/frontend/js/main.js b/frontend/js/main.js index b0a2884..6b9d14c 100644 --- a/frontend/js/main.js +++ b/frontend/js/main.js @@ -447,11 +447,7 @@ function showFoodModal() { showModal(`