/* IronLog — Food photo (photo.js). Lives inside Fuel's add sheet, so it uses the sheet's tokens:
   card fill --bg3, lines --border, the accent for actions, Fuel's warn colors for "estimate". */

/* Sheet tool button + the "Eating out?" card at the top of Browse */
.ph-tool { color: var(--accent); border-color: var(--accent); }
.ph-tool.out { color: var(--text3); border-color: var(--border); }
.ph-card { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 2px; padding: 12px 14px; text-align: left;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; }
.ph-card.out { display: block; cursor: default; }
.ph-card-top { display: flex; align-items: center; gap: 12px; }
.ph-card-ic { width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg4); color: var(--text2); }
.ph-card-ic.on { background: var(--primary); color: var(--on-accent); }
.ph-card-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-card-t b { font-size: 15px; }
.ph-card-t span { font-size: 13px; color: var(--text2); line-height: 1.3; }
.ph-card-n { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--text2); line-height: 1.1; }
.ph-card-n b { font-size: 16px; color: var(--text); }
.ph-card-ft { margin-top: 10px; font-size: 13px; color: var(--text2); line-height: 1.4; }
.ph-card-ft b { color: var(--text); }

/* Start: note + take / choose */
.ph-start { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.ph-count { font-size: 13px; color: var(--text2); }
.ph-count b { color: var(--text); }
.ph-note > span i { font-style: normal; font-weight: 500; color: var(--text3); }
.ph-note input { height: 46px; font-size: 16px; }
.ph-take, .ph-lib { gap: 8px; cursor: pointer; }
.ph-lib { height: 46px; }
.ph-tips { line-height: 1.4; }
.ph-msg { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--fuel-warn-soft); color: var(--text); font-size: 13px; line-height: 1.35; }
.ph-msg svg { flex-shrink: 0; margin-top: 1px; color: var(--fuel-warn); }
.ph-msg.err { background: var(--red-soft); }
.ph-msg.err svg { color: var(--red); }

/* Busy */
.ph-busy { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0 32px; text-align: center; }
.ph-shot { width: 180px; height: 180px; object-fit: cover; border-radius: var(--radius); margin-bottom: 8px; }
.ph-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--bg4); border-top-color: var(--accent); animation: ph-spin .9s linear infinite; }
@keyframes ph-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ph-spin { animation-duration: 3s; } }

/* Result */
.ph-res { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.ph-res-top { display: flex; gap: 12px; align-items: center; }
.ph-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.ph-res-top h2 { margin: 0; font-size: 18px; }
.ph-res-top span { font-size: 13px; color: var(--text2); }
.ph-list { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); }
.ph-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ph-row:last-child { border-bottom: none; }
.ph-row.off .ph-row-main, .ph-row.off .ph-row-k { opacity: .45; }
.ph-check { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; border: 2px solid var(--border); background: var(--bg2);
  color: var(--on-accent); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.ph-check.on { background: var(--accent); border-color: var(--accent); }
.ph-row-main { flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  background: none; border: none; padding: 0; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.ph-row-n { font-size: 15px; font-weight: 600; }
.ph-row-s { font-size: 12px; color: var(--text2); }
.ph-src { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: var(--bg4); color: var(--text2); margin-left: 2px; }
.ph-row-k { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 14px; }
.ph-row-k .fu-macs { gap: 6px; font-size: 11px; color: var(--text2); }
.ph-miss { margin-top: -4px; }
.ph-tot { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 8px; border-top: 1px solid var(--border); }
.ph-tot-k { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-tot-k b { font-size: 19px; }
.ph-again { align-self: center; padding: 8px; }

/* Fuel home: the line above a meal's rows that came from a photo */
.ph-line { display: flex; align-items: center; gap: 6px; padding: 2px 14px 4px; font-size: 12px; color: var(--text2); }
.ph-line svg { flex-shrink: 0; }
