/* 누티 식단작성(영양가) 탭 — menuPlanning.js */
.meal-converter-view:not([data-meal-tab="planning"]) .mp-panel { display: none !important; }
.meal-converter-view[data-meal-tab="planning"] .mal-panel,
.meal-converter-view[data-meal-tab="planning"] .meal-converter-shell,
.meal-converter-view[data-meal-tab="planning"] .meal-posting-preview,
.meal-converter-view[data-meal-tab="planning"] .meal-pairing-frame { display: none !important; }

.meal-converter-view .mp-panel { display: grid; gap: 18px; min-width: 0; max-width: 100%; color-scheme: light; color: #212529; }
.meal-converter-view .mp-subtabs,
.meal-converter-view .mp-scope { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.meal-converter-view .mp-subtabs button,
.meal-converter-view .mp-scope button {
  min-height: 40px; padding: 8px 16px; border: 1px solid #ced4da; border-radius: 999px; background: #fff;
  color: #495057; font-size: 14px; font-weight: 700; cursor: pointer;
}
.meal-converter-view .mp-subtabs button[aria-selected="true"],
.meal-converter-view .mp-scope button[aria-selected="true"] { background: #12b886; border-color: #12b886; color: #fff; }

.meal-converter-view .mp-search,
.meal-converter-view .mp-add-row,
.meal-converter-view .mp-food-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.meal-converter-view .mp-panel input:not([type="checkbox"]),
.meal-converter-view .mp-panel select,
.meal-converter-view .mp-panel textarea {
  min-height: 40px; padding: 7px 10px; border: 1px solid #ced4da; border-radius: 8px; background: #fff;
  color: #212529; font-size: 14px; font-family: inherit; box-sizing: border-box; max-width: 100%;
}
.meal-converter-view .mp-search input[type="search"],
.meal-converter-view .mp-add-row input,
.meal-converter-view .mp-food-search input { flex: 1 1 220px; }
.meal-converter-view .mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; margin: 8px 0 12px; }
.meal-converter-view .mp-grid-sm { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.meal-converter-view .mp-grid label,
.meal-converter-view .mp-block { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: #495057; }
.meal-converter-view .mp-block { margin: 10px 0; }
.meal-converter-view .mp-block textarea { width: 100%; resize: vertical; line-height: 1.5; }
.meal-converter-view .mp-inline { align-self: end; }
.meal-converter-view .mp-checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.meal-converter-view .mp-recipe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.meal-converter-view .mp-recipe {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center;
  padding: 12px 14px; border: 1px solid #e9ecef; border-radius: 12px;
}
.meal-converter-view .mp-recipe .mal-actions { grid-column: 1 / -1; margin: 0; }
.meal-converter-view .mp-recipe-num { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: #343a40; justify-content: flex-end; }
.meal-converter-view .mp-allergen { color: #868e96; font-size: 13px; font-weight: 600; }
.meal-converter-view .mp-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #f1f3f5; color: #495057; font-size: 12px; font-weight: 700; }
.meal-converter-view .mp-chip-green { background: #ebfbee; color: #2b8a3e; }
.meal-converter-view .mp-chip-warn { background: #fff4e6; color: #d9480f; }
.meal-converter-view .mp-unknown { font-style: normal; color: #d9480f; font-size: 12px; font-weight: 700; }

.meal-converter-view .mp-table-wrap { overflow-x: auto; max-width: 100%; }
.meal-converter-view .mp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.meal-converter-view .mp-table th,
.meal-converter-view .mp-table td { padding: 7px 8px; border-bottom: 1px solid #e9ecef; text-align: left; vertical-align: middle; }
.meal-converter-view .mp-table th { background: #f8f9fa; color: #495057; font-weight: 700; white-space: nowrap; }
.meal-converter-view .mp-table input[type="number"] { width: 96px; min-height: 34px; }
.meal-converter-view .mp-table select { min-height: 34px; }
.meal-converter-view .mp-table td .mal-btn { margin-right: 4px; }
.meal-converter-view .mp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.meal-converter-view .mp-nutrients { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 8px 0; }
.meal-converter-view .mp-nutrient { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: #f8f9fa; font-size: 12px; color: #495057; }
.meal-converter-view .mp-nutrient strong { font-size: 18px; color: #1d3b2f; font-variant-numeric: tabular-nums; }
.meal-converter-view .mp-nutrient.is-unknown { background: #fff4e6; }
.meal-converter-view .mp-nutrient.is-unknown small { color: #d9480f; font-weight: 700; }

.meal-converter-view .mp-food-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.meal-converter-view .mp-food {
  width: 100%; display: grid; gap: 2px; text-align: left; padding: 9px 12px; border: 1px solid #e9ecef; border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px; color: #212529;
}
.meal-converter-view .mp-food.is-selected { border-color: #12b886; background: #e6fcf5; }
.meal-converter-view .mp-picked { margin: 6px 0 10px; font-size: 14px; }
.meal-converter-view .mp-allergens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; border: 1px solid #e9ecef; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.meal-converter-view .mp-allergens legend { font-weight: 700; padding: 0 4px; }
.meal-converter-view .mp-method { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.6; background: #f8f9fa; border-radius: 10px; padding: 12px; margin: 0; }

@media (max-width: 640px) {
  .meal-converter-view .mp-recipe { grid-template-columns: 1fr; }
  .meal-converter-view .mp-recipe-num { justify-content: flex-start; }
}

.meal-converter-view .mp-admin-note { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #fff9db; color: #e67700; font-size: 13px; font-weight: 700; }
.meal-converter-view .mp-panel[data-mp-admin-only="true"] .mp-admin-note { display: block; }
.meal-converter-view .mp-waste-note { color: #d9480f; font-size: 12px; font-weight: 700; }
.meal-converter-view .mp-waste-input { display: flex; gap: 6px; align-items: center; }
.meal-converter-view .mp-waste-input input { flex: 1; min-width: 0; }
.meal-converter-view .mp-food-maker { display: block; font-size: 12px; }
.meal-converter-view .mp-unit { display: block; font-size: 12px; color: #1c7ed6; font-weight: 700; margin-top: 2px; }
