/* ═══════════════════════════════════════════════════════
   nutrition.css — стили экрана «Питание» v8
   Карточка калорий + карточки БЖУ
   ═══════════════════════════════════════════════════════ */

#screen-nutrition,
#screen-nutrition * {
  font-family: var(--font);
}

/* Фон экрана питания */
body[data-screen="nutrition"] {
  background: #2D1500;
}

/* ═══════════════════════════════════════════════
   КАРТОЧКА КАЛОРИЙ
   ═══════════════════════════════════════════════ */
.kcal-card {
  background: rgba(102, 102, 102, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px 16px;
  margin-bottom:0;
  position: relative;
}

.kcal-header {
  margin-bottom: 9px;
}

.kcal-label {
  font-size: var(--fs-24-semibold, 24px);
  font-weight: var(--fw-24-semibold, 600);
  line-height: 33px;
  color: var(--c-header, #E6E6E6);
}

.kcal-goal {
  font-size: var(--fs-12-regular, 12px);
  font-weight: var(--fw-12-regular, 400);
  line-height: 12px;
  color: var(--text3, #9B9B9B);
  margin-top: 2px;
}

.kcal-numbers {
  font-size: 24px;
  font-weight: 600;
  line-height: 33px;
  color: #FFFFFF;
}

.kcal-remain {
  font-size: var(--fs-12-regular, 12px);
  font-weight: var(--fw-12-regular, 400);
  line-height: 12px;
  color: var(--text3, #9B9B9B);
  margin-top: 2px;
}

/* Кольцо калорий */
.kcal-ring {
  position: absolute;
  right: 16px;
  top: 24px;        /* верх кольца = верх карточки */
  height: 100%;     /* кольцо на всю высоту карточки */
  width: auto;
  aspect-ratio: 1;
  max-height: calc(100% - 48px);  /* минус верхний и нижний отступ */
}
.kcal-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
}

/* Плавная анимация цифр при отметке блюда */
.nut-stat-num,
.bju-card-vals span,
.bju-card-remain span {
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════
   КАРТОЧКИ БЖУ
   ═══════════════════════════════════════════════ */
.bju-cards {
  display: flex;
  gap: var(--card-gap);
  margin-bottom: 0;
}

.bju-card {
  flex: 1;
  border-radius: 20px;
  padding: 14px 10px;  /* было 24px 16px */
  position: relative;
  min-height: 100px;
}

.bju-card-name {
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  color: #FFFFFF;
}

.bju-card-desc {
  font-size: 11px;     /* было 12px */
  font-weight: 300;
  line-height: 12px;
  color: #919191;
  margin-top: 4px;
  white-space: nowrap;  /* ← запрет переноса */
}

.bju-card-vals {
  font-size: 14px;
  font-weight: 300;
  line-height: 19px;
  color: #FFFFFF;
  margin-top: 12px;
}

.bju-card-remain {
  font-size: 12px;
  font-weight: 300;
  line-height: 12px;
  color: #919191;
  margin-top: 6px;
}

/* Мини-кольцо */
.bju-ring {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 40px;
  height: 40px;
}

.bju-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
}

/* ═══════════════════════════════════════════════
   СОВЕТ ПО БЕЛКУ
   ═══════════════════════════════════════════════ */
.nut-protein-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 16px;
}

.nut-protein-tip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--training, #10B981);
  flex-shrink: 0;
  margin-top: 6px;
}

.nut-protein-tip-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--text, #FFFFFF);
  line-height: 19px;
}

/* ═══════════════════════════════════════════════
   КАРТОЧКИ ПРИЁМОВ ПИЩИ
   ═══════════════════════════════════════════════ */

.nut-meal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  cursor: pointer;
  transition: background 0.15s;
}

.nut-meal-item:active {
  background: rgba(255, 255, 255, 0.02);
}

.nut-meal-item.is-done .nut-meal-name {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-decoration-thickness: 1px;
  opacity: 0.6;
}

.nut-meal-num {
  width: 28px;
  height: 28px;
  border-radius: var(--r-chip, 10px);
  background: var(--chip-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-12-regular);
  font-weight: var(--fw-24-semibold);
  color: var(--text3);
  flex-shrink: 0;
  font-family: var(--font);
}

.nut-meal-item.is-done .nut-meal-num {
  background: rgba(204, 85, 0, 0.15);
  color: var(--nutrition);
}

.nut-meal-body {
  flex: 1;
  min-width: 0;
}

.nut-meal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.nut-meal-slot {
  font-size: var(--fs-10-regular);
  font-weight: var(--fw-14-medium);
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: var(--font);
}

.nut-meal-time {
  font-size: var(--fs-10-regular);
  font-weight: var(--fw-14-medium);
  color: var(--text3);
  font-family: var(--font);
}

.nut-meal-name {
  font-size: var(--fs-14-regular);
  font-weight: var(--fw-14-medium);
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
  font-family: var(--font);
}

.nut-meal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nut-meal-macros {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.nut-meal-macro {
  font-size: var(--fs-10-regular);
  font-weight: var(--fw-14-medium);
  padding: var(--chip-py) var(--chip-px);
  border-radius: var(--r-chip);
  font-family: var(--font);
  letter-spacing: 0.02em;
}

.nut-meal-macro--p {
  color: var(--training);
  background: rgba(0, 204, 136, 0.08);
}

.nut-meal-macro--f {
  color: #E6B800;
  background: rgba(230, 184, 0, 0.08);
}

.nut-meal-macro--c {
  color: var(--nutrition);
  background: rgba(204, 85, 0, 0.08);
}

.nut-meal-kcal {
  font-size: var(--fs-12-regular);
  font-weight: var(--fw-24-semibold);
  color: var(--text3);
  font-family: var(--font);
  margin-left: auto;
}

.nut-meal-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nut-meal-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nut-meal-check:active {
  transform: scale(0.92);
}

.nut-meal-check.is-done {
  background: var(--nutrition-btn);
  border-color: var(--nutrition-btn);
}

/* ═══════════════════════════════════════════════
   БЛОК «РАЦИОН»
   ═══════════════════════════════════════════════ */

.nut-ration-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--card-r);
  margin-bottom: var(--card-gap);
}

.nut-ration-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px var(--card-px, 16px) 12px;
}

.nut-ration-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nut-ration-title {
  font-size: var(--fs-24-semibold);
  font-weight: var(--fw-24-semibold);
  line-height: var(--lh-33, 33px);
  color: var(--c-header, #E6E6E6);
  font-family: var(--font);
}

.nut-ration-meta {
  font-size: var(--fs-12-regular);
  font-weight: var(--fw-12-regular);
  color: var(--text3);
  line-height: 1.3;
  font-family: var(--font);
}

.nut-ration-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nut-ration-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: none;
  color: var(--text3);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font);
  transition: all 0.2s;
}

.nut-ration-action-btn:active {
  background: rgba(255, 255, 255, 0.06);
}

.nut-ration-list {
  padding: 0 var(--card-px, 16px);
}


/* ═══════════════════════════════════════════════
   ОСТАЛЬНЫЕ ЭЛЕМЕНТЫ
   ═══════════════════════════════════════════════ */
.meal-detail-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--card-r);
  padding: 16px;
  margin-bottom: 12px;
}

.meal-accent {
  height: 2px;
  width: 32px;
  background: linear-gradient(90deg, #1D9E75, #2E75B6);
  border-radius: 2px;
  margin-bottom: 12px;
}

.meal-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 3px;
  line-height: 1.2;
}

.meal-slot-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.meal-macros-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: rgba(0,0,0,.2);
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid rgba(255,255,255,.07);
  margin-bottom: 14px;
}

.meal-mac-box {
  padding: 9px 3px;
  text-align: center;
  position: relative;
}

.meal-mac-box:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 0.5px;
  background: rgba(255,255,255,.1);
}

.meal-mac-v {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.meal-mac-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin: 3px auto 0;
}

.meal-mac-l {
  font-size: 7px;
  color: rgba(255,255,255,.28);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meal-list-block {
  background: rgba(0,0,0,.2);
  border: 0.5px solid rgba(255,255,255,.07);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 12px;
}

.meal-list-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 0.5px solid rgba(255,255,255,.05);
}

.meal-list-item:last-child {
  border-bottom: none;
}

.meal-list-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.meal-list-num {
  font-size: 10px;
  font-weight: 700;
  color: rgba(46,117,182,.7);
  min-width: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.meal-list-text {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  line-height: 1.45;
}

.meal-alts-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.meal-alts-scroll::-webkit-scrollbar {
  display: none;
}

.meal-alt-card {
  flex-shrink: 0;
  background: rgba(255,255,255,.05);
  border: 0.5px solid rgba(255,255,255,.1);
  border-radius: 11px;
  padding: 9px 11px;
  min-width: 105px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
}

.meal-alt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(46,117,182,.6), rgba(29,158,117,.6));
}

.meal-alt-card:active {
  transform: scale(.96);
  background: rgba(46,117,182,.08);
}

.meal-alt-name {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  line-height: 1.3;
  margin-bottom: 5px;
}

.meal-alt-arrow {
  font-size: 8px;
  font-weight: 600;
  color: #85B7EB;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meal-check-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1D9E75, #22b584);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.meal-check-btn.done {
  background: rgba(29,158,117,.15);
  border: 0.5px solid rgba(29,158,117,.35);
  color: #5DCAA5;
}

.meal-detail-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: transparent;
}

.meal-detail-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}

.meal-detail-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  flex: 1;
  text-align: center;
}

.meal-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px calc(var(--nav-h) + 16px);
}

.meal-detail-body::-webkit-scrollbar {
  display: none;
}

.filtered-note {
  font-size: 11px;
  color: var(--text3);
  padding: 6px 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ═══════════════════════════════════════════════
   ШОП-МОДАЛКА (Что купить на завтра) — v2
   унифицирована с training.js модалками
   ═══════════════════════════════════════════════ */

.shop-header-block {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.shop-date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.shop-date-icon {
  font-size: 20px;
}

.shop-date-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.shop-date-day {
  font-size: 11px;
  color: var(--text3);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 20px;
}

.shop-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-progress-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.shop-progress-bar-fill {
  height: 100%;
  background: var(--training);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.shop-progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--training);
  min-width: 36px;
  text-align: right;
}

.shop-progress-meta {
  font-size: 11px;
  color: var(--text3);
}

/* Пустое состояние */
.shop-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  text-align: center;
}

.shop-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.shop-empty-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.shop-empty-sub {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
}

/* Секции */
.shop-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.shop-ingredients-section {
  margin-bottom: 20px;
}

.shop-meals-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

/* Список ингредиентов */
.shop-ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-ingredient-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--modal-block-bg);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.shop-ingredient-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.shop-ingredient-item:active {
  transform: scale(0.98);
  background: var(--modal-block-bg-active);
}

.shop-ingredient-item--checked {
  background: var(--modal-block-bg-hover);
}

.shop-ingredient-item--checked:hover {
  background: rgba(0, 204, 136, 0.06);
}

.shop-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.shop-checkbox--checked {
  border-color: var(--training);
  background: var(--training);
}

.shop-checkbox:active {
  transform: scale(0.92);
}

.shop-checkbox svg {
  width: 12px;
  height: 12px;
}

.shop-ingredient-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: color 0.2s ease;
  flex: 1;
}

.shop-ingredient-name--checked {
  color: var(--text3);
  text-decoration: line-through;
}

/* План питания — карточки блюд */
.shop-meals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-meal-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  transition: background 0.2s;
}

.shop-meal-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.shop-meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.shop-meal-slot {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent2);
}

.shop-meal-time {
  font-size: 11px;
  color: var(--text3);
}

.shop-meal-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.shop-meal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shop-meal-macros {
  display: flex;
  gap: 8px;
}

.shop-meal-macros span {
  font-size: 11px;
  color: var(--text3);
}

.shop-meal-kcal {
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
}

/* modal-btn-primary — см. css/buttons.css */
.shop-modal-title-wrapper {
  flex: 1;
}

/* ═══════════════════════════════════════════════
   МОДАЛКА «ДОБАВИТЬ ЕДУ»
   ═══════════════════════════════════════════════ */
.fl-add-tabs {
  padding-top: 0;
}

.fl-add-body .ex-alt-search-wrap .cl-inp,
.fl-add-inp {
  width: 100%;
}

.fl-panel-hint {
  font-size: var(--fs-12-regular, 12px);
  color: var(--modal-hint-color);
  margin-bottom: 12px;
  line-height: 1.45;
}

.fl-results-list {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.fl-results-list--short {
  max-height: 160px;
}

/* fl-list-item — те же токены, что .modal-item */
.fl-list-item { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px; background:var(--modal-block-bg); border-radius:var(--modal-block-r); margin-bottom:8px; cursor:pointer; transition:background .15s; }
.fl-list-item:active { background:var(--modal-block-bg-active); }
.fl-list-item-name { font-size:13px; color:var(--text); flex:1; }
.fl-list-item-meta { font-size:11px; color:var(--text3); flex-shrink:0; }
.fl-empty-msg { font-size:12px; color:var(--modal-hint-color); padding:12px 4px; text-align:center; }

.fl-calc-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
}

.fl-calc-row-name {
  flex: 1;
  font-size: 12px;
  color: var(--text);
}

.fl-calc-grams {
  width: 56px;
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  text-align: center;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
}

.fl-calc-row-unit {
  font-size: 10px;
  color: var(--text3);
}

.fl-calc-row-kcal {
  font-size: 11px;
  color: var(--training, #00CC88);
  width: 46px;
  text-align: right;
}

.fl-calc-row-remove {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
}

.fl-calc-total {
  background: var(--modal-panel-bg);
  border-radius: var(--modal-panel-r);
  padding: 12px;
  margin-bottom: 12px;
}

.fl-calc-total-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.fl-calc-total-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.fl-calc-total-item {
  text-align: center;
}

.fl-calc-total-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.fl-calc-total-item:first-child .fl-calc-total-val {
  color: var(--training, #00CC88);
}

.fl-calc-total-lbl {
  font-size: 9px;
  color: var(--text3);
}

.fl-manual-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.fl-manual-grid .cl-inp {
  font-size: 12px;
  padding: 7px 8px;
}

.fl-add-submit {
  width: 100%;
  margin-top: 4px;
}

.fl-add-inp {
  margin-bottom: 10px;
}

