style.css 21 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. :root {
  2. --bg-color: #0d1117;
  3. --panel-bg: rgba(22, 27, 34, 0.7);
  4. --border-color: rgba(48, 54, 61, 0.8);
  5. --text-main: #c9d1d9;
  6. --text-muted: #8b949e;
  7. --primary-gradient: linear-gradient(135deg, #2ea043 0%, #238636 100%);
  8. --primary-color: #2ea043;
  9. --user-msg-bg: linear-gradient(135deg, #1f6feb 0%, #164e63 100%);
  10. --bot-msg-bg: rgba(33, 38, 45, 0.8);
  11. --glass-blur: blur(16px);
  12. }
  13. * {
  14. box-sizing: border-box;
  15. margin: 0;
  16. padding: 0;
  17. }
  18. body {
  19. font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  20. background-color: var(--bg-color);
  21. background-image: radial-gradient(circle at top right, rgba(46, 160, 67, 0.15), transparent 400px),
  22. radial-gradient(circle at bottom left, rgba(31, 111, 235, 0.1), transparent 400px);
  23. color: var(--text-main);
  24. display: flex;
  25. justify-content: center;
  26. align-items: center;
  27. height: 100vh;
  28. padding: 20px;
  29. overflow: hidden;
  30. }
  31. .app-container {
  32. width: 100%;
  33. max-width: 900px;
  34. height: 90vh;
  35. background: var(--panel-bg);
  36. backdrop-filter: var(--glass-blur);
  37. -webkit-backdrop-filter: var(--glass-blur);
  38. border: 1px solid var(--border-color);
  39. border-radius: 20px;
  40. display: flex;
  41. flex-direction: column;
  42. box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  43. overflow: hidden;
  44. }
  45. .chat-header {
  46. padding: 16px 24px;
  47. border-bottom: 1px solid var(--border-color);
  48. display: flex;
  49. justify-content: space-between;
  50. align-items: center;
  51. background: rgba(13, 17, 23, 0.6);
  52. }
  53. .brand {
  54. display: flex;
  55. align-items: center;
  56. gap: 12px;
  57. }
  58. .logo {
  59. font-size: 28px;
  60. background: var(--primary-gradient);
  61. -webkit-background-clip: text;
  62. background-clip: text;
  63. }
  64. h1 {
  65. font-size: 1.1rem;
  66. font-weight: 600;
  67. color: #f0f6fc;
  68. }
  69. .status-indicator {
  70. display: inline-block;
  71. width: 8px;
  72. height: 8px;
  73. background-color: #2ea043;
  74. border-radius: 50%;
  75. margin-right: 6px;
  76. box-shadow: 0 0 10px #2ea043;
  77. }
  78. .status-text {
  79. font-size: 0.75rem;
  80. color: var(--text-muted);
  81. }
  82. #clear-chat {
  83. background: none;
  84. border: none;
  85. color: var(--text-muted);
  86. cursor: pointer;
  87. transition: color 0.2s ease;
  88. padding: 8px;
  89. border-radius: 8px;
  90. }
  91. #clear-chat:hover {
  92. color: #f85149;
  93. background: rgba(248, 81, 73, 0.1);
  94. }
  95. .chat-container {
  96. flex: 1;
  97. padding: 24px;
  98. overflow-y: auto;
  99. display: flex;
  100. flex-direction: column;
  101. gap: 20px;
  102. scroll-behavior: smooth;
  103. }
  104. .chat-container::-webkit-scrollbar {
  105. width: 6px;
  106. }
  107. .chat-container::-webkit-scrollbar-thumb {
  108. background: var(--border-color);
  109. border-radius: 10px;
  110. }
  111. .message {
  112. display: flex;
  113. gap: 16px;
  114. max-width: 85%;
  115. animation: fadeIn 0.3s ease forwards;
  116. opacity: 0;
  117. transform: translateY(10px);
  118. }
  119. @keyframes fadeIn {
  120. to {
  121. opacity: 1;
  122. transform: translateY(0);
  123. }
  124. }
  125. .message.user {
  126. align-self: flex-end;
  127. flex-direction: row-reverse;
  128. }
  129. .avatar {
  130. width: 36px;
  131. height: 36px;
  132. border-radius: 10px;
  133. display: flex;
  134. justify-content: center;
  135. align-items: center;
  136. font-size: 20px;
  137. flex-shrink: 0;
  138. background: rgba(255, 255, 255, 0.1);
  139. }
  140. .message.user .avatar {
  141. background: var(--user-msg-bg);
  142. }
  143. .message.system .avatar {
  144. background: var(--bot-msg-bg);
  145. border: 1px solid var(--border-color);
  146. }
  147. .message-content {
  148. padding: 14px 18px;
  149. border-radius: 18px;
  150. line-height: 1.6;
  151. font-size: 0.95rem;
  152. white-space: pre-wrap;
  153. word-break: break-word;
  154. }
  155. .message.user .message-content {
  156. background: var(--user-msg-bg);
  157. color: #fff;
  158. border-top-right-radius: 4px;
  159. }
  160. .message.system .message-content {
  161. background: var(--bot-msg-bg);
  162. border: 1px solid var(--border-color);
  163. border-top-left-radius: 4px;
  164. box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  165. }
  166. .chat-input-area {
  167. padding: 20px 24px;
  168. background: rgba(13, 17, 23, 0.8);
  169. border-top: 1px solid var(--border-color);
  170. }
  171. .input-form {
  172. display: flex;
  173. gap: 12px;
  174. align-items: flex-end;
  175. background: var(--bg-color);
  176. border: 1px solid var(--border-color);
  177. border-radius: 16px;
  178. padding: 8px 16px;
  179. transition: border-color 0.2s, box-shadow 0.2s;
  180. }
  181. .input-form:focus-within {
  182. border-color: rgba(46, 160, 67, 0.5);
  183. box-shadow: 0 0 0 2px rgba(46, 160, 67, 0.1);
  184. }
  185. textarea {
  186. flex: 1;
  187. background: none;
  188. border: none;
  189. color: var(--text-main);
  190. font-family: inherit;
  191. font-size: 1rem;
  192. resize: none;
  193. max-height: 150px;
  194. padding: 10px 0;
  195. outline: none;
  196. }
  197. textarea::placeholder {
  198. color: var(--text-muted);
  199. }
  200. .send-btn {
  201. background: var(--primary-color);
  202. border: none;
  203. border-radius: 12px;
  204. width: 40px;
  205. height: 40px;
  206. display: flex;
  207. justify-content: center;
  208. align-items: center;
  209. color: #fff;
  210. cursor: pointer;
  211. transition: transform 0.2s, background 0.2s;
  212. flex-shrink: 0;
  213. margin-bottom: 2px;
  214. }
  215. .send-btn:hover {
  216. background: #3fb950;
  217. transform: scale(1.05);
  218. }
  219. .send-btn:active {
  220. transform: scale(0.95);
  221. }
  222. .send-btn:disabled {
  223. background: var(--border-color);
  224. color: var(--text-muted);
  225. cursor: not-allowed;
  226. transform: none;
  227. }
  228. .footer-note {
  229. text-align: center;
  230. font-size: 0.7rem;
  231. color: var(--text-muted);
  232. margin-top: 12px;
  233. }
  234. .typing-indicator {
  235. display: flex;
  236. gap: 4px;
  237. padding: 4px 8px;
  238. align-items: center;
  239. }
  240. .typing-dot {
  241. width: 6px;
  242. height: 6px;
  243. background: var(--text-muted);
  244. border-radius: 50%;
  245. animation: typing 1.4s infinite ease-in-out both;
  246. }
  247. .typing-dot:nth-child(1) { animation-delay: -0.32s; }
  248. .typing-dot:nth-child(2) { animation-delay: -0.16s; }
  249. .typing-dot:nth-child(3) { animation-delay: 0s; }
  250. @keyframes typing {
  251. 0%, 80%, 100% { transform: scale(0); }
  252. 40% { transform: scale(1); }
  253. }
  254. /* Modal Styles */
  255. .nav-btn {
  256. background: rgba(255, 255, 255, 0.1);
  257. border: 1px solid var(--border-color);
  258. color: var(--text-main);
  259. padding: 6px 12px;
  260. border-radius: 8px;
  261. cursor: pointer;
  262. margin-right: 10px;
  263. font-size: 0.85rem;
  264. transition: background 0.2s;
  265. }
  266. .nav-btn:hover {
  267. background: rgba(255, 255, 255, 0.2);
  268. }
  269. .modal-overlay {
  270. position: fixed;
  271. top: 0; left: 0; right: 0; bottom: 0;
  272. background: rgba(0, 0, 0, 0.6);
  273. backdrop-filter: blur(8px);
  274. -webkit-backdrop-filter: blur(8px);
  275. display: flex;
  276. justify-content: center;
  277. align-items: center;
  278. z-index: 1000;
  279. opacity: 1;
  280. transition: opacity 0.3s ease;
  281. }
  282. .modal-overlay.hidden {
  283. opacity: 0;
  284. pointer-events: none;
  285. }
  286. .modal-content {
  287. background: var(--panel-bg);
  288. border: 1px solid var(--border-color);
  289. border-radius: 16px;
  290. padding: 30px;
  291. width: 350px;
  292. position: relative;
  293. box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  294. transform: translateY(0);
  295. transition: transform 0.3s ease;
  296. }
  297. .modal-overlay.hidden .modal-content {
  298. transform: translateY(-20px);
  299. }
  300. .close-modal {
  301. position: absolute;
  302. top: 15px;
  303. right: 20px;
  304. background: none;
  305. border: none;
  306. color: var(--text-muted);
  307. font-size: 1.5rem;
  308. cursor: pointer;
  309. }
  310. .close-modal:hover {
  311. color: var(--text-main);
  312. }
  313. .modal-content h2 {
  314. margin-top: 0;
  315. margin-bottom: 20px;
  316. font-size: 1.3rem;
  317. text-align: center;
  318. }
  319. .input-group {
  320. margin-bottom: 15px;
  321. }
  322. .input-group label {
  323. display: block;
  324. margin-bottom: 5px;
  325. font-size: 0.85rem;
  326. color: var(--text-muted);
  327. }
  328. .input-group input {
  329. width: 100%;
  330. padding: 10px;
  331. background: rgba(0, 0, 0, 0.2);
  332. border: 1px solid var(--border-color);
  333. border-radius: 8px;
  334. color: var(--text-main);
  335. font-size: 0.95rem;
  336. outline: none;
  337. transition: border-color 0.2s;
  338. }
  339. .input-group input:focus {
  340. border-color: var(--primary-color);
  341. }
  342. .error-text {
  343. color: #f85149;
  344. font-size: 0.85rem;
  345. margin-bottom: 10px;
  346. text-align: center;
  347. min-height: 18px;
  348. }
  349. .success-text {
  350. color: #3fb950;
  351. font-size: 0.85rem;
  352. margin-bottom: 10px;
  353. text-align: center;
  354. min-height: 18px;
  355. }
  356. .primary-btn {
  357. width: 100%;
  358. padding: 10px;
  359. background: var(--primary-gradient);
  360. border: none;
  361. border-radius: 8px;
  362. color: #fff;
  363. font-size: 1rem;
  364. cursor: pointer;
  365. transition: opacity 0.2s;
  366. }
  367. .primary-btn:hover {
  368. opacity: 0.9;
  369. }
  370. /* Authentication Screen Gateway specific styles */
  371. .auth-container {
  372. width: 100%;
  373. max-width: 400px;
  374. background: var(--panel-bg);
  375. backdrop-filter: var(--glass-blur);
  376. -webkit-backdrop-filter: var(--glass-blur);
  377. border: 1px solid var(--border-color);
  378. border-radius: 20px;
  379. padding: 40px;
  380. box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  381. transition: opacity 0.5s ease, transform 0.5s ease;
  382. }
  383. .auth-header {
  384. text-align: center;
  385. margin-bottom: 30px;
  386. }
  387. .auth-header h2 {
  388. font-size: 1.5rem;
  389. color: #f0f6fc;
  390. margin-bottom: 8px;
  391. }
  392. .auth-header p {
  393. font-size: 0.9rem;
  394. color: var(--text-muted);
  395. }
  396. .auth-toggle {
  397. text-align: center;
  398. font-size: 0.85rem;
  399. color: var(--text-muted);
  400. margin-top: 20px;
  401. }
  402. .auth-toggle a {
  403. color: var(--primary-color);
  404. text-decoration: none;
  405. font-weight: 500;
  406. transition: color 0.2s;
  407. }
  408. .auth-toggle a:hover {
  409. color: #3fb950;
  410. text-decoration: underline;
  411. }
  412. /* Animations for transitioning out the auth screen */
  413. .fade-out {
  414. opacity: 0;
  415. transform: scale(0.95);
  416. pointer-events: none;
  417. }
  418. .fade-in {
  419. opacity: 1;
  420. transform: scale(1);
  421. }
  422. /* --------------------------------- */
  423. /* Food Search Component Styles */
  424. /* --------------------------------- */
  425. .search-module {
  426. padding: 10px 24px;
  427. background: rgba(22, 27, 34, 0.4);
  428. border-bottom: 1px solid var(--border-color);
  429. position: relative;
  430. z-index: 10;
  431. }
  432. .search-input-wrapper {
  433. position: relative;
  434. display: flex;
  435. align-items: center;
  436. background: rgba(13, 17, 23, 0.8);
  437. border: 1px solid var(--border-color);
  438. border-radius: 12px;
  439. padding: 8px 16px;
  440. transition: all 0.3s ease;
  441. box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  442. }
  443. .search-input-wrapper:focus-within {
  444. border-color: rgba(46, 160, 67, 0.6);
  445. box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.15), inset 0 2px 4px rgba(0,0,0,0.1);
  446. }
  447. .search-icon {
  448. color: var(--text-muted);
  449. margin-right: 12px;
  450. }
  451. #food-search-input {
  452. flex: 1;
  453. background: transparent;
  454. border: none;
  455. color: var(--text-main);
  456. font-size: 0.95rem;
  457. outline: none;
  458. font-family: inherit;
  459. width: 100%;
  460. }
  461. #clear-search-btn {
  462. background: transparent;
  463. border: none;
  464. color: var(--text-muted);
  465. cursor: pointer;
  466. border-radius: 50%;
  467. padding: 4px;
  468. display: flex;
  469. align-items: center;
  470. justify-content: center;
  471. transition: all 0.2s;
  472. }
  473. #clear-search-btn:hover {
  474. background: rgba(255, 255, 255, 0.1);
  475. color: #f85149;
  476. }
  477. .search-results-dropdown {
  478. position: absolute;
  479. top: 100%;
  480. left: 24px;
  481. right: 24px;
  482. margin-top: 8px;
  483. background: rgba(22, 27, 34, 0.85);
  484. backdrop-filter: blur(20px);
  485. -webkit-backdrop-filter: blur(20px);
  486. border: 1px solid var(--border-color);
  487. border-radius: 12px;
  488. box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  489. max-height: 350px;
  490. overflow-y: auto;
  491. z-index: 100;
  492. opacity: 0;
  493. transform: translateY(-10px);
  494. animation: dropdownFadeIn 0.2s forwards;
  495. }
  496. @keyframes dropdownFadeIn {
  497. to { opacity: 1; transform: translateY(0); }
  498. }
  499. .search-results-dropdown::-webkit-scrollbar {
  500. width: 6px;
  501. }
  502. .search-results-dropdown::-webkit-scrollbar-thumb {
  503. background: rgba(255,255,255,0.2);
  504. border-radius: 10px;
  505. }
  506. .food-item {
  507. padding: 14px 18px;
  508. border-bottom: 1px solid rgba(255,255,255,0.05);
  509. cursor: pointer;
  510. transition: background 0.2s, padding-left 0.2s;
  511. }
  512. .food-item:last-child {
  513. border-bottom: none;
  514. }
  515. .food-item:hover {
  516. background: rgba(255,255,255,0.05);
  517. padding-left: 22px;
  518. }
  519. .food-item-header {
  520. display: flex;
  521. justify-content: space-between;
  522. align-items: center;
  523. margin-bottom: 8px;
  524. }
  525. .food-name {
  526. font-weight: 600;
  527. color: #e6edf3;
  528. font-size: 1rem;
  529. }
  530. .food-badge {
  531. background: rgba(46, 160, 67, 0.15);
  532. color: #3fb950;
  533. border: 1px solid rgba(46, 160, 67, 0.3);
  534. padding: 2px 8px;
  535. border-radius: 12px;
  536. font-size: 0.7rem;
  537. font-weight: 600;
  538. text-transform: uppercase;
  539. letter-spacing: 0.5px;
  540. }
  541. .food-macros {
  542. display: flex;
  543. gap: 15px;
  544. font-size: 0.8rem;
  545. color: var(--text-muted);
  546. }
  547. .macro-tag span {
  548. color: #c9d1d9;
  549. font-weight: 500;
  550. }
  551. /* --- Expandable Details (Task #40) --- */
  552. .food-item-footer {
  553. display: flex;
  554. justify-content: space-between;
  555. align-items: center;
  556. margin-top: 10px;
  557. }
  558. .details-btn {
  559. background: none;
  560. border: 1px solid var(--border);
  561. border-radius: 4px;
  562. color: var(--primary);
  563. font-size: 0.75rem;
  564. padding: 2px 8px;
  565. cursor: pointer;
  566. transition: all 0.2s;
  567. }
  568. .details-btn:hover {
  569. background: rgba(255, 255, 255, 0.05);
  570. border-color: var(--primary);
  571. }
  572. .details-panel {
  573. max-height: 0;
  574. overflow: hidden;
  575. transition: max-height 0.3s ease-out, margin-top 0.3s;
  576. }
  577. .details-panel.expanded {
  578. max-height: 500px; /* Large enough for content */
  579. margin-top: 12px;
  580. border-top: 1px solid rgba(255, 255, 255, 0.05);
  581. padding-top: 12px;
  582. }
  583. .nutrient-section {
  584. margin-bottom: 12px;
  585. }
  586. .nutrient-section-title {
  587. font-size: 0.7rem;
  588. text-transform: uppercase;
  589. letter-spacing: 0.05em;
  590. color: var(--text-muted);
  591. margin-bottom: 6px;
  592. font-weight: 700;
  593. }
  594. .nutrient-grid {
  595. display: grid;
  596. grid-template-columns: repeat(2, 1fr);
  597. gap: 8px;
  598. }
  599. .nutrient-item {
  600. display: flex;
  601. justify-content: space-between;
  602. font-size: 0.8rem;
  603. padding: 4px 0;
  604. }
  605. .nutrient-label {
  606. color: var(--text-muted);
  607. }
  608. .nutrient-value {
  609. font-weight: 500;
  610. color: var(--text);
  611. }
  612. .search-loading, .search-empty {
  613. padding: 20px;
  614. text-align: center;
  615. color: var(--text-muted);
  616. font-size: 0.9rem;
  617. background: transparent;
  618. }
  619. /* Mobile Responsiveness */
  620. @media (max-width: 600px) {
  621. body {
  622. padding: 0;
  623. }
  624. .app-container {
  625. height: 100vh;
  626. border-radius: 0;
  627. border: none;
  628. }
  629. .chat-header {
  630. flex-direction: column;
  631. align-items: flex-start;
  632. gap: 10px;
  633. }
  634. .actions {
  635. width: 100%;
  636. justify-content: space-between;
  637. }
  638. .search-module {
  639. padding: 10px 12px;
  640. }
  641. .search-results-dropdown {
  642. left: 12px;
  643. right: 12px;
  644. }
  645. .message {
  646. max-width: 95%;
  647. }
  648. }
  649. /* =============================================
  650. Macro Dashboard (US-07 Task #38)
  651. ============================================= */
  652. .macro-dashboard {
  653. display: flex;
  654. gap: 12px;
  655. padding: 12px 20px;
  656. background: rgba(255, 255, 255, 0.02);
  657. border-bottom: 1px solid var(--border);
  658. flex-wrap: wrap;
  659. animation: fadeIn 0.4s ease;
  660. }
  661. .macro-card {
  662. flex: 1;
  663. min-width: 100px;
  664. background: rgba(255, 255, 255, 0.05);
  665. border: 1px solid var(--border);
  666. border-radius: 12px;
  667. padding: 12px 16px;
  668. text-align: center;
  669. backdrop-filter: blur(6px);
  670. -webkit-backdrop-filter: blur(6px);
  671. transition: transform 0.2s ease, border-color 0.2s ease;
  672. }
  673. .macro-card:hover {
  674. transform: translateY(-2px);
  675. border-color: rgba(255, 255, 255, 0.25);
  676. }
  677. .macro-label {
  678. font-size: 0.75rem;
  679. color: var(--text-muted);
  680. text-transform: uppercase;
  681. letter-spacing: 1.2px;
  682. margin-bottom: 6px;
  683. font-weight: 600;
  684. }
  685. .macro-value {
  686. font-size: 1.4rem;
  687. font-weight: 700;
  688. transition: opacity 0.3s ease;
  689. }
  690. /* Color-coded per macro type */
  691. #macro-calories .macro-value, #macro-calories { --macro-color: #facc15; }
  692. #macro-protein .macro-value, #macro-protein { --macro-color: #ef4444; }
  693. #macro-carbs .macro-value, #macro-carbs { --macro-color: #3b82f6; }
  694. #macro-fat .macro-value, #macro-fat { --macro-color: #22c55e; }
  695. #macro-calories .macro-value { color: #facc15; }
  696. #macro-protein .macro-value { color: #ef4444; }
  697. #macro-carbs .macro-value { color: #3b82f6; }
  698. #macro-fat .macro-value { color: #22c55e; }
  699. #macro-calories { border-color: rgba(250, 204, 21, 0.2); }
  700. #macro-protein { border-color: rgba(239, 68, 68, 0.2); }
  701. #macro-carbs { border-color: rgba(59, 130, 246, 0.2); }
  702. #macro-fat { border-color: rgba(34, 197, 94, 0.2); }
  703. @media (max-width: 768px) {
  704. .macro-dashboard {
  705. gap: 8px;
  706. padding: 10px 12px;
  707. }
  708. .macro-card {
  709. min-width: 70px;
  710. padding: 10px 10px;
  711. }
  712. .macro-value {
  713. font-size: 1.1rem;
  714. }
  715. }
  716. /* =============================================
  717. Meal Builder (US-10 Task #46)
  718. ============================================= */
  719. .meal-builder-tray {
  720. margin: 0 20px;
  721. background: rgba(255, 255, 255, 0.03);
  722. border: 1px solid var(--border);
  723. border-radius: 12px;
  724. overflow: hidden;
  725. backdrop-filter: blur(10px);
  726. -webkit-backdrop-filter: blur(10px);
  727. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  728. margin-bottom: 12px;
  729. }
  730. .meal-builder-header {
  731. display: flex;
  732. justify-content: space-between;
  733. align-items: center;
  734. padding: 10px 16px;
  735. background: rgba(255, 255, 255, 0.05);
  736. cursor: pointer;
  737. }
  738. .tray-title {
  739. display: flex;
  740. align-items: center;
  741. gap: 10px;
  742. }
  743. .tray-title h3 {
  744. font-size: 0.95rem;
  745. font-weight: 600;
  746. margin: 0;
  747. }
  748. .tray-title .item-count {
  749. font-size: 0.75rem;
  750. color: var(--text-muted);
  751. background: rgba(255, 255, 255, 0.1);
  752. padding: 2px 8px;
  753. border-radius: 10px;
  754. }
  755. .meal-content {
  756. max-height: 500px;
  757. overflow: hidden;
  758. transition: max-height 0.3s ease-out, opacity 0.3s ease;
  759. opacity: 1;
  760. }
  761. .meal-content.collapsed {
  762. max-height: 0;
  763. opacity: 0;
  764. }
  765. .meal-items-list {
  766. padding: 12px;
  767. max-height: 250px;
  768. overflow-y: auto;
  769. display: flex;
  770. flex-direction: column;
  771. gap: 8px;
  772. }
  773. /* Custom Scrollbar for Meal List */
  774. .meal-items-list::-webkit-scrollbar {
  775. width: 4px;
  776. }
  777. .meal-items-list::-webkit-scrollbar-thumb {
  778. background: rgba(255, 255, 255, 0.1);
  779. border-radius: 4px;
  780. }
  781. .meal-item-row {
  782. display: flex;
  783. align-items: center;
  784. gap: 12px;
  785. padding: 8px 12px;
  786. background: rgba(255, 255, 255, 0.05);
  787. border: 1px solid rgba(255, 255, 255, 0.05);
  788. border-radius: 8px;
  789. animation: slideInLeft 0.3s ease-out;
  790. }
  791. .meal-item-name {
  792. flex: 1;
  793. font-size: 0.9rem;
  794. white-space: nowrap;
  795. overflow: hidden;
  796. text-overflow: ellipsis;
  797. }
  798. .meal-item-controls {
  799. display: flex;
  800. align-items: center;
  801. gap: 8px;
  802. }
  803. .weight-input-wrapper {
  804. display: flex;
  805. align-items: center;
  806. background: rgba(0, 0, 0, 0.2);
  807. border-radius: 6px;
  808. padding: 2px 6px;
  809. border: 1px solid var(--border);
  810. }
  811. .weight-input-wrapper input {
  812. background: transparent;
  813. border: none;
  814. color: var(--text);
  815. width: 45px;
  816. font-size: 0.85rem;
  817. text-align: right;
  818. padding: 2px;
  819. outline: none;
  820. }
  821. .weight-unit {
  822. font-size: 0.75rem;
  823. color: var(--text-muted);
  824. margin-left: 2px;
  825. }
  826. .remove-item-btn {
  827. background: transparent;
  828. border: none;
  829. color: #ef4444;
  830. cursor: pointer;
  831. padding: 4px;
  832. border-radius: 4px;
  833. display: flex;
  834. align-items: center;
  835. justify-content: center;
  836. opacity: 0.7;
  837. transition: opacity 0.2s, background 0.2s;
  838. }
  839. .remove-item-btn:hover {
  840. opacity: 1;
  841. background: rgba(239, 68, 68, 0.1);
  842. }
  843. .empty-meal-msg {
  844. text-align: center;
  845. padding: 20px;
  846. font-size: 0.85rem;
  847. color: var(--text-muted);
  848. font-style: italic;
  849. }
  850. #toggle-meal-btn {
  851. transition: transform 0.3s ease;
  852. }
  853. .meal-content:not(.collapsed) + .meal-builder-header #toggle-meal-btn {
  854. transform: rotate(180deg);
  855. }
  856. /* Add-to-meal button in search results */
  857. .add-meal-btn {
  858. background: var(--primary);
  859. color: white;
  860. border: none;
  861. border-radius: 6px;
  862. padding: 4px 10px;
  863. font-size: 0.8rem;
  864. cursor: pointer;
  865. transition: background 0.2s, transform 0.1s;
  866. font-weight: 600;
  867. }
  868. .add-meal-btn:hover {
  869. background: var(--primary-hover);
  870. transform: scale(1.05);
  871. }
  872. .add-meal-btn:active {
  873. transform: scale(0.95);
  874. }
  875. .food-item-footer {
  876. display: flex;
  877. gap: 8px;
  878. margin-top: 10px;
  879. }
  880. @keyframes slideInLeft {
  881. from { opacity: 0; transform: translateX(-10px); }
  882. to { opacity: 1; transform: translateX(0); }
  883. }
  884. @media (max-width: 600px) {
  885. .meal-builder-tray {
  886. margin: 0 12px 10px 12px;
  887. }
  888. .meal-item-name {
  889. font-size: 0.8rem;
  890. }
  891. }
  892. .meal-builder-footer {
  893. padding: 12px;
  894. border-top: 1px solid rgba(255, 255, 255, 0.05);
  895. display: flex;
  896. justify-content: center;
  897. background: rgba(255, 255, 255, 0.02);
  898. }
  899. .primary-btn-sm {
  900. background: var(--primary);
  901. color: white;
  902. border: none;
  903. border-radius: 8px;
  904. padding: 8px 16px;
  905. font-size: 0.85rem;
  906. font-weight: 600;
  907. cursor: pointer;
  908. transition: all 0.2s ease;
  909. width: 100%;
  910. }
  911. .primary-btn-sm:hover {
  912. background: var(--primary-hover);
  913. transform: translateY(-1px);
  914. box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  915. }
  916. .primary-btn-sm:active {
  917. transform: translateY(0);
  918. }