meals support
This commit is contained in:
+188
-9
@@ -39,6 +39,17 @@ a { color: inherit; }
|
||||
|
||||
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
|
||||
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px 11px 11px 3px; background: var(--deep-sage); color: white; transform: rotate(-6deg); }
|
||||
.site-nav { display: flex; align-items: center; gap: 6px; }
|
||||
.site-nav a {
|
||||
padding: 8px 14px;
|
||||
border-radius: 11px;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
font-size: .9rem;
|
||||
font-weight: 700;
|
||||
transition: color .16s ease, background .16s ease;
|
||||
}
|
||||
.site-nav a:hover { color: var(--ink); background: #eef2ea; }
|
||||
.account-nav { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: .9rem; }
|
||||
.user-name { color: var(--ink); font-weight: 700; }
|
||||
.text-button { border: 0; padding: 0; color: var(--deep-sage); background: transparent; cursor: pointer; font-weight: 700; }
|
||||
@@ -63,6 +74,8 @@ h3 { margin-bottom: 6px; font-size: 1rem; }
|
||||
.stack label { color: var(--muted); font-size: .82rem; font-weight: 700; }
|
||||
input { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--ink); background: #fff; }
|
||||
input:focus { border-color: var(--deep-sage); box-shadow: 0 0 0 4px rgba(85, 113, 93, .12); }
|
||||
textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--ink); background: #fff; font: inherit; resize: vertical; }
|
||||
textarea:focus { border-color: var(--deep-sage); box-shadow: 0 0 0 4px rgba(85, 113, 93, .12); }
|
||||
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border: 0; border-radius: 12px; cursor: pointer; text-decoration: none; font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
|
||||
.button:hover { transform: translateY(-1px); }
|
||||
.button-primary { color: #fff; background: var(--deep-sage); box-shadow: 0 8px 18px rgba(85, 113, 93, .2); }
|
||||
@@ -94,6 +107,13 @@ input:focus { border-color: var(--deep-sage); box-shadow: 0 0 0 4px rgba(85, 113
|
||||
.list-topbar-actions { display: flex; align-items: center; gap: 12px; }
|
||||
.live-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--deep-sage); font-size: .78rem; font-weight: 800; }
|
||||
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #75ae6e; box-shadow: 0 0 0 4px rgba(117, 174, 110, .15); }
|
||||
.add-meal-button {
|
||||
color: #fff;
|
||||
background: var(--deep-sage);
|
||||
box-shadow: 0 8px 18px rgba(85, 113, 93, .25);
|
||||
}
|
||||
.add-meal-button:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(85, 113, 93, .32); }
|
||||
.add-meal-button:active { transform: translateY(0); }
|
||||
.list-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(265px, .72fr); gap: 22px; align-items: start; }
|
||||
.list-panel { min-width: 0; }
|
||||
.list-heading { display: flex; justify-content: space-between; margin-bottom: 25px; }
|
||||
@@ -112,14 +132,71 @@ input:focus { border-color: var(--deep-sage); box-shadow: 0 0 0 4px rgba(85, 113
|
||||
.check-form { flex: 0 0 auto; }
|
||||
.check-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 2px solid #c8d6c1; border-radius: 9px; color: #fff; background: transparent; cursor: pointer; font-size: .88rem; font-weight: 900; }
|
||||
.is-checked .check-button { border-color: var(--deep-sage); background: var(--deep-sage); }
|
||||
.item-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
|
||||
.item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.item-copy small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
|
||||
.item-copy { display: grid; grid-template-columns: auto 1fr; flex: 1; min-width: 0; gap: 2px 7px; align-items: baseline; }
|
||||
.item-copy strong { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.item-qty { grid-column: 1; grid-row: 1; color: var(--muted); font-weight: 700; white-space: nowrap; }
|
||||
.item-copy small { grid-column: 1 / -1; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
|
||||
.is-checked .item-copy strong { color: var(--muted); text-decoration: line-through; }
|
||||
.item-actions { position: relative; }
|
||||
.item-actions summary { padding: 7px 5px; color: var(--muted); cursor: pointer; list-style: none; font-size: .78rem; letter-spacing: 2px; }
|
||||
.item-actions summary::-webkit-details-marker { display: none; }
|
||||
.item-menu { position: absolute; z-index: 2; right: 0; width: min(265px, 80vw); padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow); }
|
||||
.item-actions-button {
|
||||
flex: 0 0 auto;
|
||||
padding: 7px 8px;
|
||||
border: 0;
|
||||
border-radius: 9px;
|
||||
color: var(--muted);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
font-size: .9rem;
|
||||
letter-spacing: 2px;
|
||||
line-height: 1;
|
||||
}
|
||||
.item-actions-button:hover { color: var(--ink); background: #f0f3ea; }
|
||||
/* Rendered markdown (meal descriptions) */
|
||||
.markdown { line-height: 1.6; color: var(--ink); }
|
||||
.markdown p { margin: 0 0 12px; }
|
||||
.markdown ul, .markdown ol { margin: 0 0 12px; padding-left: 22px; }
|
||||
.markdown li { margin-bottom: 4px; }
|
||||
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 18px 0 8px; letter-spacing: -.02em; }
|
||||
.markdown h1 { font-size: 1.5rem; }
|
||||
.markdown h2 { font-size: 1.25rem; }
|
||||
.markdown h3 { font-size: 1.1rem; }
|
||||
.markdown code { padding: 2px 5px; border-radius: 6px; background: #eef2ea; font-size: .9em; }
|
||||
.markdown pre { padding: 12px; border-radius: 12px; background: #eef2ea; overflow-x: auto; }
|
||||
.markdown pre code { padding: 0; background: transparent; }
|
||||
.markdown blockquote { margin: 0 0 12px; padding-left: 14px; border-left: 3px solid var(--sage); color: var(--muted); }
|
||||
.markdown a { color: var(--deep-sage); text-decoration: underline; }
|
||||
/* Meal ingredient list */
|
||||
.ingredient-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
|
||||
.ingredient-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-height: 52px;
|
||||
padding: 8px 6px 8px 4px;
|
||||
border-bottom: 1px solid #edf0e6;
|
||||
}
|
||||
.ingredient-list li:last-child { border-bottom: 0; }
|
||||
/* Item / ingredient edit modal */
|
||||
.item-modal {
|
||||
width: min(100%, 420px);
|
||||
padding: 0;
|
||||
border: 1px solid rgba(221, 225, 210, .9);
|
||||
border-radius: 24px;
|
||||
background: rgba(255, 253, 248, .98);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.item-modal::backdrop {
|
||||
background: rgba(37, 53, 46, .28);
|
||||
}
|
||||
.item-modal-card { padding: 22px 24px 24px; }
|
||||
.item-modal-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.item-modal-header h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
|
||||
.item-modal .stack { margin-bottom: 14px; }
|
||||
.edit-form { margin-bottom: 12px; }
|
||||
.edit-form input { min-height: 38px; padding: 7px 10px; font-size: .85rem; }
|
||||
.danger-link { padding: 0; border: 0; color: var(--coral); background: none; cursor: pointer; font-size: .8rem; font-weight: 800; }
|
||||
@@ -153,9 +230,109 @@ input:focus { border-color: var(--deep-sage); box-shadow: 0 0 0 4px rgba(85, 113
|
||||
|
||||
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
||||
|
||||
/* Meal picker modal */
|
||||
.meal-picker-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 20px;
|
||||
background: rgba(37, 53, 46, .28);
|
||||
animation: meal-picker-fade .15s ease;
|
||||
}
|
||||
@keyframes meal-picker-fade { from { opacity: 0; } to { opacity: 1; } }
|
||||
.meal-picker-modal {
|
||||
width: min(100%, 460px);
|
||||
max-height: min(78vh, 620px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(221, 225, 210, .9);
|
||||
border-radius: 24px;
|
||||
background: rgba(255, 253, 248, .98);
|
||||
box-shadow: var(--shadow);
|
||||
animation: meal-picker-pop .18s ease;
|
||||
}
|
||||
@keyframes meal-picker-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
|
||||
.meal-picker-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 22px 24px 16px;
|
||||
border-bottom: 1px solid #edf0e6;
|
||||
}
|
||||
.meal-picker-header .eyebrow { margin-bottom: 5px; }
|
||||
.meal-picker-header h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -.02em; }
|
||||
.meal-picker-close {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
flex: 0 0 auto;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 11px;
|
||||
color: var(--muted);
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
font-size: .9rem;
|
||||
transition: color .16s ease, border-color .16s ease;
|
||||
}
|
||||
.meal-picker-close:hover { color: var(--ink); border-color: var(--sage); }
|
||||
.meal-picker-list {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
padding: 16px 24px 22px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.meal-picker-row { margin: 0; }
|
||||
.meal-picker-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 13px;
|
||||
width: 100%;
|
||||
padding: 12px 13px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 16px;
|
||||
color: var(--ink);
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition: border-color .16s ease, transform .16s ease;
|
||||
}
|
||||
.meal-picker-button:hover { border-color: var(--sage); transform: translateX(2px); }
|
||||
.meal-picker-icon {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
flex: 0 0 auto;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 13px;
|
||||
color: var(--deep-sage);
|
||||
background: #eef4e9;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.meal-picker-copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
|
||||
.meal-picker-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
|
||||
.meal-picker-copy small { color: var(--muted); font-size: .76rem; }
|
||||
.meal-picker-add {
|
||||
flex: 0 0 auto;
|
||||
padding: 6px 12px;
|
||||
border-radius: 99px;
|
||||
color: var(--deep-sage);
|
||||
background: #e7f0e1;
|
||||
font-size: .74rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
.meal-picker-empty { padding: 34px 22px 30px; text-align: center; color: var(--muted); }
|
||||
.meal-picker-empty h3 { color: var(--ink); }
|
||||
.meal-picker-empty p { margin-bottom: 18px; }
|
||||
|
||||
@media (max-width: 780px) {
|
||||
.site-header, .site-main, .site-footer { width: min(100% - 28px, 600px); }
|
||||
.site-header { padding: 20px 0; }
|
||||
.site-header { padding: 18px 0; }
|
||||
.site-main { margin-top: 20px; }
|
||||
.dashboard-grid, .list-layout { grid-template-columns: 1fr; }
|
||||
.side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
@@ -163,12 +340,14 @@ input:focus { border-color: var(--deep-sage); box-shadow: 0 0 0 4px rgba(85, 113
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.site-header { flex-wrap: wrap; gap: 12px 16px; }
|
||||
.site-nav { order: 3; width: 100%; justify-content: center; gap: 8px; }
|
||||
.site-nav a { flex: 1; text-align: center; padding: 10px 8px; }
|
||||
.account-nav { gap: 9px; }
|
||||
.user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.panel { padding: 20px 16px; border-radius: 20px; }
|
||||
.page-heading { margin-bottom: 24px; }
|
||||
.list-topbar { margin-bottom: 20px; }
|
||||
.list-topbar-actions .button { display: none; }
|
||||
.list-heading h1 { font-size: clamp(1.45rem, 7vw, 1.75rem); }
|
||||
.add-item-form { grid-template-columns: minmax(0, 1fr) 75px; }
|
||||
.add-button { grid-column: 1 / -1; }
|
||||
|
||||
Reference in New Issue
Block a user