| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150 |
- :root {
- --bg-color: #0d1117;
- --panel-bg: rgba(22, 27, 34, 0.7);
- --border-color: rgba(48, 54, 61, 0.8);
- --text-main: #c9d1d9;
- --text-muted: #8b949e;
- --primary-gradient: linear-gradient(135deg, #2ea043 0%, #238636 100%);
- --primary-color: #2ea043;
- --user-msg-bg: linear-gradient(135deg, #1f6feb 0%, #164e63 100%);
- --bot-msg-bg: rgba(33, 38, 45, 0.8);
- --glass-blur: blur(16px);
- }
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- }
- body {
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
- background-color: var(--bg-color);
- background-image: radial-gradient(circle at top right, rgba(46, 160, 67, 0.15), transparent 400px),
- radial-gradient(circle at bottom left, rgba(31, 111, 235, 0.1), transparent 400px);
- color: var(--text-main);
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
- padding: 20px;
- overflow: hidden;
- }
- .app-container {
- width: 100%;
- max-width: 900px;
- height: 90vh;
- background: var(--panel-bg);
- backdrop-filter: var(--glass-blur);
- -webkit-backdrop-filter: var(--glass-blur);
- border: 1px solid var(--border-color);
- border-radius: 20px;
- display: flex;
- flex-direction: column;
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
- overflow: hidden;
- }
- .chat-header {
- padding: 16px 24px;
- border-bottom: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: rgba(13, 17, 23, 0.6);
- }
- .brand {
- display: flex;
- align-items: center;
- gap: 12px;
- }
- .logo {
- font-size: 28px;
- background: var(--primary-gradient);
- -webkit-background-clip: text;
- background-clip: text;
- }
- h1 {
- font-size: 1.1rem;
- font-weight: 600;
- color: #f0f6fc;
- }
- .status-indicator {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #2ea043;
- border-radius: 50%;
- margin-right: 6px;
- box-shadow: 0 0 10px #2ea043;
- }
- .status-text {
- font-size: 0.75rem;
- color: var(--text-muted);
- }
- #clear-chat {
- background: none;
- border: none;
- color: var(--text-muted);
- cursor: pointer;
- transition: color 0.2s ease;
- padding: 8px;
- border-radius: 8px;
- }
- #clear-chat:hover {
- color: #f85149;
- background: rgba(248, 81, 73, 0.1);
- }
- .chat-container {
- flex: 1;
- padding: 24px;
- overflow-y: auto;
- display: flex;
- flex-direction: column;
- gap: 20px;
- scroll-behavior: smooth;
- }
- .chat-container::-webkit-scrollbar {
- width: 6px;
- }
- .chat-container::-webkit-scrollbar-thumb {
- background: var(--border-color);
- border-radius: 10px;
- }
- .message {
- display: flex;
- gap: 16px;
- max-width: 85%;
- animation: fadeIn 0.3s ease forwards;
- opacity: 0;
- transform: translateY(10px);
- }
- @keyframes fadeIn {
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- .message.user {
- align-self: flex-end;
- flex-direction: row-reverse;
- }
- .avatar {
- width: 36px;
- height: 36px;
- border-radius: 10px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 20px;
- flex-shrink: 0;
- background: rgba(255, 255, 255, 0.1);
- }
- .message.user .avatar {
- background: var(--user-msg-bg);
- }
- .message.system .avatar {
- background: var(--bot-msg-bg);
- border: 1px solid var(--border-color);
- }
- .message-content {
- padding: 14px 18px;
- border-radius: 18px;
- line-height: 1.6;
- font-size: 0.95rem;
- white-space: pre-wrap;
- word-break: break-word;
- }
- .message.user .message-content {
- background: var(--user-msg-bg);
- color: #fff;
- border-top-right-radius: 4px;
- }
- .message.system .message-content {
- background: var(--bot-msg-bg);
- border: 1px solid var(--border-color);
- border-top-left-radius: 4px;
- box-shadow: 0 4px 12px rgba(0,0,0,0.1);
- }
- .chat-input-area {
- padding: 20px 24px;
- background: rgba(13, 17, 23, 0.8);
- border-top: 1px solid var(--border-color);
- }
- .input-form {
- display: flex;
- gap: 12px;
- align-items: flex-end;
- background: var(--bg-color);
- border: 1px solid var(--border-color);
- border-radius: 16px;
- padding: 8px 16px;
- transition: border-color 0.2s, box-shadow 0.2s;
- }
- .input-form:focus-within {
- border-color: rgba(46, 160, 67, 0.5);
- box-shadow: 0 0 0 2px rgba(46, 160, 67, 0.1);
- }
- textarea {
- flex: 1;
- background: none;
- border: none;
- color: var(--text-main);
- font-family: inherit;
- font-size: 1rem;
- resize: none;
- max-height: 150px;
- padding: 10px 0;
- outline: none;
- }
- textarea::placeholder {
- color: var(--text-muted);
- }
- .send-btn {
- background: var(--primary-color);
- border: none;
- border-radius: 12px;
- width: 40px;
- height: 40px;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #fff;
- cursor: pointer;
- transition: transform 0.2s, background 0.2s;
- flex-shrink: 0;
- margin-bottom: 2px;
- }
- .send-btn:hover {
- background: #3fb950;
- transform: scale(1.05);
- }
- .send-btn:active {
- transform: scale(0.95);
- }
- .send-btn:disabled {
- background: var(--border-color);
- color: var(--text-muted);
- cursor: not-allowed;
- transform: none;
- }
- .footer-note {
- text-align: center;
- font-size: 0.7rem;
- color: var(--text-muted);
- margin-top: 12px;
- }
- .typing-indicator {
- display: flex;
- gap: 4px;
- padding: 4px 8px;
- align-items: center;
- }
- .typing-dot {
- width: 6px;
- height: 6px;
- background: var(--text-muted);
- border-radius: 50%;
- animation: typing 1.4s infinite ease-in-out both;
- }
- .typing-dot:nth-child(1) { animation-delay: -0.32s; }
- .typing-dot:nth-child(2) { animation-delay: -0.16s; }
- .typing-dot:nth-child(3) { animation-delay: 0s; }
- @keyframes typing {
- 0%, 80%, 100% { transform: scale(0); }
- 40% { transform: scale(1); }
- }
- /* Modal Styles */
- .nav-btn {
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid var(--border-color);
- color: var(--text-main);
- padding: 6px 12px;
- border-radius: 8px;
- cursor: pointer;
- margin-right: 10px;
- font-size: 0.85rem;
- transition: background 0.2s;
- }
- .nav-btn:hover {
- background: rgba(255, 255, 255, 0.2);
- }
- .modal-overlay {
- position: fixed;
- top: 0; left: 0; right: 0; bottom: 0;
- background: rgba(0, 0, 0, 0.6);
- backdrop-filter: blur(8px);
- -webkit-backdrop-filter: blur(8px);
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 1000;
- opacity: 1;
- transition: opacity 0.3s ease;
- }
- .modal-overlay.hidden {
- opacity: 0;
- pointer-events: none;
- }
- .modal-content {
- background: var(--panel-bg);
- border: 1px solid var(--border-color);
- border-radius: 16px;
- padding: 30px;
- width: 350px;
- position: relative;
- box-shadow: 0 10px 30px rgba(0,0,0,0.5);
- transform: translateY(0);
- transition: transform 0.3s ease;
- }
- .modal-overlay.hidden .modal-content {
- transform: translateY(-20px);
- }
- .close-modal {
- position: absolute;
- top: 15px;
- right: 20px;
- background: none;
- border: none;
- color: var(--text-muted);
- font-size: 1.5rem;
- cursor: pointer;
- }
- .close-modal:hover {
- color: var(--text-main);
- }
- .modal-content h2 {
- margin-top: 0;
- margin-bottom: 20px;
- font-size: 1.3rem;
- text-align: center;
- }
- .input-group {
- margin-bottom: 15px;
- }
- .input-group label {
- display: block;
- margin-bottom: 5px;
- font-size: 0.85rem;
- color: var(--text-muted);
- }
- .input-group input {
- width: 100%;
- padding: 10px;
- background: rgba(0, 0, 0, 0.2);
- border: 1px solid var(--border-color);
- border-radius: 8px;
- color: var(--text-main);
- font-size: 0.95rem;
- outline: none;
- transition: border-color 0.2s;
- }
- .input-group input:focus {
- border-color: var(--primary-color);
- }
- .error-text {
- color: #f85149;
- font-size: 0.85rem;
- margin-bottom: 10px;
- text-align: center;
- min-height: 18px;
- }
- .success-text {
- color: #3fb950;
- font-size: 0.85rem;
- margin-bottom: 10px;
- text-align: center;
- min-height: 18px;
- }
- .primary-btn {
- width: 100%;
- padding: 10px;
- background: var(--primary-gradient);
- border: none;
- border-radius: 8px;
- color: #fff;
- font-size: 1rem;
- cursor: pointer;
- transition: opacity 0.2s;
- }
- .primary-btn:hover {
- opacity: 0.9;
- }
- /* Authentication Screen Gateway specific styles */
- .auth-container {
- width: 100%;
- max-width: 400px;
- background: var(--panel-bg);
- backdrop-filter: var(--glass-blur);
- -webkit-backdrop-filter: var(--glass-blur);
- border: 1px solid var(--border-color);
- border-radius: 20px;
- padding: 40px;
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
- transition: opacity 0.5s ease, transform 0.5s ease;
- }
- .auth-header {
- text-align: center;
- margin-bottom: 30px;
- }
- .auth-header h2 {
- font-size: 1.5rem;
- color: #f0f6fc;
- margin-bottom: 8px;
- }
- .auth-header p {
- font-size: 0.9rem;
- color: var(--text-muted);
- }
- .auth-toggle {
- text-align: center;
- font-size: 0.85rem;
- color: var(--text-muted);
- margin-top: 20px;
- }
- .auth-toggle a {
- color: var(--primary-color);
- text-decoration: none;
- font-weight: 500;
- transition: color 0.2s;
- }
- .auth-toggle a:hover {
- color: #3fb950;
- text-decoration: underline;
- }
- /* Animations for transitioning out the auth screen */
- .fade-out {
- opacity: 0;
- transform: scale(0.95);
- pointer-events: none;
- }
- .fade-in {
- opacity: 1;
- transform: scale(1);
- }
- /* --------------------------------- */
- /* Food Search Component Styles */
- /* --------------------------------- */
- .search-module {
- padding: 10px 24px;
- background: rgba(22, 27, 34, 0.4);
- border-bottom: 1px solid var(--border-color);
- position: relative;
- z-index: 10;
- }
- .search-input-wrapper {
- position: relative;
- display: flex;
- align-items: center;
- background: rgba(13, 17, 23, 0.8);
- border: 1px solid var(--border-color);
- border-radius: 12px;
- padding: 8px 16px;
- transition: all 0.3s ease;
- box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
- }
- .search-input-wrapper:focus-within {
- border-color: rgba(46, 160, 67, 0.6);
- box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.15), inset 0 2px 4px rgba(0,0,0,0.1);
- }
- .search-icon {
- color: var(--text-muted);
- margin-right: 12px;
- }
- #food-search-input {
- flex: 1;
- background: transparent;
- border: none;
- color: var(--text-main);
- font-size: 0.95rem;
- outline: none;
- font-family: inherit;
- width: 100%;
- }
- #clear-search-btn {
- background: transparent;
- border: none;
- color: var(--text-muted);
- cursor: pointer;
- border-radius: 50%;
- padding: 4px;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.2s;
- }
- #clear-search-btn:hover {
- background: rgba(255, 255, 255, 0.1);
- color: #f85149;
- }
- .search-results-dropdown {
- position: absolute;
- top: 100%;
- left: 24px;
- right: 24px;
- margin-top: 8px;
- background: rgba(22, 27, 34, 0.85);
- backdrop-filter: blur(20px);
- -webkit-backdrop-filter: blur(20px);
- border: 1px solid var(--border-color);
- border-radius: 12px;
- box-shadow: 0 15px 35px rgba(0,0,0,0.4);
- max-height: 350px;
- overflow-y: auto;
- z-index: 100;
- opacity: 0;
- transform: translateY(-10px);
- animation: dropdownFadeIn 0.2s forwards;
- }
- @keyframes dropdownFadeIn {
- to { opacity: 1; transform: translateY(0); }
- }
- .search-results-dropdown::-webkit-scrollbar {
- width: 6px;
- }
- .search-results-dropdown::-webkit-scrollbar-thumb {
- background: rgba(255,255,255,0.2);
- border-radius: 10px;
- }
- .food-item {
- padding: 14px 18px;
- border-bottom: 1px solid rgba(255,255,255,0.05);
- cursor: pointer;
- transition: background 0.2s, padding-left 0.2s;
- }
- .food-item:last-child {
- border-bottom: none;
- }
- .food-item:hover {
- background: rgba(255,255,255,0.05);
- padding-left: 22px;
- }
- .food-item-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
- }
- .food-name {
- font-weight: 600;
- color: #e6edf3;
- font-size: 1rem;
- }
- .food-badge {
- background: rgba(46, 160, 67, 0.15);
- color: #3fb950;
- border: 1px solid rgba(46, 160, 67, 0.3);
- padding: 2px 8px;
- border-radius: 12px;
- font-size: 0.7rem;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- }
- .food-macros {
- display: flex;
- gap: 15px;
- font-size: 0.8rem;
- color: var(--text-muted);
- }
- .macro-tag span {
- color: #c9d1d9;
- font-weight: 500;
- }
- /* --- Expandable Details (Task #40) --- */
- .food-item-footer {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 10px;
- }
- .details-btn {
- background: none;
- border: 1px solid var(--border);
- border-radius: 4px;
- color: var(--primary);
- font-size: 0.75rem;
- padding: 2px 8px;
- cursor: pointer;
- transition: all 0.2s;
- }
- .details-btn:hover {
- background: rgba(255, 255, 255, 0.05);
- border-color: var(--primary);
- }
- .details-panel {
- max-height: 0;
- overflow: hidden;
- transition: max-height 0.3s ease-out, margin-top 0.3s;
- }
- .details-panel.expanded {
- max-height: 500px; /* Large enough for content */
- margin-top: 12px;
- border-top: 1px solid rgba(255, 255, 255, 0.05);
- padding-top: 12px;
- }
- .nutrient-section {
- margin-bottom: 12px;
- }
- .nutrient-section-title {
- font-size: 0.7rem;
- text-transform: uppercase;
- letter-spacing: 0.05em;
- color: var(--text-muted);
- margin-bottom: 6px;
- font-weight: 700;
- }
- .nutrient-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 8px;
- }
- .nutrient-item {
- display: flex;
- justify-content: space-between;
- font-size: 0.8rem;
- padding: 4px 0;
- }
- .nutrient-label {
- color: var(--text-muted);
- }
- .nutrient-value {
- font-weight: 500;
- color: var(--text);
- }
- .search-loading, .search-empty {
- padding: 20px;
- text-align: center;
- color: var(--text-muted);
- font-size: 0.9rem;
- background: transparent;
- }
- /* Mobile Responsiveness */
- @media (max-width: 600px) {
- body {
- padding: 0;
- }
- .app-container {
- height: 100vh;
- border-radius: 0;
- border: none;
- }
- .chat-header {
- flex-direction: column;
- align-items: flex-start;
- gap: 10px;
- }
- .actions {
- width: 100%;
- justify-content: space-between;
- }
- .search-module {
- padding: 10px 12px;
- }
- .search-results-dropdown {
- left: 12px;
- right: 12px;
- }
- .message {
- max-width: 95%;
- }
- }
- /* =============================================
- Macro Dashboard (US-07 Task #38)
- ============================================= */
- .macro-dashboard {
- display: flex;
- gap: 12px;
- padding: 12px 20px;
- background: rgba(255, 255, 255, 0.02);
- border-bottom: 1px solid var(--border);
- flex-wrap: wrap;
- animation: fadeIn 0.4s ease;
- }
- .macro-card {
- flex: 1;
- min-width: 100px;
- background: rgba(255, 255, 255, 0.05);
- border: 1px solid var(--border);
- border-radius: 12px;
- padding: 12px 16px;
- text-align: center;
- backdrop-filter: blur(6px);
- -webkit-backdrop-filter: blur(6px);
- transition: transform 0.2s ease, border-color 0.2s ease;
- }
- .macro-card:hover {
- transform: translateY(-2px);
- border-color: rgba(255, 255, 255, 0.25);
- }
- .macro-label {
- font-size: 0.75rem;
- color: var(--text-muted);
- text-transform: uppercase;
- letter-spacing: 1.2px;
- margin-bottom: 6px;
- font-weight: 600;
- }
- .macro-value {
- font-size: 1.4rem;
- font-weight: 700;
- transition: opacity 0.3s ease;
- }
- /* Color-coded per macro type */
- #macro-calories .macro-value, #macro-calories { --macro-color: #facc15; }
- #macro-protein .macro-value, #macro-protein { --macro-color: #ef4444; }
- #macro-carbs .macro-value, #macro-carbs { --macro-color: #3b82f6; }
- #macro-fat .macro-value, #macro-fat { --macro-color: #22c55e; }
- #macro-calories .macro-value { color: #facc15; }
- #macro-protein .macro-value { color: #ef4444; }
- #macro-carbs .macro-value { color: #3b82f6; }
- #macro-fat .macro-value { color: #22c55e; }
- #macro-calories { border-color: rgba(250, 204, 21, 0.2); }
- #macro-protein { border-color: rgba(239, 68, 68, 0.2); }
- #macro-carbs { border-color: rgba(59, 130, 246, 0.2); }
- #macro-fat { border-color: rgba(34, 197, 94, 0.2); }
- @media (max-width: 768px) {
- .macro-dashboard {
- gap: 8px;
- padding: 10px 12px;
- }
- .macro-card {
- min-width: 70px;
- padding: 10px 10px;
- }
- .macro-value {
- font-size: 1.1rem;
- }
- }
- /* =============================================
- Meal Builder (US-10 Task #46)
- ============================================= */
- .meal-builder-tray {
- margin: 0 20px;
- background: rgba(255, 255, 255, 0.03);
- border: 1px solid var(--border);
- border-radius: 12px;
- overflow: hidden;
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
- margin-bottom: 12px;
- }
- .meal-builder-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10px 16px;
- background: rgba(255, 255, 255, 0.05);
- cursor: pointer;
- }
- .tray-title {
- display: flex;
- align-items: center;
- gap: 10px;
- }
- .tray-title h3 {
- font-size: 0.95rem;
- font-weight: 600;
- margin: 0;
- }
- .tray-title .item-count {
- font-size: 0.75rem;
- color: var(--text-muted);
- background: rgba(255, 255, 255, 0.1);
- padding: 2px 8px;
- border-radius: 10px;
- }
- .meal-content {
- max-height: 500px;
- overflow: hidden;
- transition: max-height 0.3s ease-out, opacity 0.3s ease;
- opacity: 1;
- }
- .meal-content.collapsed {
- max-height: 0;
- opacity: 0;
- }
- .meal-items-list {
- padding: 12px;
- max-height: 250px;
- overflow-y: auto;
- display: flex;
- flex-direction: column;
- gap: 8px;
- }
- /* Custom Scrollbar for Meal List */
- .meal-items-list::-webkit-scrollbar {
- width: 4px;
- }
- .meal-items-list::-webkit-scrollbar-thumb {
- background: rgba(255, 255, 255, 0.1);
- border-radius: 4px;
- }
- .meal-item-row {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 8px 12px;
- background: rgba(255, 255, 255, 0.05);
- border: 1px solid rgba(255, 255, 255, 0.05);
- border-radius: 8px;
- animation: slideInLeft 0.3s ease-out;
- }
- .meal-item-name {
- flex: 1;
- font-size: 0.9rem;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .meal-item-controls {
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .weight-input-wrapper {
- display: flex;
- align-items: center;
- background: rgba(0, 0, 0, 0.25);
- border-radius: 8px;
- padding: 4px 10px;
- border: 1px solid var(--border);
- transition: border-color 0.2s, box-shadow 0.2s;
- }
- .weight-input-wrapper:focus-within {
- border-color: var(--primary);
- box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
- }
- .weight-input-wrapper input {
- background: transparent;
- border: none;
- color: var(--text);
- width: 65px;
- font-size: 0.95rem;
- text-align: right;
- padding: 2px;
- outline: none;
- font-weight: 500;
- }
- /* Hide Spinners (Arrows) for cleaner look */
- .weight-input-wrapper input::-webkit-outer-spin-button,
- .weight-input-wrapper input::-webkit-inner-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
- .weight-input-wrapper input[type=number] {
- -moz-appearance: textfield;
- }
- .weight-unit {
- font-size: 0.75rem;
- color: var(--text-muted);
- margin-left: 2px;
- }
- .remove-item-btn {
- background: transparent;
- border: none;
- color: #ef4444;
- cursor: pointer;
- padding: 4px;
- border-radius: 4px;
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 0.7;
- transition: opacity 0.2s, background 0.2s;
- }
- .remove-item-btn:hover {
- opacity: 1;
- background: rgba(239, 68, 68, 0.1);
- }
- .empty-meal-msg {
- text-align: center;
- padding: 20px;
- font-size: 0.85rem;
- color: var(--text-muted);
- font-style: italic;
- }
- #toggle-meal-btn {
- transition: transform 0.3s ease;
- }
- .meal-content:not(.collapsed) + .meal-builder-header #toggle-meal-btn {
- transform: rotate(180deg);
- }
- /* Add-to-meal button in search results */
- .add-meal-btn {
- background: var(--primary);
- color: white;
- border: none;
- border-radius: 6px;
- padding: 4px 10px;
- font-size: 0.8rem;
- cursor: pointer;
- transition: background 0.2s, transform 0.1s;
- font-weight: 600;
- }
- .add-meal-btn:hover {
- background: var(--primary-hover);
- transform: scale(1.05);
- }
- .add-meal-btn:active {
- transform: scale(0.95);
- }
- .food-item-footer {
- display: flex;
- gap: 8px;
- margin-top: 10px;
- }
- @keyframes slideInLeft {
- from { opacity: 0; transform: translateX(-10px); }
- to { opacity: 1; transform: translateX(0); }
- }
- @media (max-width: 600px) {
- .meal-builder-tray {
- margin: 0 12px 10px 12px;
- }
- .meal-item-name {
- font-size: 0.8rem;
- }
- }
- .meal-builder-footer {
- padding: 12px;
- border-top: 1px solid rgba(255, 255, 255, 0.05);
- display: flex;
- justify-content: center;
- background: rgba(255, 255, 255, 0.02);
- }
- .primary-btn-sm {
- background: var(--primary);
- color: white;
- border: none;
- border-radius: 8px;
- padding: 8px 16px;
- font-size: 0.85rem;
- font-weight: 600;
- cursor: pointer;
- transition: all 0.2s ease;
- width: 100%;
- }
- .primary-btn-sm:hover {
- background: var(--primary-hover);
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
- }
- .primary-btn-sm:active {
- transform: translateY(0);
- }
- /* --- Meal Totals Banner --- */
- .meal-totals-banner {
- width: 100%;
- margin-bottom: 12px;
- background: rgba(15, 23, 42, 0.4);
- border: 1px solid rgba(255, 255, 255, 0.1);
- border-radius: 10px;
- padding: 12px;
- }
- .totals-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10px;
- padding-bottom: 6px;
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
- }
- .totals-title {
- font-size: 0.85rem;
- font-weight: 600;
- color: var(--text-muted);
- text-transform: uppercase;
- letter-spacing: 0.5px;
- }
- .totals-weight {
- font-size: 0.85rem;
- font-weight: 500;
- color: var(--text-muted);
- }
- .totals-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 8px;
- }
- .total-card {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- background: rgba(255, 255, 255, 0.03);
- border-radius: 6px;
- padding: 8px 4px;
- transition: background 0.3s;
- }
- .total-val {
- font-size: 1.05rem;
- font-weight: 700;
- color: var(--text-light);
- }
- .total-lbl {
- font-size: 0.7rem;
- color: var(--text-muted);
- margin-top: 2px;
- }
- .protein-highlight .total-val {
- color: var(--primary);
- }
- .protein-highlight {
- background: rgba(59, 130, 246, 0.05);
- border: 1px solid rgba(59, 130, 246, 0.1);
- }
- .meal-totals-banner.has-error {
- border-color: rgba(239, 68, 68, 0.5);
- background: rgba(127, 29, 29, 0.2);
- animation: errorPulse 2s infinite;
- }
- @keyframes errorPulse {
- 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
- 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
- 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
- }
|