/* Nutrition Facts star trigger and icon */
.nf-open-trigger {
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	line-height: 0; /* eliminate extra space above/below inline images */
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
}
.nf-star-icon {
	width: 14px;
	height: 14px;
	display: inline-block;
	object-fit: contain;
	vertical-align: middle;
	margin-top: -2px;
}
/* Code-2 badges (Excel Code-2) — inline after Nutrition Facts star / recipe scroll rating */
.code2-badges {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	font-family: "Mistral", "Segoe Script", cursive;
	font-size: 16px;
	line-height: 1;
	white-space: nowrap;
}
.code2-badge {
	display: inline-block;
	margin-left: 0.2em;
}
.code2-badge:first-child {
	margin-left: 0;
}
.code2-badge.code2-c {
	color: #e53935;
}
.code2-badge.code2-d {
	color: #800000;
}
.code2-badge.code2-o {
	color: #ff8c00;
}
.code2-badge.code2-p {
	color: #1565c0;
}
/* Recipe community rating in Code-2 slot (Phase 3).
   Rated: same fractional stars as popup title (.recipe-stars-display).
   Unrated: letters "NR" (ALL CAPS, Script Rager, bronze/gold) per client. */
.recipe-scroll-rating {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	flex-wrap: nowrap;
	white-space: nowrap;
	gap: 0.12em;
	line-height: 1;
	margin-bottom: 2px;
}
/* Keep star-strip styles available on list rows (same rules as recipes-modal.css) */
.recipe-scroll-rating .recipe-stars-display {
	position: relative;
	display: inline-block;
	font-size: 14px;
	letter-spacing: 0.06em;
	line-height: 1;
	vertical-align: middle;
	white-space: nowrap;
}
.recipe-scroll-rating .recipe-stars-track {
	color: #b8b8b8;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.recipe-scroll-rating .recipe-stars-fill {
	position: absolute;
	left: 0;
	top: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #d4a017;
	text-shadow:
		0 1px 0 rgba(255, 220, 120, 0.55),
		0 1px 2px rgba(0, 0, 0, 0.28);
	pointer-events: none;
}
.recipe-scroll-rating-nr {
	display: inline-block;
	font-family: var(--ffsrh), 'SCRIPT1RagerHevvy', cursive;
	font-size: 16px;
	line-height: 1;
	font-weight: normal;
	text-transform: none;
	color: #c5a04a;
	white-space: nowrap;
}
/* Code-3 recipes icon (Excel Code-3 = R) — inline left of Sub-Cat 2 (.food); column-align with description */
.recipes-open-trigger {
	padding: 0;
	margin: 0 4px 0 0;
	border: 0;
	background: transparent;
	line-height: 0;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
}
.recipes-icon {
	width: 18px;
	height: 18px;
	display: inline-block;
	object-fit: contain;
	vertical-align: middle;
	margin-top: -2px;
}
/* Quick, small overrides loaded after main.css */

/* Reduce size of the box title dropdown arrow on search page */
.custom-select-arrow {
    font-size: 0.75em;
}

/* #add-notes-row {
    background-color: white;
} */

/* Heart icon in total daily area */
.total-daily-heart {
    width: 45px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.total-daily-water {
    width: 45px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Extra separators between last scroll box and TOTAL Daily Calories honeycomb
 * (task 2026-08-01-1102). Stack: last-box bottom grey → this grey → metal line → honeycomb.
 * .total-daily-pre-honeycomb-grey reuses .nut-grayline (8px solid #ddd).
 * Metal asset: images/black-metal-line.jpg (449×12; public SFTP; may be untracked in git).
 * Block (not .row) with Bootstrap-4 row side bleed (−15px) so strip matches grey bar width;
 * stretch image to full box (100% × 100%) — full tile height, no left/right gaps.
 * Hidden by default; shown only when TOTAL Daily Calories is visible (task 2026-08-01-1124).
 * (All footer holders start .d-none — hiding until calories mode avoids metal flash on counter days.)
 */
.total-daily-pre-honeycomb-grey,
.total-daily-metal-line {
    display: none;
}

.total-daily-metal-line {
    height: 12px;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: -15px;
    margin-right: -15px;
    padding: 0;
    border: none;
    background-color: #1a1a1a;
    background-image: url(../images/black-metal-line.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    line-height: 0;
    font-size: 0;
}

.container.nutrition:has(.total-daily-title-holder:not(.d-none)) .total-daily-pre-honeycomb-grey {
    display: flex; /* Bootstrap .row */
}

.container.nutrition:has(.total-daily-title-holder:not(.d-none)) .total-daily-metal-line {
    display: block;
}

/*
 * Total Daily Calories / heart-water footer strip.
 * Base = simple white (heart/water counters). Honeycomb + white type only when
 * TOTAL Daily Calories title is visible (task 2026-08-01-1124; was all modes in 2026-07-19-1804).
 * Asset: images/honeycomb-bg-total-dailly.webp (public SFTP; gitignored under images/).
 */
.total-daily-row {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 35px;
    padding-bottom: 35px;
    background-color: #fff;
    background-image: none;
    color: #000;
}

/* TOTAL Daily Calories mode — honeycomb strip + white type */
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) {
    background-color: transparent;
    background-image: url(../images/honeycomb-bg-total-dailly.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
}

/* Heart / water counter days — white strip padding (spacing only; no honeycomb) */
.total-daily-row:has(.total-daily-water-title-holder:not(.d-none)) {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 18px;
    padding-bottom: 30px;
}
.total-daily-row:has(.total-daily-heart-title-holder:not(.d-none)) {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 30px;
    padding-bottom: 30px;
}

.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-title,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-calories,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-macro-label,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-macro-value,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-macro-num,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-macro-unit,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-macro-sep,
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-micro-item {
    color: #fff;
}

/* Carbs / Fat / Protein nums only — Macros orange when daily total > 0 (task 2026-08-01-1240) */
.total-daily-row:has(.total-daily-title-holder:not(.d-none))
    .total-daily-macro-num.total-daily-macro-num--active {
    color: #ffa500;
}

/* Added Sugars / Saturated Fats nums — popup red when day total over limit (task 2026-08-11-1054) */
.total-daily-row:has(.total-daily-title-holder:not(.d-none))
    .total-daily-macro-num.total-daily-macro-num--over-limit {
    color: #d32f2f;
}

/* Dietary Fiber nums — popup green when day total over goal (task 2026-08-11-1054) */
.total-daily-row:has(.total-daily-title-holder:not(.d-none))
    .total-daily-macro-num.total-daily-macro-num--goal-met {
    color: #00a752;
}

.total-daily-row:has(.total-daily-heart-title-holder:not(.d-none)) .total-daily-title,
.total-daily-row:has(.total-daily-water-title-holder:not(.d-none)) .total-daily-title {
    color: #000;
}


/* Inline counter for total daily text - same size as top counters */
.inline-counter {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px; /* subtle space between word and counter */
}

.inline-counter .db-counter {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.inline-counter .meter {
    transform: scale(0.75);
    transform-origin: left center; /* shrink from the left edge to avoid extra gap */
}

.inline-counter .meter-window {
    position: relative;
    background: #000;
    border-radius: 8px;
    padding: 3px 4px;
    overflow: hidden;
    height: 35px;
    box-shadow: inset 0 8px 16px rgba(0,0,0,.6), inset 0 -2px 0 rgba(255,255,255,.06);
}

.inline-counter .odometer {
    display: inline-flex;
    gap: 1px;
    font-family: "Courier New", monospace;
}

/* Center the line by the ICON and align bottoms */
.total-daily-heart-title-holder .total-daily-title,
.total-daily-water-title-holder .total-daily-title {
    display: inline-grid;
    grid-template-columns: 1fr auto 1fr; /* left text | icon | right text+counter */
    align-items: baseline;            
    column-gap: 8px;
    width: 100%;
}
.total-daily-heart-title-holder .total-daily-title .title-left,
.total-daily-water-title-holder .total-daily-title .title-left {
    text-align: right;
}
.total-daily-heart-title-holder .total-daily-title .title-right,
.total-daily-water-title-holder .total-daily-title .title-right {
    text-align: left;
}
/* removed title-counter; reverted to previous structure */

/* Keep heart size; slightly reduce water and align bottoms */
.total-daily-heart-inline {
    width: 45px;
    transform: translateY(15px);
    /* Crop thin white fringe on left of heart.png (visible on dark honeycomb) */
    clip-path: inset(0 0 0 0.7px);
}
.total-daily-water-inline { width: 38px; transform: translateY(15px); }

/* (Removed dev overlay CSS per request to keep only show-both behavior) */

.inline-counter .odometer-digit {
    position: relative;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 0;
    background: #2f2f2f;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.35);
}

.inline-counter .odometer-wheel {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
}

.inline-counter .odometer-num {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d6d6d6;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0,0,0,.55);
    font-variant-numeric: tabular-nums;
}

/* Notes read-only input: remove border */
.notes-read {
    border: none !important;
}

/* Notes read-only input: force light grey and remove focus glow */
.notes-read,
.notes-read:focus,
.notes-read:disabled,
.notes-read[readonly] {
    background-color: #f0f0f0 !important;
    box-shadow: none !important;
    outline: none !important;
}

/*
 * NOTES saved/read: solid light-grey band (task 2026-07-19-1910).
 * Row had bg-white + padding around the grey input → white strips above/below.
 * Keep .nut-grayline under the box as the dark grey bottom bar.
 */
#nut-food-notes:has(.notes-read) {
    background-color: #f0f0f0 !important;
    padding-top: 0;
    padding-bottom: 0;
    align-items: stretch;
}

#nut-food-notes:has(.notes-read) .notes-input.notes-read {
    border-radius: 0;
    min-height: 40px;
    height: 100%;
}

/* Prevent + add button/icon from shrinking inside the flex title row */
.nut-total-block .nut-header .title .add-box-btn {
    flex: 0 0 auto;
}
.nut-total-block .nut-header .title .add-box-btn img {
    width: 28px;
    height: 28px;
    max-width: none;
    flex-shrink: 0;
    display: block;
}

/* Keep extra-totals on one line; adjust margin-left on mobile */
.nut-total-block .nut-header .title .extra-totals {
    white-space: nowrap;
}
@media (max-width: 576px) {
    .nut-total-block .nut-header .title .extra-totals {
        margin-left: 0.5rem !important; /* same visual as ml-2 on mobile */
    }
}

/* Total Daily Calories – circle-star left of title (no layout shift; task 2026-05-22-1022) */
.total-daily-row:has(.total-daily-title--with-star),
.total-daily-title-holder:has(.total-daily-title--with-star),
.total-daily-macros-holder,
.total-daily-macros-align-col,
.container.nutrition:has(.total-daily-title--with-star) {
    overflow: visible;
}

/* Title + calories side-by-side with normal gap; group flush right (task 2026-07-13-1811) */
.total-daily-heading-col {
    display: flex;
    justify-content: flex-end;
}

.total-daily-title-value-pair {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 1.1em;
    max-width: 100%;
}

.total-daily-title-value-pair .total-daily-title-holder,
.total-daily-title-value-pair .total-daily-value-holder {
    width: auto;
    flex: 0 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.total-daily-title--with-star {
    position: relative;
    display: inline-block;
}

.total-daily-title--with-star .total-daily-title-inner {
    font-weight: 400;
}

.total-daily-title--with-star .total-daily-title-daily {
    font-weight: 400;
}

.total-daily-circle-star-btn {
    position: absolute;
    left: -62px;
    top: 60%;
    transform: translateY(calc(-50% - 3px));
    border: none;
    background: transparent;
    padding: 0;
    line-height: 0;
    cursor: default;
    z-index: 2;
}

.total-daily-circle-star-btn:not(:disabled) {
    cursor: pointer;
}

.total-daily-circle-star-btn:disabled,
.total-daily-circle-star-btn--no-popup {
    opacity: 1;
    cursor: default;
}

/* Shooting-star TOTAL Daily icon (task 2026-10-05-1405; was 34px / left -51px) */
.total-daily-circle-star-img {
    display: block;
    width: auto;
    height: 42px;
    object-fit: contain;
}

/* Horizontal macro totals under Total Daily Calories (task 2026-05-22-1022; align 2026-07-13-1811) */
.total-daily-macros-holder {
    margin-top: 16px;
    font-size: 82%;
}

.total-daily-macros-align-col {
    overflow: visible;
}

/* Shrink-wrap stack; macros-top alone sizes the rule to Carb→Protein */
.total-daily-macros-stack {
    display: inline-block;
    text-align: right;
    vertical-align: top;
    max-width: 100%;
}

.total-daily-macros-top {
    display: inline-block;
    text-align: right;
    max-width: 100%;
}

.total-daily-macros-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px 8px;
    line-height: 1.2;
    white-space: nowrap;
}

.total-daily-macro-label {
    font-weight: 700;
}

.total-daily-macro-value {
    font-weight: 700;
}

.total-daily-macro-num {
    font-weight: 700;
}

.total-daily-macro-unit {
    font-weight: 700;
    margin-left: 2px;
}

.total-daily-macro-sep {
    font-weight: 700;
    color: #fff; /* honeycomb strip contrast (task 2026-07-19-1804) */
}

/* Match .nut-row entry separators (1px); width = Carb|Fat|Protein only */
.total-daily-macros-rule {
    border-top: 1px solid black;
    margin-top: 10px;
    width: 100%;
}
.total-daily-row:has(.total-daily-title-holder:not(.d-none)) .total-daily-macros-rule {
    border-top-color: #fff; /* honeycomb strip contrast (task 2026-07-19-1804; scoped 2026-08-01-1124) */
}

.total-daily-micros-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 10px;
    text-align: right;
}

.total-daily-micros-side-heart {
    display: block;
    width: 52px;
    height: auto;
    flex: 0 0 auto;
    align-self: center;
    margin-right: 4px;
    transform: translateX(-6px);
    /* Crop thin white fringe on left of heart.png (visible on dark honeycomb) */
    clip-path: inset(0 0 0 0.7px);
}

.total-daily-micros-list {
    flex: 0 1 auto;
    text-align: right;
}

.total-daily-micro-item {
    margin-bottom: 6px;
    line-height: 1.2;
}

.total-daily-micro-item:last-child {
    margin-bottom: 0;
}

/*
 * === BEGIN ms-shared-cal-edge (task 2026-07-13-1811) ===
 * One right edge for: food .calories | black .actual_calorie_total | TOTAL Daily.
 * Blade: black TOTAL = col-10|col-1|spacer; TOTAL Daily = col-11 (same end as slot 11).
 * Revert CSS: delete this whole BEGIN/END block.
 *
 * 574px is perfect (0.25rem gutters from main.css ≤575). Drift starts ~938 and
 * worsens toward 767 while still on 15px Bootstrap gutters. Extend the 574
 * gutter recipe through max-width 938 only (≥939 left unchanged).
 */
.calorie-action-spacer {
    pointer-events: none;
}

.food-row > .calories,
.nut-total-block .actual_calorie_total,
.total-daily-heading-col,
.total-daily-macros-holder.total-daily-macros-align-col {
    text-align: right;
    box-sizing: border-box;
}

@media (max-width: 938px) {
    .food-row > div,
    .nut-header > div,
    .nut-total-block .calorie-action-spacer,
    .total-daily-heading-col,
    .total-daily-macros-holder.total-daily-macros-align-col {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}
/* === END ms-shared-cal-edge === */

/* My Search metric TOTAL row — match water/caffeine (ffsrh + 1rem base, BLBOPT sleep H/M) */
.nut-total-block .nut-row.nut-header.nut-total > .total-metric {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.2;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric .metric-total-value {
    font-size: 1.1em;
    font-weight: bold;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric .metric-sleep-letter {
    font-size: 0.65em;
    font-weight: normal;
    vertical-align: baseline;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric .metric-sleep-total-hours,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric .metric-sleep-total-minutes {
    display: inline-block;
    white-space: nowrap;
    vertical-align: baseline;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric .metric-sleep-total-minutes {
    margin-left: 0.12em;
}

/* Metric boxes: hide CALORIES label, keep desc row space */
.nut-box-wrapper[data-metric] .nut-block.nutrition > .nut-desc .calories-desc {
    visibility: hidden;
}

/* Metric header titles — white (match default blue food boxes); TOTAL row accents below */
.nut-header.metric-activity .box-title-display,
.nut-header.metric-activity .box-title-display .box-title-text,
.nut-header.metric-activity .custom-select-arrow {
    color: #fff !important;
}
/* Saved metric TOTAL row — honeycomb; no top grey when filled (flush to colored header) */
.nut-box-wrapper[data-metric] .nut-total-block .nut-row.nut-header.nut-total.metric-total-filled {
    background-color: transparent !important;
    background-image: url(../images/honeycomb-pattern-tile.png);
    background-size: cover;
    background-position: center;
    border-top: none !important;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-sleep,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-sleep .metric-total-value,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-sleep .metric-total-suffix,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-sleep .metric-sleep-letter,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-sleep .metric-sleep-total-hours,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-sleep .metric-sleep-total-minutes,
.nut-total-block .nut-row.nut-header.nut-total.metric-total-sleep > .title > span:first-child {
    color: #E53282 !important;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-weight,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-weight .metric-total-value,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-weight .metric-total-suffix,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-weight .small-decimal,
.nut-total-block .nut-row.nut-header.nut-total.metric-total-weight > .title > span:first-child {
    color: #fb5ffc !important;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-exercise,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-exercise .metric-total-value,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-exercise .metric-total-suffix,
.nut-total-block .nut-row.nut-header.nut-total.metric-total-exercise > .title > span:first-child {
    color: #4cd964 !important;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-activity,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-activity .metric-total-value,
.nut-total-block .nut-row.nut-header.nut-total > .total-metric.total-metric-activity .metric-total-suffix,
.nut-total-block .nut-row.nut-header.nut-total.metric-total-activity > .title > span:first-child {
    color: #69be28 !important;
}
.nut-total-block .nut-row.nut-header.nut-total > .total-metric .metric-total-value .small-decimal {
    font-size: 0.72em;
    font-weight: bold;
}

/* My Search — “Unfortunately, this establishment…” rows (circle-RED-X after brand) */
.food-row.food-row-unfortunately {
	align-items: flex-start;
}
.food-row.food-row-unfortunately > .serving_size,
.food-row.food-row-unfortunately > .quantity,
.food-row.food-row-unfortunately > .icons,
.food-row.food-row-unfortunately > .calories {
	display: none !important;
}
.food-row.food-row-unfortunately > .description {
	flex: 1 1 auto !important;
	max-width: none !important;
	width: auto !important;
	flex-basis: 0 !important;
}
.food-row.food-row-unfortunately > .action {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
}
.unfortunately-brand-line {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-top: 0.4em;
}
.unfortunately-brand {
	color: red;
	font-weight: bold;
	line-height: 1.2;
}
.unfortunately-red-x {
	width: 26px;
	height: 26px;
	display: block;
	flex-shrink: 0;
	object-fit: contain;
}
